rust/tests/ui/vec.stderr

41 lines
1.1 KiB
Plaintext
Raw Normal View History

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