绑定与引用

Rust 表达式与控制流

let v = vec![1, 2, 3, 4, 5]; // v: Vec<i32>

let v = vec![0; 10]; // A vector of ten zeroes.

let v = vec![1, 2, 3, 4, 5];

println!("The third element of v is {}", v[2]);
fn main() {
    println!("{}", "These
are
three lines");
}

fn main() {
println!("{}", "These\n\
    are\n\
    three lines");
}