rust/tests/ui/btreemap/btreemap-index-mut-2.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
167 B
Rust
Raw Normal View History

2023-07-11 09:22:22 -05:00
use std::collections::BTreeMap;
fn main() {
let _ = || {
let mut map = BTreeMap::<u32, u32>::new();
map[&0] = 1; //~ ERROR cannot assign
};
}