Hint suggesting using associated method instead of method uses incorrect syntax for generic method access #61412
Labels
A-associated-items
Area: Associated items (types, constants & functions)
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-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
Consider this example:
This errors with the following error:
The problem is that if I follow the hint exactly, I end up with
GenericAssocMethod<i32>::default_hello();
, which is invalid rust syntax.Ideally, I believe suggesting
GenericAssocMethod::<i32>::default_hello
would be more beneficial.Submitting this and #61411 as two separate issues, but I found both for the same hint.
The text was updated successfully, but these errors were encountered: