We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 94f7511 commit 21a707eCopy full SHA for 21a707e
src/test/mir-opt/validate_5.rs
@@ -26,6 +26,9 @@ fn main() {
26
test(&mut 0);
27
28
let test_closure = unsafe { |x: &mut i32| write_42(x) };
29
+ // Note that validation will fail if this is executed: The closure keeps the lock on
30
+ // x, so the write in write_42 fails. This test just checks code generation,
31
+ // so the UB doesn't matter.
32
test_closure(&mut 0);
33
}
34
0 commit comments