Add a lint for lets/matches which won't do anything #11122
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
in other words irrefutable ones without any bindings. This will be useful once the semantics of
_
in patterns changes to "ignore" instead of "drop" (#10488). Closes #11088.For now it defaults to "allow", so I don't think there's any harm in this going in before #10488 itself, but please DON'T r+ this unless you're in a position to decide (or it has been decided).
If I run the tests with it set to "deny", things break in all of the expected places, with the exception that
deriving
code for unit structs also appears to trigger it. That should presumably be fixed before it gets changed to something other than "allow" (along with of course the expected failures).