-
-
Notifications
You must be signed in to change notification settings - Fork 17.4k
"patterns are not allowed to reset the default binding mode" suggestion means nothing to me #133854
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-edition-2024Area: The 2024 editionArea: The 2024 editionA-patternsRelating to patterns and pattern matchingRelating to patterns and pattern matchingA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`D-confusingDiagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint that should be reworked.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.
Description
Activity
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-edition-2024Area: The 2024 editionArea: The 2024 editionA-patternsRelating to patterns and pattern matchingRelating to patterns and pattern matchingA-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`D-confusingDiagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint that should be reworked.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.
Code
Current output
Desired output
Rationale and extra context
Presented with this error, I was completely stumped. I have no idea what the suggestion is attempting to get me to do.
I do not think the word "desugar" is useful here because it's not obvious to me (a) that there was sugar and (b) what the sugaring was. Without that knowledge, the suggestion is non-actionable.
After minutes of reading/reducing/reproducing the problem, I finally realized that that the
-part of the-^^^^^^^^^^^^^^^was pointing to the parenthesis and not to the&, so I tried adding it and it compiled.Additionally, I worry that "default binding mode" is not an established / well-known terminology so there's not much meat from that message for me to go on either.
Rust Version