rust/tests/ui/vec.stderr

41 lines
1.1 KiB
Plaintext
Raw Normal View History

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