Add note
explaining that the same variant of the same enum with different type params are different types
#95284
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
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.
D-terse
Diagnostics: An error or lint that doesn't give enough information about the problem at hand.
P-low
Low priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
As brought up in #51479,
Result<A, i32>::Err(0)
andResult<B, i32>::Err(0)
are not of the same type. We should add a note (or ideally a structured suggestion on what to write) explaining this.The text was updated successfully, but these errors were encountered: