about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/useless_vec.rs
blob: 880809f81d7ae939ab5c8f408faf7d4c618155db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//@no-rustfix: no suggestions

#![warn(clippy::useless_vec)]

// Regression test for <https://github.com/rust-lang/rust-clippy/issues/13692>.
fn foo() {
    // There should be no suggestion in this case.
    let _some_variable = vec![
        //~^ useless_vec
        1, 2, // i'm here to stay
        3, 4, // but this one going away ;-;
    ]; // that is life anyways
}

fn main() {}