We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
The following code:
#![feature(unboxed_closures)] fn main() { let mut zarp: Vec<int> = Vec::new(); let cls = move |&mut:| { zarp.push(3); }; }
Generates the following warning:
warning: variable does not need to be mutable, #[warn(unused_mut)] on by default let mut zarp: Vec<int> = Vec::new();
However if I remove the mut from zarp it fails to compile (as it should).
mut
zarp
The text was updated successfully, but these errors were encountered:
I thought I fixed this, but I guess I missed a case.
Sorry, something went wrong.
Fix upvars sometimes not being marked as used mutably
fb4e618
Drill down the loan path for McDeclared references as well since it might lead to an upvar. Closes rust-lang#18769
Update test to cover rust-lang#18769
c0a7d55
auto merge of #18802 : bkoropoff/rust/issue-18769, r=luqmana
a30b72b
Drill down the loan path for `McDeclared` references as well since it might lead to an upvar. Closes #18769
Successfully merging a pull request may close this issue.
The following code:
Generates the following warning:
However if I remove the
mut
fromzarp
it fails to compile (as it should).The text was updated successfully, but these errors were encountered: