rust/src/test/ui/integral-indexing.stderr
2018-12-25 21:08:33 -07:00

76 lines
3.8 KiB
Plaintext

error[E0277]: the trait bound `u8: std::slice::SliceIndex<[isize]>` is not satisfied
--> $DIR/integral-indexing.rs:6:5
|
LL | v[3u8]; //~ERROR : std::slice::SliceIndex<[isize]>` is not satisfied
| ^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[isize]>` is not implemented for `u8`
= note: required because of the requirements on the impl of `std::ops::Index<u8>` for `std::vec::Vec<isize>`
error[E0277]: the trait bound `i8: std::slice::SliceIndex<[isize]>` is not satisfied
--> $DIR/integral-indexing.rs:7:5
|
LL | v[3i8]; //~ERROR : std::slice::SliceIndex<[isize]>` is not satisfied
| ^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[isize]>` is not implemented for `i8`
= note: required because of the requirements on the impl of `std::ops::Index<i8>` for `std::vec::Vec<isize>`
error[E0277]: the trait bound `u32: std::slice::SliceIndex<[isize]>` is not satisfied
--> $DIR/integral-indexing.rs:8:5
|
LL | v[3u32]; //~ERROR : std::slice::SliceIndex<[isize]>` is not satisfied
| ^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[isize]>` is not implemented for `u32`
= note: required because of the requirements on the impl of `std::ops::Index<u32>` for `std::vec::Vec<isize>`
error[E0277]: the trait bound `i32: std::slice::SliceIndex<[isize]>` is not satisfied
--> $DIR/integral-indexing.rs:9:5
|
LL | v[3i32]; //~ERROR : std::slice::SliceIndex<[isize]>` is not satisfied
| ^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[isize]>` is not implemented for `i32`
= note: required because of the requirements on the impl of `std::ops::Index<i32>` for `std::vec::Vec<isize>`
error[E0277]: the trait bound `u8: std::slice::SliceIndex<[u8]>` is not satisfied
--> $DIR/integral-indexing.rs:12:5
|
LL | s.as_bytes()[3u8]; //~ERROR : std::slice::SliceIndex<[u8]>` is not satisfied
| ^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `u8`
= note: required because of the requirements on the impl of `std::ops::Index<u8>` for `[u8]`
error[E0277]: the trait bound `i8: std::slice::SliceIndex<[u8]>` is not satisfied
--> $DIR/integral-indexing.rs:13:5
|
LL | s.as_bytes()[3i8]; //~ERROR : std::slice::SliceIndex<[u8]>` is not satisfied
| ^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `i8`
= note: required because of the requirements on the impl of `std::ops::Index<i8>` for `[u8]`
error[E0277]: the trait bound `u32: std::slice::SliceIndex<[u8]>` is not satisfied
--> $DIR/integral-indexing.rs:14:5
|
LL | s.as_bytes()[3u32]; //~ERROR : std::slice::SliceIndex<[u8]>` is not satisfied
| ^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `u32`
= note: required because of the requirements on the impl of `std::ops::Index<u32>` for `[u8]`
error[E0277]: the trait bound `i32: std::slice::SliceIndex<[u8]>` is not satisfied
--> $DIR/integral-indexing.rs:15:5
|
LL | s.as_bytes()[3i32]; //~ERROR : std::slice::SliceIndex<[u8]>` is not satisfied
| ^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `i32`
= note: required because of the requirements on the impl of `std::ops::Index<i32>` for `[u8]`
error: aborting due to 8 previous errors
For more information about this error, try `rustc --explain E0277`.