1 error[E0277]: the type `str` cannot be indexed by `{integer}`
2 --> $DIR/str-idx.rs:3:19
5 | ^ string indices are ranges of `usize`
7 = help: the trait `SliceIndex<str>` is not implemented for `{integer}`
8 = note: you can use `.chars().nth()` or `.bytes().nth()`
9 for more information, see chapter 8 in The Book: <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>
10 = help: the trait `SliceIndex<[T]>` is implemented for `usize`
11 = note: required for `str` to implement `Index<{integer}>`
13 error[E0277]: the type `str` cannot be indexed by `{integer}`
14 --> $DIR/str-idx.rs:4:19
16 LL | let _ = s.get(4);
17 | --- ^ string indices are ranges of `usize`
19 | required by a bound introduced by this call
21 = help: the trait `SliceIndex<str>` is not implemented for `{integer}`
22 = note: you can use `.chars().nth()` or `.bytes().nth()`
23 for more information, see chapter 8 in The Book: <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>
24 = help: the trait `SliceIndex<[T]>` is implemented for `usize`
25 note: required by a bound in `core::str::<impl str>::get`
26 --> $SRC_DIR/core/src/str/mod.rs:LL:COL
28 error[E0277]: the type `str` cannot be indexed by `{integer}`
29 --> $DIR/str-idx.rs:5:29
31 LL | let _ = s.get_unchecked(4);
32 | ------------- ^ string indices are ranges of `usize`
34 | required by a bound introduced by this call
36 = help: the trait `SliceIndex<str>` is not implemented for `{integer}`
37 = note: you can use `.chars().nth()` or `.bytes().nth()`
38 for more information, see chapter 8 in The Book: <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>
39 = help: the trait `SliceIndex<[T]>` is implemented for `usize`
40 note: required by a bound in `core::str::<impl str>::get_unchecked`
41 --> $SRC_DIR/core/src/str/mod.rs:LL:COL
43 error[E0277]: the type `str` cannot be indexed by `char`
44 --> $DIR/str-idx.rs:6:19
46 LL | let _: u8 = s['c'];
47 | ^^^ string indices are ranges of `usize`
49 = help: the trait `SliceIndex<str>` is not implemented for `char`
50 = note: required for `str` to implement `Index<char>`
52 error: aborting due to 4 previous errors
54 For more information about this error, try `rustc --explain E0277`.