1 //@error-pattern: /deallocating while item \[Unique for .*\] is protected/
3 fn inner(x: &mut i32, f: fn(&mut i32)) {
4 // `f` may mutate, but it may not deallocate!
9 inner(Box::leak(Box::new(0)), |x| {
10 let raw = x as *mut _;
11 drop(unsafe { Box::from_raw(raw) });