about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2017-08-01 13:14:32 -0700
committerRalf Jung <post@ralfj.de>2017-08-01 13:14:32 -0700
commita8129d128c314975d4d34a47e9cb7127de0d0dbc (patch)
tree480bfca2052227c0edf263d5c652b930889ab101
parentc5154d036d09b5274a9e7bcf9f343520728d4c07 (diff)
downloadrust-a8129d128c314975d4d34a47e9cb7127de0d0dbc.tar.gz
rust-a8129d128c314975d4d34a47e9cb7127de0d0dbc.zip
add a closure inside an unsafe fn to the tests
-rw-r--r--src/test/mir-opt/validate_4.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/mir-opt/validate_4.rs b/src/test/mir-opt/validate_4.rs
index 49acaccd86a..591de975740 100644
--- a/src/test/mir-opt/validate_4.rs
+++ b/src/test/mir-opt/validate_4.rs
@@ -14,6 +14,8 @@
 // Make sure unsafe fns and fns with an unsafe block only get restricted validation.
 
 unsafe fn write_42(x: *mut i32) -> bool {
+    let test_closure = |x: *mut i32| *x = 23;
+    test_closure(x);
     *x = 42;
     true
 }
@@ -43,7 +45,7 @@ fn main() {
 //     }
 // }
 // END rustc.node4.EraseRegions.after.mir
-// START rustc.node17.EraseRegions.after.mir
+// START rustc.node31.EraseRegions.after.mir
 // fn test(_1: &ReErased mut i32) -> () {
 //     bb0: {
 //         Validate(Acquire, [_1: &ReFree(DefId { krate: CrateNum(0), node: DefIndex(4) => validate_4/8cd878b::test[0] }, BrAnon(0)) mut i32]);
@@ -55,4 +57,4 @@ fn main() {
 //         Validate(Release, [_3: bool]);
 //     }
 // }
-// END rustc.node17.EraseRegions.after.mir
+// END rustc.node31.EraseRegions.after.mir