]> git.lizzy.rs Git - rust.git/blob - tests/ui/hashmap/hashmap-index-mut.rs
Rollup merge of #104965 - zacklukem:p-option-as_ref-docs, r=scottmcm
[rust.git] / tests / ui / hashmap / hashmap-index-mut.rs
1 use std::collections::HashMap;
2
3 fn main() {
4     let mut map = HashMap::<u32, u32>::new();
5     map[&0] = 1; //~ ERROR cannot assign
6 }