2017-02-07 14:05:30 -06:00
|
|
|
error: useless use of `vec!`
|
|
|
|
--> $DIR/vec.rs:24:14
|
|
|
|
|
|
|
|
|
24 | on_slice(&vec![]);
|
2017-05-03 05:51:47 -05:00
|
|
|
| ^^^^^^^ help: you can use a slice directly `&[]`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
|
note: lint level defined here
|
|
|
|
--> $DIR/vec.rs:4:9
|
|
|
|
|
|
|
|
|
4 | #![deny(useless_vec)]
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: useless use of `vec!`
|
2017-05-11 10:07:49 -05:00
|
|
|
--> $DIR/vec.rs:27:14
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 10:07:49 -05:00
|
|
|
27 | on_slice(&vec![1, 2]);
|
2017-05-03 05:51:47 -05:00
|
|
|
| ^^^^^^^^^^^ help: you can use a slice directly `&[1, 2]`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: useless use of `vec!`
|
2017-05-11 10:07:49 -05:00
|
|
|
--> $DIR/vec.rs:30:14
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 10:07:49 -05:00
|
|
|
30 | on_slice(&vec ![1, 2]);
|
2017-05-03 05:51:47 -05:00
|
|
|
| ^^^^^^^^^^^^ help: you can use a slice directly `&[1, 2]`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: useless use of `vec!`
|
2017-05-11 10:07:49 -05:00
|
|
|
--> $DIR/vec.rs:33:14
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 10:07:49 -05:00
|
|
|
33 | on_slice(&vec!(1, 2));
|
2017-05-03 05:51:47 -05:00
|
|
|
| ^^^^^^^^^^^ help: you can use a slice directly `&[1, 2]`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: useless use of `vec!`
|
2017-05-11 10:07:49 -05:00
|
|
|
--> $DIR/vec.rs:36:14
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 10:07:49 -05:00
|
|
|
36 | on_slice(&vec![1; 2]);
|
2017-05-03 05:51:47 -05:00
|
|
|
| ^^^^^^^^^^^ help: you can use a slice directly `&[1; 2]`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: useless use of `vec!`
|
2017-05-11 10:07:49 -05:00
|
|
|
--> $DIR/vec.rs:49:14
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 10:07:49 -05:00
|
|
|
49 | for a in vec![1, 2, 3] {
|
2017-05-03 05:51:47 -05:00
|
|
|
| ^^^^^^^^^^^^^ help: you can use a slice directly `&[1, 2, 3]`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: aborting due to 6 previous errors
|
|
|
|
|