Skip to content

feat: Add unqualify_method_call assist#13825

Merged
bors merged 2 commits into
rust-lang:masterfrom
WaffleLapkin:ufcs_to_method_call_and_back
Jan 9, 2023
Merged

feat: Add unqualify_method_call assist#13825
bors merged 2 commits into
rust-lang:masterfrom
WaffleLapkin:ufcs_to_method_call_and_back

Conversation

@WaffleLapkin

Copy link
Copy Markdown
Member

...which is the inverse of qualify_method_call assist.

Peek 2022-12-22 22-47

Optional future work:

  • import the trait if needed
  • remove excess references when auto-ref is possible

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 22, 2022
@flodiebold

Copy link
Copy Markdown
Member

I think the acronym "UFCS" is a bit unfriendly, maybe something like "Convert to .add method call"? (Also btw, why is "Qualify method call" under "Inline"?)

@Veykril

Veykril commented Jan 2, 2023

Copy link
Copy Markdown
Member

+1 to UFCS being a bad choice for the user visible text

Also btw, why is "Qualify method call" under "Inline"?

Probably because both target the same range and our assists are ordered alphabetically by default (with a few exceptions, where this would probably be a good choice to do so as well)

@flodiebold

Copy link
Copy Markdown
Member

Probably because both target the same range and our assists are ordered alphabetically by default (with a few exceptions, where this would probably be a good choice to do so as well)

I didn't mean the order, rather that it's under the Inline... group (whereas the new assist is Rewrite...) 😅

@rust-cloud-vms
rust-cloud-vms Bot force-pushed the ufcs_to_method_call_and_back branch from 59889c1 to 44c84a8 Compare January 9, 2023 13:50
@WaffleLapkin WaffleLapkin changed the title feat: Add convert_ufcs_to_method assist feat: Add unqualify_method_call assist Jan 9, 2023
@Veykril

Veykril commented Jan 9, 2023

Copy link
Copy Markdown
Member

@bors delegate+

@bors

bors commented Jan 9, 2023

Copy link
Copy Markdown
Contributor

✌️ @WaffleLapkin can now approve this pull request

@rust-cloud-vms
rust-cloud-vms Bot force-pushed the ufcs_to_method_call_and_back branch from a48d5f5 to c782353 Compare January 9, 2023 14:24
@WaffleLapkin

Copy link
Copy Markdown
Member Author

@bors r=Veykril

@bors

bors commented Jan 9, 2023

Copy link
Copy Markdown
Contributor

📌 Commit c782353 has been approved by Veykril

It is now in the queue for this repository.

@bors

bors commented Jan 9, 2023

Copy link
Copy Markdown
Contributor

⌛ Testing commit c782353 with merge d33fa38...

@bors

bors commented Jan 9, 2023

Copy link
Copy Markdown
Contributor

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing d33fa38 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants