]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/vec.stderr
Rollup merge of #102345 - chenyukang:fix-102182-impl-trait, r=estebank
[rust.git] / src / tools / clippy / tests / ui / vec.stderr
1 error: useless use of `vec!`
2   --> $DIR/vec.rs:28:14
3    |
4 LL |     on_slice(&vec![]);
5    |              ^^^^^^^ help: you can use a slice directly: `&[]`
6    |
7    = note: `-D clippy::useless-vec` implied by `-D warnings`
8
9 error: useless use of `vec!`
10   --> $DIR/vec.rs:30:18
11    |
12 LL |     on_mut_slice(&mut vec![]);
13    |                  ^^^^^^^^^^^ help: you can use a slice directly: `&mut []`
14
15 error: useless use of `vec!`
16   --> $DIR/vec.rs:32:14
17    |
18 LL |     on_slice(&vec![1, 2]);
19    |              ^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2]`
20
21 error: useless use of `vec!`
22   --> $DIR/vec.rs:34:18
23    |
24 LL |     on_mut_slice(&mut vec![1, 2]);
25    |                  ^^^^^^^^^^^^^^^ help: you can use a slice directly: `&mut [1, 2]`
26
27 error: useless use of `vec!`
28   --> $DIR/vec.rs:36:14
29    |
30 LL |     on_slice(&vec![1, 2]);
31    |              ^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2]`
32
33 error: useless use of `vec!`
34   --> $DIR/vec.rs:38:18
35    |
36 LL |     on_mut_slice(&mut vec![1, 2]);
37    |                  ^^^^^^^^^^^^^^^ help: you can use a slice directly: `&mut [1, 2]`
38
39 error: useless use of `vec!`
40   --> $DIR/vec.rs:40:14
41    |
42 LL |     on_slice(&vec!(1, 2));
43    |              ^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2]`
44
45 error: useless use of `vec!`
46   --> $DIR/vec.rs:42:18
47    |
48 LL |     on_mut_slice(&mut vec![1, 2]);
49    |                  ^^^^^^^^^^^^^^^ help: you can use a slice directly: `&mut [1, 2]`
50
51 error: useless use of `vec!`
52   --> $DIR/vec.rs:44:14
53    |
54 LL |     on_slice(&vec![1; 2]);
55    |              ^^^^^^^^^^^ help: you can use a slice directly: `&[1; 2]`
56
57 error: useless use of `vec!`
58   --> $DIR/vec.rs:46:18
59    |
60 LL |     on_mut_slice(&mut vec![1; 2]);
61    |                  ^^^^^^^^^^^^^^^ help: you can use a slice directly: `&mut [1; 2]`
62
63 error: useless use of `vec!`
64   --> $DIR/vec.rs:63:14
65    |
66 LL |     for a in vec![1, 2, 3] {
67    |              ^^^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2, 3]`
68
69 error: aborting due to 11 previous errors
70