]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/issue-82032.rs
Rollup merge of #106570 - Xaeroxe:div-duration-tests, r=JohnTitor
[rust.git] / tests / ui / borrowck / issue-82032.rs
1 use std::{fs, io::*};
2 use std::collections::HashMap;
3
4 type Handle = BufWriter<fs::File>;
5 struct Thing(HashMap<String, Handle>);
6
7 impl Thing {
8     pub fn die_horribly(&mut self) {
9         for v in self.0.values() {
10             v.flush();
11               //~^ ERROR cannot borrow
12         }
13     }
14 }
15
16 fn main() {}