let v: Vec<u8>: v = Vec::new(); let v = vec![1,2,3,4];//注意小写v v.push(1); let third: &i32 = &v[2];//访问越界,panic v.get(2);//注意空情况,一般用match for i in &v { println!("{}",i); } for i in &mut v { *i += 100; }