-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
E0412 is correct but E0782 is emitted (in trait definitions) #116434
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Code
Current output
Desired output
Obviously this isn't helpful, as
Cloneisn't object safe. The correct error isE0412:Rationale and extra context
E0412is correctly emitted if the associated type name is changed to not collide with any traits currently in scope. So:Errors as expected.
I've also seen this confuse new users "in the wild" on Rustcord - that's what originally inspired me to file this issue.
Other cases
No response
Anything else?
No response