6 fn on_slice(_: &[u8]) {}
8 fn on_vec(_: &Vec<u8>) {}
12 //~^ ERROR useless use of `vec!`
14 //~| SUGGESTION on_slice(&[])
17 on_slice(&vec![1, 2]);
18 //~^ ERROR useless use of `vec!`
20 //~| SUGGESTION on_slice(&[1, 2])
23 on_slice(&vec ![1, 2]);
24 //~^ ERROR useless use of `vec!`
26 //~| SUGGESTION on_slice(&[1, 2])
29 on_slice(&vec!(1, 2));
30 //~^ ERROR useless use of `vec!`
32 //~| SUGGESTION on_slice(&[1, 2])
35 on_slice(&vec![1; 2]);
36 //~^ ERROR useless use of `vec!`
38 //~| SUGGESTION on_slice(&[1; 2])
45 for a in vec![1, 2, 3] {
46 //~^ ERROR useless use of `vec!`
48 //~| SUGGESTION for a in &[1, 2, 3] {