]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/index-mut-help-with-impl.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / 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 }