= note: the left-hand-side of an assignment must have a statically known size
error[E0277]: the type `str` cannot be indexed by `usize`
- --> $DIR/str-mut-idx.rs:7:5
+ --> $DIR/str-mut-idx.rs:7:7
|
LL | s[1usize] = bot();
- | ^^^^^^^^^ string indices are ranges of `usize`
+ | ^^^^^^ string indices are ranges of `usize`
|
= help: the trait `SliceIndex<str>` is not implemented for `usize`
= help: the trait `SliceIndex<[T]>` is implemented for `usize`
| ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `core::str::<impl str>::get_unchecked_mut`
error[E0277]: the type `str` cannot be indexed by `char`
- --> $DIR/str-mut-idx.rs:13:5
+ --> $DIR/str-mut-idx.rs:13:7
|
LL | s['c'];
- | ^^^^^^ string indices are ranges of `usize`
+ | ^^^ string indices are ranges of `usize`
|
= help: the trait `SliceIndex<str>` is not implemented for `char`
= note: required because of the requirements on the impl of `Index<char>` for `str`