1
Fork 0

fix cfail tests

This commit is contained in:
Jorge Aparicio 2015-01-03 10:45:00 -05:00
parent ca17d08126
commit 7d5b0454e9
101 changed files with 195 additions and 612 deletions

View file

@ -35,7 +35,7 @@ fn main() {
_ => {}
}
let x = |mut y: int| 10i; //~ ERROR: variable does not need to be mutable
let x = |&: mut y: int| 10i; //~ ERROR: variable does not need to be mutable
fn what(mut foo: int) {} //~ ERROR: variable does not need to be mutable
// positive cases
@ -65,7 +65,7 @@ fn main() {
_ => {}
}
let x = |mut y: int| y = 32i;
let x = |&mut: mut y: int| y = 32i;
fn nothing(mut foo: int) { foo = 37i; }
// leading underscore should avoid the warning, just like the
@ -73,7 +73,7 @@ fn main() {
let mut _allowed = 1i;
}
fn callback(f: ||) {}
fn callback<F>(f: F) where F: FnOnce() {}
// make sure the lint attribute can be turned off
#[allow(unused_mut)]