We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 26ddd46 commit 7f4e9c9Copy full SHA for 7f4e9c9
src/test/compile-fail/integral-indexing.rs
@@ -13,10 +13,10 @@ pub fn main() {
13
let s: String = "abcdef".to_string();
14
v[3_usize];
15
v[3];
16
- v[3u8]; //~ERROR : std::ops::Index<u8>` is not satisfied
17
- v[3i8]; //~ERROR : std::ops::Index<i8>` is not satisfied
18
- v[3u32]; //~ERROR : std::ops::Index<u32>` is not satisfied
19
- v[3i32]; //~ERROR : std::ops::Index<i32>` is not satisfied
+ v[3u8]; //~ERROR : std::slice::SliceIndex<[isize]>` is not satisfied
+ v[3i8]; //~ERROR : std::slice::SliceIndex<[isize]>` is not satisfied
+ v[3u32]; //~ERROR : std::slice::SliceIndex<[isize]>` is not satisfied
+ v[3i32]; //~ERROR : std::slice::SliceIndex<[isize]>` is not satisfied
20
s.as_bytes()[3_usize];
21
s.as_bytes()[3];
22
s.as_bytes()[3u8]; //~ERROR : std::slice::SliceIndex<[u8]>` is not satisfied
0 commit comments