File tree 3 files changed +7
-7
lines changed
3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 13
13
14
14
fn main ( ) {
15
15
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
17
17
18
18
[ 0 ] [ 0 ] ; // should infer to be a usize
19
19
Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ pub fn main() {
19
19
v[ 3i32 ] ; //~ERROR : std::ops::Index<i32>` is not satisfied
20
20
s. as_bytes ( ) [ 3_usize ] ;
21
21
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
26
26
}
Original file line number Diff line number Diff line change @@ -20,10 +20,10 @@ fn main() {
20
20
let x = & [ 1 , 2 , 3 ] as & [ i32 ] ;
21
21
x[ 1i32 ] ; //~ ERROR E0277
22
22
//~| 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`
24
24
//~| NOTE required because of the requirements on the impl of `std::ops::Index<i32>`
25
25
x[ ..1i32 ] ; //~ ERROR E0277
26
26
//~| 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>`
28
28
//~| NOTE requirements on the impl of `std::ops::Index<std::ops::RangeTo<i32>>`
29
29
}
You can’t perform that action at this time.
0 commit comments