fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.5 KiB35 linesraw
1error[E0277]: the trait bound `[i32]: Index<u32>` is not satisfied
2  --> $DIR/on-impl.rs:22:47
3   |
4LL |     Index::<u32>::index(&[1, 2, 3] as &[i32], 2u32);
5   |     -------------------                       ^^^^ a usize is required to index into a slice
6   |     |
7   |     required by a bound introduced by this call
8   |
9   = help: the trait `Index<u32>` is not implemented for `[i32]`
10   = help: the trait `Index<usize>` is implemented for `[i32]`
11   = help: for that trait implementation, expected `usize`, found `u32`
12
13error[E0277]: the trait bound `[i32]: Index<u32>` is not satisfied
14  --> $DIR/on-impl.rs:22:5
15   |
16LL |     Index::<u32>::index(&[1, 2, 3] as &[i32], 2u32);
17   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ a usize is required to index into a slice
18   |
19   = help: the trait `Index<u32>` is not implemented for `[i32]`
20   = help: the trait `Index<usize>` is implemented for `[i32]`
21   = help: for that trait implementation, expected `usize`, found `u32`
22
23error[E0277]: the trait bound `[i32]: Index<u32>` is not satisfied
24  --> $DIR/on-impl.rs:22:5
25   |
26LL |     Index::<u32>::index(&[1, 2, 3] as &[i32], 2u32);
27   |     ^^^^^^^^^^^^^^^^^^^ a usize is required to index into a slice
28   |
29   = help: the trait `Index<u32>` is not implemented for `[i32]`
30   = help: the trait `Index<usize>` is implemented for `[i32]`
31   = help: for that trait implementation, expected `usize`, found `u32`
32
33error: aborting due to 3 previous errors
34
35For more information about this error, try `rustc --explain E0277`.