fork/rust

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

borsAuto merge of #69444 - pietroalbini:stable-next-final-v2-new, r=pietroalbinif3e1a954d2e

1.41.1
909 B21 linesraw
1error[E0277]: the type `[i32]` cannot be indexed by `i32`
2  --> $DIR/slice-index.rs:8:5
3   |
4LL |     x[1i32];
5   |     ^^^^^^^ slice indices are of type `usize` or ranges of `usize`
6   |
7   = help: the trait `std::slice::SliceIndex<[i32]>` is not implemented for `i32`
8   = note: required because of the requirements on the impl of `std::ops::Index<i32>` for `[i32]`
9
10error[E0277]: the type `[i32]` cannot be indexed by `std::ops::RangeTo<i32>`
11  --> $DIR/slice-index.rs:9:5
12   |
13LL |     x[..1i32];
14   |     ^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
15   |
16   = help: the trait `std::slice::SliceIndex<[i32]>` is not implemented for `std::ops::RangeTo<i32>`
17   = note: required because of the requirements on the impl of `std::ops::Index<std::ops::RangeTo<i32>>` for `[i32]`
18
19error: aborting due to 2 previous errors
20
21For more information about this error, try `rustc --explain E0277`.