|
1 | 1 | error: useless use of `vec!`
|
2 |
| - --> $DIR/vec.rs:35:14 |
| 2 | + --> $DIR/vec.rs:30:14 |
3 | 3 | |
|
4 | 4 | LL | on_slice(&vec![]);
|
5 | 5 | | ^^^^^^^ help: you can use a slice directly: `&[]`
|
6 | 6 | |
|
7 | 7 | = note: `-D clippy::useless-vec` implied by `-D warnings`
|
8 | 8 |
|
9 | 9 | error: useless use of `vec!`
|
10 |
| - --> $DIR/vec.rs:37:18 |
| 10 | + --> $DIR/vec.rs:32:18 |
11 | 11 | |
|
12 | 12 | LL | on_mut_slice(&mut vec![]);
|
13 | 13 | | ^^^^^^^^^^^ help: you can use a slice directly: `&mut []`
|
14 | 14 |
|
15 | 15 | error: useless use of `vec!`
|
16 |
| - --> $DIR/vec.rs:39:14 |
| 16 | + --> $DIR/vec.rs:34:14 |
17 | 17 | |
|
18 | 18 | LL | on_slice(&vec![1, 2]);
|
19 | 19 | | ^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2]`
|
20 | 20 |
|
21 | 21 | error: useless use of `vec!`
|
22 |
| - --> $DIR/vec.rs:41:18 |
| 22 | + --> $DIR/vec.rs:36:18 |
23 | 23 | |
|
24 | 24 | LL | on_mut_slice(&mut vec![1, 2]);
|
25 | 25 | | ^^^^^^^^^^^^^^^ help: you can use a slice directly: `&mut [1, 2]`
|
26 | 26 |
|
27 | 27 | error: useless use of `vec!`
|
28 |
| - --> $DIR/vec.rs:43:14 |
| 28 | + --> $DIR/vec.rs:38:14 |
29 | 29 | |
|
30 | 30 | LL | on_slice(&vec![1, 2]);
|
31 | 31 | | ^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2]`
|
32 | 32 |
|
33 | 33 | error: useless use of `vec!`
|
34 |
| - --> $DIR/vec.rs:45:18 |
| 34 | + --> $DIR/vec.rs:40:18 |
35 | 35 | |
|
36 | 36 | LL | on_mut_slice(&mut vec![1, 2]);
|
37 | 37 | | ^^^^^^^^^^^^^^^ help: you can use a slice directly: `&mut [1, 2]`
|
38 | 38 |
|
39 | 39 | error: useless use of `vec!`
|
40 |
| - --> $DIR/vec.rs:47:14 |
| 40 | + --> $DIR/vec.rs:42:14 |
41 | 41 | |
|
42 | 42 | LL | on_slice(&vec!(1, 2));
|
43 | 43 | | ^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2]`
|
44 | 44 |
|
45 | 45 | error: useless use of `vec!`
|
46 |
| - --> $DIR/vec.rs:49:18 |
| 46 | + --> $DIR/vec.rs:44:18 |
47 | 47 | |
|
48 | 48 | LL | on_mut_slice(&mut vec![1, 2]);
|
49 | 49 | | ^^^^^^^^^^^^^^^ help: you can use a slice directly: `&mut [1, 2]`
|
50 | 50 |
|
51 | 51 | error: useless use of `vec!`
|
52 |
| - --> $DIR/vec.rs:51:14 |
| 52 | + --> $DIR/vec.rs:46:14 |
53 | 53 | |
|
54 | 54 | LL | on_slice(&vec![1; 2]);
|
55 | 55 | | ^^^^^^^^^^^ help: you can use a slice directly: `&[1; 2]`
|
56 | 56 |
|
57 | 57 | error: useless use of `vec!`
|
58 |
| - --> $DIR/vec.rs:53:18 |
| 58 | + --> $DIR/vec.rs:48:18 |
59 | 59 | |
|
60 | 60 | LL | on_mut_slice(&mut vec![1; 2]);
|
61 | 61 | | ^^^^^^^^^^^^^^^ help: you can use a slice directly: `&mut [1; 2]`
|
62 | 62 |
|
63 | 63 | error: useless use of `vec!`
|
64 |
| - --> $DIR/vec.rs:79:19 |
| 64 | + --> $DIR/vec.rs:74:19 |
65 | 65 | |
|
66 | 66 | LL | let _x: i32 = vec![1, 2, 3].iter().sum();
|
67 | 67 | | ^^^^^^^^^^^^^ help: you can use an array directly: `[1, 2, 3]`
|
68 | 68 |
|
69 | 69 | error: useless use of `vec!`
|
70 |
| - --> $DIR/vec.rs:82:17 |
| 70 | + --> $DIR/vec.rs:77:17 |
71 | 71 | |
|
72 | 72 | LL | let mut x = vec![1, 2, 3];
|
73 | 73 | | ^^^^^^^^^^^^^ help: you can use an array directly: `[1, 2, 3]`
|
74 | 74 |
|
75 | 75 | error: useless use of `vec!`
|
76 |
| - --> $DIR/vec.rs:88:22 |
| 76 | + --> $DIR/vec.rs:83:22 |
77 | 77 | |
|
78 | 78 | LL | let _x: &[i32] = &vec![1, 2, 3];
|
79 | 79 | | ^^^^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2, 3]`
|
80 | 80 |
|
81 | 81 | error: useless use of `vec!`
|
82 |
| - --> $DIR/vec.rs:90:14 |
| 82 | + --> $DIR/vec.rs:85:14 |
83 | 83 | |
|
84 | 84 | LL | for _ in vec![1, 2, 3] {}
|
85 | 85 | | ^^^^^^^^^^^^^ help: you can use an array directly: `[1, 2, 3]`
|
86 | 86 |
|
87 | 87 | error: useless use of `vec!`
|
88 |
| - --> $DIR/vec.rs:128:20 |
| 88 | + --> $DIR/vec.rs:124:20 |
89 | 89 | |
|
90 | 90 | LL | for _string in vec![repro!(true), repro!(null)] {
|
91 | 91 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[repro!(true), repro!(null)]`
|
92 | 92 |
|
93 | 93 | error: useless use of `vec!`
|
94 |
| - --> $DIR/vec.rs:145:18 |
| 94 | + --> $DIR/vec.rs:141:18 |
95 | 95 | |
|
96 | 96 | LL | in_macro!(1, vec![1, 2], vec![1; 2]);
|
97 | 97 | | ^^^^^^^^^^ help: you can use an array directly: `[1, 2]`
|
98 | 98 |
|
99 | 99 | error: useless use of `vec!`
|
100 |
| - --> $DIR/vec.rs:145:30 |
| 100 | + --> $DIR/vec.rs:141:30 |
101 | 101 | |
|
102 | 102 | LL | in_macro!(1, vec![1, 2], vec![1; 2]);
|
103 | 103 | | ^^^^^^^^^^ help: you can use an array directly: `[1; 2]`
|
104 | 104 |
|
105 | 105 | error: useless use of `vec!`
|
106 |
| - --> $DIR/vec.rs:164:14 |
| 106 | + --> $DIR/vec.rs:160:14 |
107 | 107 | |
|
108 | 108 | LL | for a in vec![1, 2, 3] {
|
109 | 109 | | ^^^^^^^^^^^^^ help: you can use an array directly: `[1, 2, 3]`
|
110 | 110 |
|
111 | 111 | error: useless use of `vec!`
|
112 |
| - --> $DIR/vec.rs:168:14 |
| 112 | + --> $DIR/vec.rs:164:14 |
113 | 113 | |
|
114 | 114 | LL | for a in vec![String::new(), String::new()] {
|
115 | 115 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[String::new(), String::new()]`
|
|
0 commit comments