Change test from usize to i32 to prevent target issues

This commit is contained in:
Jannis Christopher Köhl 2022-08-31 18:28:25 +02:00
parent e75ad93d95
commit 1da3033340
2 changed files with 12 additions and 12 deletions

View File

@ -3,16 +3,16 @@
fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/static_ref.rs:+0:11: +0:11
let _1: usize; // in scope 0 at $DIR/static_ref.rs:+2:9: +2:10
let mut _3: &usize; // in scope 0 at $DIR/static_ref.rs:+4:9: +4:11
let _4: &usize; // in scope 0 at $DIR/static_ref.rs:+4:9: +4:11
let _5: &usize; // in scope 0 at $DIR/static_ref.rs:+4:10: +4:11
let _1: i32; // in scope 0 at $DIR/static_ref.rs:+2:9: +2:10
let mut _3: &i32; // in scope 0 at $DIR/static_ref.rs:+4:9: +4:11
let _4: &i32; // in scope 0 at $DIR/static_ref.rs:+4:9: +4:11
let _5: &i32; // in scope 0 at $DIR/static_ref.rs:+4:10: +4:11
scope 1 {
debug x => _1; // in scope 1 at $DIR/static_ref.rs:+2:9: +2:10
let mut _2: &usize; // in scope 1 at $DIR/static_ref.rs:+3:9: +3:14
let mut _2: &i32; // in scope 1 at $DIR/static_ref.rs:+3:9: +3:14
scope 2 {
debug r => _2; // in scope 2 at $DIR/static_ref.rs:+3:9: +3:14
let _6: usize; // in scope 2 at $DIR/static_ref.rs:+5:9: +5:10
let _6: i32; // in scope 2 at $DIR/static_ref.rs:+5:9: +5:10
scope 3 {
debug y => _6; // in scope 3 at $DIR/static_ref.rs:+5:9: +5:10
}
@ -21,16 +21,16 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/static_ref.rs:+2:9: +2:10
_1 = const 0_usize; // scope 0 at $DIR/static_ref.rs:+2:13: +2:14
_1 = const 0_i32; // scope 0 at $DIR/static_ref.rs:+2:13: +2:14
StorageLive(_2); // scope 1 at $DIR/static_ref.rs:+3:9: +3:14
_2 = &_1; // scope 1 at $DIR/static_ref.rs:+3:17: +3:19
StorageLive(_3); // scope 2 at $DIR/static_ref.rs:+4:9: +4:11
StorageLive(_4); // scope 2 at $DIR/static_ref.rs:+4:9: +4:11
StorageLive(_5); // scope 2 at $DIR/static_ref.rs:+4:10: +4:11
_5 = const {alloc1: &usize}; // scope 2 at $DIR/static_ref.rs:+4:10: +4:11
_5 = const {alloc1: &i32}; // scope 2 at $DIR/static_ref.rs:+4:10: +4:11
// mir::Constant
// + span: $DIR/static_ref.rs:8:10: 8:11
// + literal: Const { ty: &usize, val: Value(Scalar(alloc1)) }
// + literal: Const { ty: &i32, val: Value(Scalar(alloc1)) }
_4 = &(*_5); // scope 2 at $DIR/static_ref.rs:+4:9: +4:11
_3 = &(*_4); // scope 2 at $DIR/static_ref.rs:+4:9: +4:11
_2 = move _3; // scope 2 at $DIR/static_ref.rs:+4:5: +4:11
@ -47,7 +47,7 @@
}
}
alloc1 (static: P, size: 8, align: 8) {
05 00 00 00 00 00 00 00 │ ........
alloc1 (static: P, size: 4, align: 4) {
05 00 00 00 ....
}

View File

@ -2,7 +2,7 @@
// EMIT_MIR static_ref.main.DataflowConstProp.diff
fn main() {
static P: usize = 5;
static P: i32 = 5;
let x = 0;
let mut r = &x;
r = &P;