-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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 erroneous Warning: variable does not need to be mutable #50461
Comments
this is probably related to the recent changes to do the use-of-mut checks without requiring AST-borrowck. |
i.e. this is probably related to PR #48605 |
cc me |
Hmm... I think this bug is highlighted by @pnkfelix a couple of days ago, and it's regarding this branch: rust/src/librustc_mir/borrow_check/mod.rs Lines 1711 to 1716 in 8ff4b42
Or perhaps in the branch further down as well: rust/src/librustc_mir/borrow_check/mod.rs Lines 1805 to 1810 in 8ff4b42
I suspect it's the latter, because the MIR generated by the code above contains two move assignment statements. Either way, these two branches should really contain the used mut variables logic. |
gives:
If I remove the mut then I get a compile error.
Compiled with nightly-2018-05-05
This is not related to #50343 as that has been fixed in the nightly I am using.
The text was updated successfully, but these errors were encountered: