]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/issue-82032.rs
Merge commit 'd3a2366ee877075c59b38bd8ced55f224fc7ef51' into sync_cg_clif-2022-07-26
[rust.git] / src / test / 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() {}