1
Fork 0

remove all kind annotations from closures

This commit is contained in:
Jorge Aparicio 2015-02-01 12:44:15 -05:00
parent ba2f13ef06
commit 571cc7f8e9
196 changed files with 396 additions and 390 deletions

View file

@ -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