Emit suggestion for where &T: Trait
#82312
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-lifetimes
Area: Lifetimes / regions
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-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
D-newcomer-roadblock
Diagnostics: Confusing error or lint; hard to understand for new users.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given:
we currently emit
'static
suggestions are a lot of the time incorrect, but in this case what we can suggest isand both errors go away. Ideally we could silence the second error and have a structured suggestion for the first.
Taken from https://github.com/rust-lang/rust/pull/82194/files#r578364173
The text was updated successfully, but these errors were encountered: