1 // Test mutability and slicing syntax.
4 let x: &[isize] = &[1, 2, 3, 4, 5];
5 // Immutable slices are not mutable.
7 let y: &mut[_] = &x[2..4];
8 //~^ ERROR mismatched types
9 //~| expected type `&mut [_]`
10 //~| found type `&[isize]`
11 //~| types differ in mutability