rust-clippy/tests/ui/vec.stderr

41 lines
1.1 KiB
Text
Raw Normal View History

error: useless use of `vec!`
2018-10-06 16:18:06 +00:00
--> $DIR/vec.rs:34:14
|
2018-10-06 16:18:06 +00:00
34 | on_slice(&vec![]);
2017-07-21 08:40:23 +00:00
| ^^^^^^^ help: you can use a slice directly: `&[]`
|
= note: `-D clippy::useless-vec` implied by `-D warnings`
error: useless use of `vec!`
2018-10-06 16:18:06 +00:00
--> $DIR/vec.rs:37:14
|
2018-10-06 16:18:06 +00:00
37 | on_slice(&vec![1, 2]);
2017-07-21 08:40:23 +00:00
| ^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2]`
error: useless use of `vec!`
2018-10-06 16:18:06 +00:00
--> $DIR/vec.rs:40:14
|
2018-10-06 16:18:06 +00:00
40 | on_slice(&vec ![1, 2]);
2017-07-21 08:40:23 +00:00
| ^^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2]`
error: useless use of `vec!`
2018-10-06 16:18:06 +00:00
--> $DIR/vec.rs:43:14
|
2018-10-06 16:18:06 +00:00
43 | on_slice(&vec!(1, 2));
2017-07-21 08:40:23 +00:00
| ^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2]`
error: useless use of `vec!`
2018-10-06 16:18:06 +00:00
--> $DIR/vec.rs:46:14
|
2018-10-06 16:18:06 +00:00
46 | on_slice(&vec![1; 2]);
2017-07-21 08:40:23 +00:00
| ^^^^^^^^^^^ help: you can use a slice directly: `&[1; 2]`
error: useless use of `vec!`
2018-10-06 16:18:06 +00:00
--> $DIR/vec.rs:59:14
|
2018-10-06 16:18:06 +00:00
59 | for a in vec![1, 2, 3] {
2017-07-21 08:40:23 +00:00
| ^^^^^^^^^^^^^ help: you can use a slice directly: `&[1, 2, 3]`
2018-01-16 16:06:27 +00:00
error: aborting due to 6 previous errors