File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1313
1414fn 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
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments