Skip to content

Commit 53a3692

Browse files
committed
Fix the tests
1 parent 99e4c0a commit 53a3692

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/test/compile-fail/indexing-requires-a-uint.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
fn main() {
1515
fn bar<T>(_: T) {}
16-
[0][0u8]; //~ ERROR: the trait bound `u8: std::slice::SliceIndex<{integer}>` is not satisfied
16+
[0][0u8]; //~ ERROR: the trait bound `u8: std::slice::SliceIndex<[{integer}]>` is not satisfied
1717

1818
[0][0]; // should infer to be a usize
1919

src/test/compile-fail/integral-indexing.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ pub fn main() {
1919
v[3i32]; //~ERROR : std::ops::Index<i32>` is not satisfied
2020
s.as_bytes()[3_usize];
2121
s.as_bytes()[3];
22-
s.as_bytes()[3u8]; //~ERROR : std::slice::SliceIndex<u8>` is not satisfied
23-
s.as_bytes()[3i8]; //~ERROR : std::slice::SliceIndex<u8>` is not satisfied
24-
s.as_bytes()[3u32]; //~ERROR : std::slice::SliceIndex<u8>` is not satisfied
25-
s.as_bytes()[3i32]; //~ERROR : std::slice::SliceIndex<u8>` is not satisfied
22+
s.as_bytes()[3u8]; //~ERROR : std::slice::SliceIndex<[u8]>` is not satisfied
23+
s.as_bytes()[3i8]; //~ERROR : std::slice::SliceIndex<[u8]>` is not satisfied
24+
s.as_bytes()[3u32]; //~ERROR : std::slice::SliceIndex<[u8]>` is not satisfied
25+
s.as_bytes()[3i32]; //~ERROR : std::slice::SliceIndex<[u8]>` is not satisfied
2626
}

src/test/compile-fail/on-unimplemented/slice-index.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ fn main() {
2020
let x = &[1, 2, 3] as &[i32];
2121
x[1i32]; //~ ERROR E0277
2222
//~| NOTE slice indices are of type `usize` or ranges of `usize`
23-
//~| NOTE trait `std::slice::SliceIndex<i32>` is not implemented for `i32`
23+
//~| NOTE trait `std::slice::SliceIndex<[i32]>` is not implemented for `i32`
2424
//~| NOTE required because of the requirements on the impl of `std::ops::Index<i32>`
2525
x[..1i32]; //~ ERROR E0277
2626
//~| NOTE slice indices are of type `usize` or ranges of `usize`
27-
//~| NOTE trait `std::slice::SliceIndex<i32>` is not implemented for `std::ops::RangeTo<i32>`
27+
//~| NOTE trait `std::slice::SliceIndex<[i32]>` is not implemented for `std::ops::RangeTo<i32>`
2828
//~| NOTE requirements on the impl of `std::ops::Index<std::ops::RangeTo<i32>>`
2929
}

0 commit comments

Comments
 (0)