]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/index-mut-help-with-impl.rs
Add 'library/portable-simd/' from commit '1ce1c645cf27c4acdefe6ec8a11d1f0491954a99'
[rust.git] / src / test / ui / borrowck / index-mut-help-with-impl.rs
1 // When mutably indexing a type that implements `Index` and `IndexMut` but
2 // `Index::index` is being used specifically, the normal special help message
3 // should not mention a missing `IndexMut` impl.
4
5 fn main() {
6     use std::ops::Index;
7
8     let v = String::from("dinosaur");
9     Index::index(&v, 1..2).make_ascii_uppercase(); //~ ERROR
10 }