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