FileCheck mutable_variable_no_prop.
This commit is contained in:
parent
3e169abc1b
commit
d91bb5074e
1 changed files with 8 additions and 1 deletions
|
@ -1,10 +1,17 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
|
||||
// Verify that we do not propagate the contents of this mutable static.
|
||||
static mut STATIC: u32 = 0x42424242;
|
||||
|
||||
// EMIT_MIR mutable_variable_no_prop.main.ConstProp.diff
|
||||
fn main() {
|
||||
// CHECK-LABEL: fn main(
|
||||
// CHECK: debug x => [[x:_.*]];
|
||||
// CHECK: debug y => [[y:_.*]];
|
||||
// CHECK: [[x]] = const 42_u32;
|
||||
// CHECK: [[tmp:_.*]] = (*{{_.*}});
|
||||
// CHECK: [[x]] = move [[tmp]];
|
||||
// CHECK: [[y]] = [[x]];
|
||||
let mut x = 42;
|
||||
unsafe {
|
||||
x = STATIC;
|
||||
|
|
Loading…
Add table
Reference in a new issue