-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Fix span suggestion for unstable name collision lint #151256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fix span suggestion for unstable name collision lint #151256
Conversation
Change the `UNSTABLE_NAME_COLLISIONS` lint from using plain text
`help` to `span_suggestion` for method calls, providing users with
a visual code replacement suggestion.
Previously:
= help: call with fully qualified syntax `Trait::method(...)` to keep using the current method
Now:
help: call with fully qualified syntax to keep using the current method
|
LL - receiver.method(args)
LL + Trait::method(...)
Fixes rust-lang#1794 in rustc_hir_typeck/src/method/probe.rs
Co-Authored-By: Claude Opus 4.5 <[email protected]>
|
r? @fee1-dead rustbot has assigned @fee1-dead. Use |
This comment has been minimized.
This comment has been minimized.
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
|
why there is |
Change the
UNSTABLE_NAME_COLLISIONSlint from using plain texthelptospan_suggestionfor method calls, providing users with a visual code replacement suggestion.Previously:
= help: call with fully qualified syntax
Trait::method(...)to keep using the current methodNow:
help: call with fully qualified syntax to keep using the current method
|
LL - receiver.method(args)
LL + Trait::method(...)
Fixes #1794 in rustc_hir_typeck/src/method/probe.rs