E0507 suggestion conflicts with Rust 2024 match ergonomics suggestion #133370
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
Rationale and extra context
The two suggestions conflict, both claim to be
MachineApplicable
, and both lead to errors. Applying the current suggestion for E0507 in Rust 2024 produces the errorwhereas applying the match ergonomics suggestion instead would lead to E0507 suggesting to remove the leading
&
(#132806), taking us back to the start. I'm not sure how best to report this, since it's still a bit confusing with the separate errors giving different advice for the same code. I'll have to ask/see if there's any best practices there.I found this when looking at how my upcoming fix for #132806 would change existing test output. That fix happens to make the E0507 suggestion work on Rust 2024, but I figure they should be tracked separately. @rustbot claim
Other cases
Rust Version
Anything else?
No response
The text was updated successfully, but these errors were encountered: