Warn unused_assignments for arguments
This commit is contained in:
parent
b7fbfb658e
commit
61e5b6dfdb
2 changed files with 26 additions and 4 deletions
|
|
@ -27,4 +27,14 @@ fn f3() {
|
|||
x = 4; //~ ERROR: value assigned to `x` is never read
|
||||
}
|
||||
|
||||
fn f4(mut x: i32) { //~ ERROR: value passed to `x` is never read
|
||||
x = 4;
|
||||
x.clone();
|
||||
}
|
||||
|
||||
fn f5(mut x: i32) {
|
||||
x.clone();
|
||||
x = 4; //~ ERROR: value assigned to `x` is never read
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue