1 error: useless use of `vec!`
4 LL | on_slice(&vec![]);
5 | ^^^^^^^ help: you can use a slice directly: `&[]`
7 = note: `-D clippy::useless-vec` implied by `-D warnings`
9 error: useless use of `vec!`
12 LL | on_slice(&vec![1, 2]);
13 | ^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2]`
15 error: useless use of `vec!`
18 LL | on_slice(&vec![1, 2]);
19 | ^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2]`
21 error: useless use of `vec!`
24 LL | on_slice(&vec!(1, 2));
25 | ^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2]`
27 error: useless use of `vec!`
30 LL | on_slice(&vec![1; 2]);
31 | ^^^^^^^^^^^ help: you can use a slice directly: `&[1; 2]`
33 error: useless use of `vec!`
36 LL | for a in vec![1, 2, 3] {
37 | ^^^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2, 3]`
39 error: aborting due to 6 previous errors