1
Fork 0

test: Automatically remove all ~[T] from tests.

This commit is contained in:
Patrick Walton 2014-03-05 14:02:44 -08:00 committed by Huon Wilson
parent 0b714b4ba6
commit 579eb2400b
247 changed files with 626 additions and 640 deletions

View file

@ -21,7 +21,7 @@ fn main() {
let mut a = 3; //~ ERROR: variable does not need to be mutable
let mut a = 2; //~ ERROR: variable does not need to be mutable
let mut b = 3; //~ ERROR: variable does not need to be mutable
let mut a = ~[3]; //~ ERROR: variable does not need to be mutable
let mut a = vec!(3); //~ ERROR: variable does not need to be mutable
let (mut a, b) = (1, 2); //~ ERROR: variable does not need to be mutable
match 30 {
@ -34,9 +34,9 @@ fn main() {
// positive cases
let mut a = 2;
a = 3;
let mut a = ~[];
let mut a = Vec::new();
a.push(3);
let mut a = ~[];
let mut a = Vec::new();
callback(|| {
a.push(3);
});
@ -63,5 +63,5 @@ fn callback(f: ||) {}
#[allow(unused_mut)]
fn foo(mut a: int) {
let mut a = 3;
let mut b = ~[2];
let mut b = vec!(2);
}