1 error[E0277]: the size for values of type `str` cannot be known at compilation time
2 --> $DIR/str-mut-idx.rs:4:15
5 | ^^^ doesn't have a size known at compile-time
7 = help: the trait `std::marker::Sized` is not implemented for `str`
8 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
9 note: required by `bot`
10 --> $DIR/str-mut-idx.rs:1:1
12 LL | fn bot<T>() -> T { loop {} }
15 error[E0277]: the size for values of type `str` cannot be known at compilation time
16 --> $DIR/str-mut-idx.rs:4:5
19 | ^^^^^^^ doesn't have a size known at compile-time
21 = help: the trait `std::marker::Sized` is not implemented for `str`
22 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
23 = note: the left-hand-side of an assignment must have a statically known size
25 error[E0277]: the type `str` cannot be indexed by `usize`
26 --> $DIR/str-mut-idx.rs:7:5
28 LL | s[1usize] = bot();
29 | ^^^^^^^^^ string indices are ranges of `usize`
31 = help: the trait `std::slice::SliceIndex<str>` is not implemented for `usize`
32 = note: required because of the requirements on the impl of `std::ops::Index<usize>` for `str`
34 error[E0277]: the type `str` cannot be indexed by `{integer}`
35 --> $DIR/str-mut-idx.rs:9:7
38 | ^^^^^^^ string indices are ranges of `usize`
40 = help: the trait `std::slice::SliceIndex<str>` is not implemented for `{integer}`
41 = note: you can use `.chars().nth()` or `.bytes().nth()`
42 see chapter in The Book <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>
44 error[E0277]: the type `str` cannot be indexed by `{integer}`
45 --> $DIR/str-mut-idx.rs:11:7
47 LL | s.get_unchecked_mut(1);
48 | ^^^^^^^^^^^^^^^^^ string indices are ranges of `usize`
50 = help: the trait `std::slice::SliceIndex<str>` is not implemented for `{integer}`
51 = note: you can use `.chars().nth()` or `.bytes().nth()`
52 see chapter in The Book <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>
54 error[E0277]: the type `str` cannot be indexed by `char`
55 --> $DIR/str-mut-idx.rs:13:5
58 | ^^^^^^ string indices are ranges of `usize`
60 = help: the trait `std::slice::SliceIndex<str>` is not implemented for `char`
61 = note: required because of the requirements on the impl of `std::ops::Index<char>` for `str`
63 error: aborting due to 6 previous errors
65 For more information about this error, try `rustc --explain E0277`.