Mutable empty vector for numbers (push)



examples/vectors/mutable-empty-vector-for-integers/src/main.rs
fn main() {
    let mut names = vec![];
    println!("{:?}", names);

    names.push(23);

    // names.push("hello"); // error[E0308]: mismatched types - expected integer, found `&str`
    // names.push(3.14);    // error[E0308]: mismatched types - expected integer, found floating-point number
    names.push(19);

    println!("{:?}", names);
    for name in names {
        println!("{}", name);
    }
}

[]
[23, 19]
23
19