rust/tests/ui-toml/too_large_for_stack/useless_vec.fixed

10 lines
175 B
Rust
Raw Normal View History

2023-09-24 07:56:40 -05:00
#![warn(clippy::useless_vec)]
fn main() {
let x = [0u8; 500];
//~^ ERROR: useless use of `vec!`
x.contains(&1);
let y = vec![0u8; 501];
y.contains(&1);
}