-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NLL: unused_mut lint triggered by for _ in <unreachable>
#54586
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-NLL
Area: Non-lexical lifetimes (NLL)
NLL-diagnostics
Working towards the "diagnostic parity" goal
Milestone
Comments
pnkfelix
added
A-NLL
Area: Non-lexical lifetimes (NLL)
NLL-diagnostics
Working towards the "diagnostic parity" goal
labels
Sep 26, 2018
putting on the RC2 milestone under the assumption that this should be relatively straight-forward to resolve. |
This should be fixed in #54125, when it's merged. |
pietroalbini
added a commit
to pietroalbini/rust
that referenced
this issue
Oct 5, 2018
…nikomatsakis Only warn about unused `mut` in user-written code Fixes rust-lang#54586. r? @pnkfelix cc @blitzerr
pietroalbini
added a commit
to pietroalbini/rust
that referenced
this issue
Oct 23, 2018
…dness-check, r=nikomatsakis Less conservative uninhabitedness check Extends the uninhabitedness check to structs, non-empty enums, tuples and arrays. Pulled out of rust-lang#47291 and rust-lang#50262. Fixes rust-lang#54586. r? @nikomatsakis
bors
added a commit
that referenced
this issue
Dec 20, 2018
…, r=nikomatsakis Less conservative uninhabitedness check Extends the uninhabitedness check to structs, non-empty enums, tuples and arrays. Pulled out of #47291 and #50262. Fixes #54586. r? @nikomatsakis
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Jul 26, 2022
…r=Dylan-DPC remove useless `#[allow]` in a test The mentioned issue, rust-lang#54586 was fixed 4 years ago :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-NLL
Area: Non-lexical lifetimes (NLL)
NLL-diagnostics
Working towards the "diagnostic parity" goal
Consider the following code (play):
It signals the following diagnostic:
Which is pretty nonsensical in appearance.
(It almost certainly arises due to a legitimate
mut
appeared in the expansion offor
. We probably just need to check whether amut
that has been introduced is due to legitimate source code or if its due to an internal expansion, and use that knowledge when we decide whether to signal theunused_mut
lint.)The text was updated successfully, but these errors were encountered: