summaryrefslogtreecommitdiffstats
path: root/tests/ui/borrowck/index-mut-help-with-impl.rs
blob: 44b57c4a038c0a2d21ff68444331e6d42e7d40cd (plain)
1
2
3
4
5
6
7
8
9
10
// When mutably indexing a type that implements `Index` and `IndexMut` but
// `Index::index` is being used specifically, the normal special help message
// should not mention a missing `IndexMut` impl.

fn main() {
    use std::ops::Index;

    let v = String::from("dinosaur");
    Index::index(&v, 1..2).make_ascii_uppercase(); //~ ERROR
}