87efce4fa2
This adds a `àllow-useless-vec-in-test` configuration which, when set to `true` will allow the `useless_vec` lint in `#[test]` functions and code within `#[cfg(test)]`. It also moves a `is_in_test` helper to `clippy_utils`.
12 lines
367 B
Plaintext
12 lines
367 B
Plaintext
error: useless use of `vec!`
|
|
--> tests/ui-toml/useless_vec/useless_vec.rs:8:9
|
|
|
|
|
LL | foo(&vec![1_u32]);
|
|
| ^^^^^^^^^^^^ help: you can use a slice directly: `&[1_u32]`
|
|
|
|
|
= note: `-D clippy::useless-vec` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::useless_vec)]`
|
|
|
|
error: aborting due to 1 previous error
|
|
|