mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
11 lines
342 B
Rust
11 lines
342 B
Rust
// 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
|
|
}
|