-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Error message doesn't give full path in suggestion. #83513
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
estebank
added
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
D-papercut
Diagnostics: An error or lint that needs small tweaks.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Mar 26, 2021
JohnTitor
added
the
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
label
Mar 26, 2021
@rustbot claim |
@estebank I've found the corresponding suggest and trait_ref, but I don't know how to get its prefix, do you have any suggestions? |
@hi-rustin you'll want to use this function where the suggestion is being created rust/compiler/rustc_middle/src/ty/print/pretty.rs Lines 102 to 112 in 72ebebe
|
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Mar 30, 2021
…r=estebank give full path of constraint in suggest_constraining_type_param close rust-lang#83513
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Mar 31, 2021
…r=estebank give full path of constraint in suggest_constraining_type_param close rust-lang#83513
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Mar 31, 2021
…r=estebank give full path of constraint in suggest_constraining_type_param close rust-lang#83513
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Apr 1, 2021
…r=estebank give full path of constraint in suggest_constraining_type_param close rust-lang#83513
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Apr 2, 2021
…r=estebank give full path of constraint in suggest_constraining_type_param close rust-lang#83513
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=d854c189b0a198c091da3ccf429e0ec9
It suggests adding
Sum
to the bounds, butSum
is not in scope, so typing directly what it says just leads to another error.Interestingly, Mul was suggested as std::ops::Mul.
So it should likely suggest the correct prefix for the Sum trait.
The text was updated successfully, but these errors were encountered: