3 #![feature(rustc_attrs)]
9 fn allowed(&self, x: i32) -> bool {
19 fn update(&mut self) {
20 // The closure passed to filter only captures self.filter,
21 // therefore mutating self.list is allowed.
23 #[rustc_capture_analysis]
24 |v| self.filter.allowed(*v),
25 //~^ ERROR: First Pass analysis includes:
26 //~| ERROR: Min Capture analysis includes:
27 //~| NOTE: Capturing self[Deref,(0, 0)] -> ImmBorrow
28 //~| NOTE: Min Capture self[Deref,(0, 0)] -> ImmBorrow
34 let mut d = Data { filter: Filter { div: 3 }, list: Vec::new() };