remove all kind annotations from closures
This commit is contained in:
parent
ba2f13ef06
commit
571cc7f8e9
196 changed files with 396 additions and 390 deletions
|
@ -35,7 +35,7 @@ fn main() {
|
|||
_ => {}
|
||||
}
|
||||
|
||||
let x = |&: mut y: isize| 10; //~ ERROR: variable does not need to be mutable
|
||||
let x = |mut y: isize| 10; //~ ERROR: variable does not need to be mutable
|
||||
fn what(mut foo: isize) {} //~ ERROR: variable does not need to be mutable
|
||||
|
||||
// positive cases
|
||||
|
@ -65,7 +65,7 @@ fn main() {
|
|||
_ => {}
|
||||
}
|
||||
|
||||
let x = |&mut: mut y: isize| y = 32;
|
||||
let x = |mut y: isize| y = 32;
|
||||
fn nothing(mut foo: isize) { foo = 37; }
|
||||
|
||||
// leading underscore should avoid the warning, just like the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue