Ensure test actually uses dataflow, not simulation

This commit is contained in:
Dylan MacKenzie 2019-12-11 13:09:20 -08:00
parent 34ce0ba919
commit 598bed6f51
2 changed files with 7 additions and 3 deletions

View File

@ -30,6 +30,10 @@
z = Some(Cell::new(4));
}
if i == 9 {
z = None;
}
i += 1;
}
z

View File

@ -1,5 +1,5 @@
error[E0716]: temporary value dropped while borrowed
--> $DIR/interior-mutability.rs:40:26
--> $DIR/interior-mutability.rs:44:26
|
LL | let x: &'static _ = &X;
| ---------- ^ creates a temporary which is freed while still in use
@ -10,7 +10,7 @@ LL | }
| - temporary value is freed at the end of this statement
error[E0716]: temporary value dropped while borrowed
--> $DIR/interior-mutability.rs:41:26
--> $DIR/interior-mutability.rs:45:26
|
LL | let y: &'static _ = &Y;
| ---------- ^ creates a temporary which is freed while still in use
@ -21,7 +21,7 @@ LL | }
| - temporary value is freed at the end of this statement
error[E0716]: temporary value dropped while borrowed
--> $DIR/interior-mutability.rs:42:26
--> $DIR/interior-mutability.rs:46:26
|
LL | let z: &'static _ = &Z;
| ---------- ^ creates a temporary which is freed while still in use