1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
// run-pass // Test that for loops can do what RFC #235 claims fn main() { let mut v = vec![1]; for x in &v { assert_eq!(x, &1); } for x in &mut v { assert_eq!(x, &mut 1); } for x in v { assert_eq!(x, 1); } }