]> git.lizzy.rs Git - rust.git/blob - tests/ui/integral-indexing.stderr
Rollup merge of #106709 - khuey:disable_split_dwarf_inlining_by_default, r=davidtwco
[rust.git] / tests / ui / integral-indexing.stderr
1 error[E0277]: the type `[isize]` cannot be indexed by `u8`
2   --> $DIR/integral-indexing.rs:6:7
3    |
4 LL |     v[3u8];
5    |       ^^^ slice indices are of type `usize` or ranges of `usize`
6    |
7    = help: the trait `SliceIndex<[isize]>` is not implemented for `u8`
8    = help: the trait `SliceIndex<[T]>` is implemented for `usize`
9    = note: required for `Vec<isize>` to implement `Index<u8>`
10
11 error[E0277]: the type `[isize]` cannot be indexed by `i8`
12   --> $DIR/integral-indexing.rs:7:7
13    |
14 LL |     v[3i8];
15    |       ^^^ slice indices are of type `usize` or ranges of `usize`
16    |
17    = help: the trait `SliceIndex<[isize]>` is not implemented for `i8`
18    = help: the trait `SliceIndex<[T]>` is implemented for `usize`
19    = note: required for `Vec<isize>` to implement `Index<i8>`
20
21 error[E0277]: the type `[isize]` cannot be indexed by `u32`
22   --> $DIR/integral-indexing.rs:8:7
23    |
24 LL |     v[3u32];
25    |       ^^^^ slice indices are of type `usize` or ranges of `usize`
26    |
27    = help: the trait `SliceIndex<[isize]>` is not implemented for `u32`
28    = help: the trait `SliceIndex<[T]>` is implemented for `usize`
29    = note: required for `Vec<isize>` to implement `Index<u32>`
30
31 error[E0277]: the type `[isize]` cannot be indexed by `i32`
32   --> $DIR/integral-indexing.rs:9:7
33    |
34 LL |     v[3i32];
35    |       ^^^^ slice indices are of type `usize` or ranges of `usize`
36    |
37    = help: the trait `SliceIndex<[isize]>` is not implemented for `i32`
38    = help: the trait `SliceIndex<[T]>` is implemented for `usize`
39    = note: required for `Vec<isize>` to implement `Index<i32>`
40
41 error[E0277]: the type `[u8]` cannot be indexed by `u8`
42   --> $DIR/integral-indexing.rs:12:18
43    |
44 LL |     s.as_bytes()[3u8];
45    |                  ^^^ slice indices are of type `usize` or ranges of `usize`
46    |
47    = help: the trait `SliceIndex<[u8]>` is not implemented for `u8`
48    = help: the trait `SliceIndex<[T]>` is implemented for `usize`
49    = note: required for `[u8]` to implement `Index<u8>`
50
51 error[E0277]: the type `[u8]` cannot be indexed by `i8`
52   --> $DIR/integral-indexing.rs:13:18
53    |
54 LL |     s.as_bytes()[3i8];
55    |                  ^^^ slice indices are of type `usize` or ranges of `usize`
56    |
57    = help: the trait `SliceIndex<[u8]>` is not implemented for `i8`
58    = help: the trait `SliceIndex<[T]>` is implemented for `usize`
59    = note: required for `[u8]` to implement `Index<i8>`
60
61 error[E0277]: the type `[u8]` cannot be indexed by `u32`
62   --> $DIR/integral-indexing.rs:14:18
63    |
64 LL |     s.as_bytes()[3u32];
65    |                  ^^^^ slice indices are of type `usize` or ranges of `usize`
66    |
67    = help: the trait `SliceIndex<[u8]>` is not implemented for `u32`
68    = help: the trait `SliceIndex<[T]>` is implemented for `usize`
69    = note: required for `[u8]` to implement `Index<u32>`
70
71 error[E0277]: the type `[u8]` cannot be indexed by `i32`
72   --> $DIR/integral-indexing.rs:15:18
73    |
74 LL |     s.as_bytes()[3i32];
75    |                  ^^^^ slice indices are of type `usize` or ranges of `usize`
76    |
77    = help: the trait `SliceIndex<[u8]>` is not implemented for `i32`
78    = help: the trait `SliceIndex<[T]>` is implemented for `usize`
79    = note: required for `[u8]` to implement `Index<i32>`
80
81 error: aborting due to 8 previous errors
82
83 For more information about this error, try `rustc --explain E0277`.