]> git.lizzy.rs Git - rust.git/blob - src/test/ui/str/str-mut-idx.rs
Auto merge of #57108 - Mark-Simulacrum:license-remove, r=pietroalbini
[rust.git] / src / test / ui / str / str-mut-idx.rs
1 fn bot<T>() -> T { loop {} }
2
3 fn mutate(s: &mut str) {
4     s[1..2] = bot();
5     //~^ ERROR the size for values of type
6     //~| ERROR the size for values of type
7     s[1usize] = bot();
8     //~^ ERROR the type `str` cannot be mutably indexed by `usize`
9 }
10
11 pub fn main() {}