]> git.lizzy.rs Git - rust.git/blob - src/test/ui/indexing-requires-a-uint.stderr
Remove licenses
[rust.git] / src / test / ui / indexing-requires-a-uint.stderr
1 error[E0277]: the trait bound `u8: std::slice::SliceIndex<[{integer}]>` is not satisfied
2   --> $DIR/indexing-requires-a-uint.rs:6:5
3    |
4 LL |     [0][0u8]; //~ ERROR: the trait bound `u8: std::slice::SliceIndex<[{integer}]>` is not satisfied
5    |     ^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
6    |
7    = help: the trait `std::slice::SliceIndex<[{integer}]>` is not implemented for `u8`
8    = note: required because of the requirements on the impl of `std::ops::Index<u8>` for `[{integer}]`
9
10 error[E0308]: mismatched types
11   --> $DIR/indexing-requires-a-uint.rs:12:18
12    |
13 LL |     bar::<isize>(i);  // i should not be re-coerced back to an isize
14    |                  ^ expected isize, found usize
15
16 error: aborting due to 2 previous errors
17
18 Some errors occurred: E0277, E0308.
19 For more information about an error, try `rustc --explain E0277`.