test: Automatically remove all ~[T]
from tests.
This commit is contained in:
parent
0b714b4ba6
commit
579eb2400b
247 changed files with 626 additions and 640 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue