2 let v: Vec<isize> = vec![0, 1, 2, 3, 4, 5];
3 let s: String = "abcdef".to_string();
6 v[3u8]; //~ERROR : the type `[isize]` cannot be indexed by `u8`
7 v[3i8]; //~ERROR : the type `[isize]` cannot be indexed by `i8`
8 v[3u32]; //~ERROR : the type `[isize]` cannot be indexed by `u32`
9 v[3i32]; //~ERROR : the type `[isize]` cannot be indexed by `i32`
10 s.as_bytes()[3_usize];
12 s.as_bytes()[3u8]; //~ERROR : the type `[u8]` cannot be indexed by `u8`
13 s.as_bytes()[3i8]; //~ERROR : the type `[u8]` cannot be indexed by `i8`
14 s.as_bytes()[3u32]; //~ERROR : the type `[u8]` cannot be indexed by `u32`
15 s.as_bytes()[3i32]; //~ERROR : the type `[u8]` cannot be indexed by `i32`