]> git.lizzy.rs Git - rust.git/blob - clippy_tests/examples/vec.stderr
2cdfbd116e71b50b3ec9bedf852912be49b662b6
[rust.git] / clippy_tests / examples / vec.stderr
1 error: useless use of `vec!`
2   --> vec.rs:24:14
3    |
4 24 |     on_slice(&vec![]);
5    |              ^^^^^^^ help: you can use a slice directly `&[]`
6    |
7    = note: `-D useless-vec` implied by `-D warnings`
8
9 error: useless use of `vec!`
10   --> vec.rs:27:14
11    |
12 27 |     on_slice(&vec![1, 2]);
13    |              ^^^^^^^^^^^ help: you can use a slice directly `&[1, 2]`
14    |
15    = note: `-D useless-vec` implied by `-D warnings`
16
17 error: useless use of `vec!`
18   --> vec.rs:30:14
19    |
20 30 |     on_slice(&vec ![1, 2]);
21    |              ^^^^^^^^^^^^ help: you can use a slice directly `&[1, 2]`
22    |
23    = note: `-D useless-vec` implied by `-D warnings`
24
25 error: useless use of `vec!`
26   --> vec.rs:33:14
27    |
28 33 |     on_slice(&vec!(1, 2));
29    |              ^^^^^^^^^^^ help: you can use a slice directly `&[1, 2]`
30    |
31    = note: `-D useless-vec` implied by `-D warnings`
32
33 error: useless use of `vec!`
34   --> vec.rs:36:14
35    |
36 36 |     on_slice(&vec![1; 2]);
37    |              ^^^^^^^^^^^ help: you can use a slice directly `&[1; 2]`
38    |
39    = note: `-D useless-vec` implied by `-D warnings`
40
41 error: useless use of `vec!`
42   --> vec.rs:49:14
43    |
44 49 |     for a in vec![1, 2, 3] {
45    |              ^^^^^^^^^^^^^ help: you can use a slice directly `&[1, 2, 3]`
46    |
47    = note: `-D useless-vec` implied by `-D warnings`
48
49 error: aborting due to previous error(s)
50
51 error: Could not compile `clippy_tests`.
52
53 To learn more, run the command again with --verbose.