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? 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
fn x() -> i32 { let mut a : i32 = 4; a = 5; a }
warning: value assigned to a is never read, #[warn(unused_assignments)] on by default
a
fn y(mut a: i32) -> i32 { a = 3; a }
Does not warn, even though it has pretty much the same problem. In this case, the value passed in is never used.
The text was updated successfully, but these errors were encountered:
Auto merge of #29536 - sanxiyn:unused-assign-arg, r=alexcrichton
4ee11cd
Fix #29136.
No branches or pull requests
warning: value assigned to
a
is never read, #[warn(unused_assignments)] on by defaultDoes not warn, even though it has pretty much the same problem. In this case, the value passed in is never used.
The text was updated successfully, but these errors were encountered: