2 // pretty-expanded FIXME #23616
5 #![allow(unused_must_use)]
7 // Test that mutating a mutable upvar in a capture-by-value unboxed
8 // closure does not ice (issue #18238) and marks the upvar as used
9 // mutably so we do not get a spurious warning about it not needing to
10 // be declared mutable (issue #18336 and #18769)
12 fn set(x: &mut usize) { *x = 42; }
17 move || x += 1; //~ WARN unused variable: `x`
21 move || x += 1; //~ WARN unused variable: `x`