Do not suggest type parameter when followed by <
#72640
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
C-bug
Category: This is a bug.
D-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Rustc should know that
struct S<Hashmap>
is not in the right direction because that still wouldn't makeHashmap<String, ()>
a valid thing to write; type parameters can't have type parameters (yet??).Separately, #70572 should also have prevented the suggestion in this case, but is an independent issue.
cc @estebank who worked on this recently in #68447.
The text was updated successfully, but these errors were encountered: