Make tests unit.
This commit is contained in:
parent
d9ee0f468f
commit
22e9e52c84
16 changed files with 22 additions and 17 deletions
|
|
@ -10,12 +10,12 @@ fn main() -> () {
|
|||
StorageLive(_2); // scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
|
||||
_2 = const {alloc1: &&[(Option<i32>, &[&str])]}; // scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
|
||||
// mir::Constant
|
||||
// + span: $DIR/const_allocation.rs:8:5: 8:8
|
||||
// + span: $DIR/const_allocation.rs:9:5: 9:8
|
||||
// + literal: Const { ty: &&[(Option<i32>, &[&str])], val: Value(Scalar(alloc1)) }
|
||||
_1 = (*_2); // scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
|
||||
StorageDead(_2); // scope 0 at $DIR/const_allocation.rs:+1:8: +1:9
|
||||
StorageDead(_1); // scope 0 at $DIR/const_allocation.rs:+1:8: +1:9
|
||||
nop; // scope 0 at $DIR/const_allocation.rs:+0:11: +2:2
|
||||
_0 = const (); // scope 0 at $DIR/const_allocation.rs:+0:11: +2:2
|
||||
return; // scope 0 at $DIR/const_allocation.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@ fn main() -> () {
|
|||
StorageLive(_2); // scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
|
||||
_2 = const {alloc1: &&[(Option<i32>, &[&str])]}; // scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
|
||||
// mir::Constant
|
||||
// + span: $DIR/const_allocation.rs:8:5: 8:8
|
||||
// + span: $DIR/const_allocation.rs:9:5: 9:8
|
||||
// + literal: Const { ty: &&[(Option<i32>, &[&str])], val: Value(Scalar(alloc1)) }
|
||||
_1 = (*_2); // scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
|
||||
StorageDead(_2); // scope 0 at $DIR/const_allocation.rs:+1:8: +1:9
|
||||
StorageDead(_1); // scope 0 at $DIR/const_allocation.rs:+1:8: +1:9
|
||||
nop; // scope 0 at $DIR/const_allocation.rs:+0:11: +2:2
|
||||
_0 = const (); // scope 0 at $DIR/const_allocation.rs:+0:11: +2:2
|
||||
return; // scope 0 at $DIR/const_allocation.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
// unit-test: ConstProp
|
||||
// ignore-endian-big
|
||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||
static FOO: &[(Option<i32>, &[&str])] =
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@ fn main() -> () {
|
|||
StorageLive(_2); // scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
|
||||
_2 = const {alloc1: &&[(Option<i32>, &[&u8])]}; // scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
|
||||
// mir::Constant
|
||||
// + span: $DIR/const_allocation2.rs:5:5: 5:8
|
||||
// + span: $DIR/const_allocation2.rs:6:5: 6:8
|
||||
// + literal: Const { ty: &&[(Option<i32>, &[&u8])], val: Value(Scalar(alloc1)) }
|
||||
_1 = (*_2); // scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
|
||||
StorageDead(_2); // scope 0 at $DIR/const_allocation2.rs:+1:8: +1:9
|
||||
StorageDead(_1); // scope 0 at $DIR/const_allocation2.rs:+1:8: +1:9
|
||||
nop; // scope 0 at $DIR/const_allocation2.rs:+0:11: +2:2
|
||||
_0 = const (); // scope 0 at $DIR/const_allocation2.rs:+0:11: +2:2
|
||||
return; // scope 0 at $DIR/const_allocation2.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@ fn main() -> () {
|
|||
StorageLive(_2); // scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
|
||||
_2 = const {alloc1: &&[(Option<i32>, &[&u8])]}; // scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
|
||||
// mir::Constant
|
||||
// + span: $DIR/const_allocation2.rs:5:5: 5:8
|
||||
// + span: $DIR/const_allocation2.rs:6:5: 6:8
|
||||
// + literal: Const { ty: &&[(Option<i32>, &[&u8])], val: Value(Scalar(alloc1)) }
|
||||
_1 = (*_2); // scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
|
||||
StorageDead(_2); // scope 0 at $DIR/const_allocation2.rs:+1:8: +1:9
|
||||
StorageDead(_1); // scope 0 at $DIR/const_allocation2.rs:+1:8: +1:9
|
||||
nop; // scope 0 at $DIR/const_allocation2.rs:+0:11: +2:2
|
||||
_0 = const (); // scope 0 at $DIR/const_allocation2.rs:+0:11: +2:2
|
||||
return; // scope 0 at $DIR/const_allocation2.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
// unit-test: ConstProp
|
||||
// ignore-endian-big
|
||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||
// EMIT_MIR const_allocation2.main.ConstProp.after.mir
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@ fn main() -> () {
|
|||
StorageLive(_2); // scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
|
||||
_2 = const {alloc1: &&Packed}; // scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
|
||||
// mir::Constant
|
||||
// + span: $DIR/const_allocation3.rs:5:5: 5:8
|
||||
// + span: $DIR/const_allocation3.rs:6:5: 6:8
|
||||
// + literal: Const { ty: &&Packed, val: Value(Scalar(alloc1)) }
|
||||
_1 = (*_2); // scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
|
||||
StorageDead(_2); // scope 0 at $DIR/const_allocation3.rs:+1:8: +1:9
|
||||
StorageDead(_1); // scope 0 at $DIR/const_allocation3.rs:+1:8: +1:9
|
||||
nop; // scope 0 at $DIR/const_allocation3.rs:+0:11: +2:2
|
||||
_0 = const (); // scope 0 at $DIR/const_allocation3.rs:+0:11: +2:2
|
||||
return; // scope 0 at $DIR/const_allocation3.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@ fn main() -> () {
|
|||
StorageLive(_2); // scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
|
||||
_2 = const {alloc1: &&Packed}; // scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
|
||||
// mir::Constant
|
||||
// + span: $DIR/const_allocation3.rs:5:5: 5:8
|
||||
// + span: $DIR/const_allocation3.rs:6:5: 6:8
|
||||
// + literal: Const { ty: &&Packed, val: Value(Scalar(alloc1)) }
|
||||
_1 = (*_2); // scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
|
||||
StorageDead(_2); // scope 0 at $DIR/const_allocation3.rs:+1:8: +1:9
|
||||
StorageDead(_1); // scope 0 at $DIR/const_allocation3.rs:+1:8: +1:9
|
||||
nop; // scope 0 at $DIR/const_allocation3.rs:+0:11: +2:2
|
||||
_0 = const (); // scope 0 at $DIR/const_allocation3.rs:+0:11: +2:2
|
||||
return; // scope 0 at $DIR/const_allocation3.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
// unit-test: ConstProp
|
||||
// ignore-endian-big
|
||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||
// EMIT_MIR const_allocation3.main.ConstProp.after.mir
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
StorageLive(_2); // scope 0 at $DIR/ref_deref.rs:+1:6: +1:10
|
||||
_4 = const _; // scope 0 at $DIR/ref_deref.rs:+1:6: +1:10
|
||||
// mir::Constant
|
||||
// + span: $DIR/ref_deref.rs:5:6: 5:10
|
||||
// + span: $DIR/ref_deref.rs:6:6: 6:10
|
||||
// + literal: Const { ty: &i32, val: Unevaluated(main, [], Some(promoted[0])) }
|
||||
_2 = _4; // scope 0 at $DIR/ref_deref.rs:+1:6: +1:10
|
||||
- _1 = (*_2); // scope 0 at $DIR/ref_deref.rs:+1:5: +1:10
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
- _2 = &_3; // scope 0 at $DIR/ref_deref.rs:+1:6: +1:10
|
||||
+ _4 = const _; // scope 0 at $DIR/ref_deref.rs:+1:6: +1:10
|
||||
+ // mir::Constant
|
||||
+ // + span: $DIR/ref_deref.rs:5:6: 5:10
|
||||
+ // + span: $DIR/ref_deref.rs:6:6: 6:10
|
||||
+ // + literal: Const { ty: &i32, val: Unevaluated(main, [], Some(promoted[0])) }
|
||||
+ _2 = &(*_4); // scope 0 at $DIR/ref_deref.rs:+1:6: +1:10
|
||||
_1 = (*_2); // scope 0 at $DIR/ref_deref.rs:+1:5: +1:10
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
// compile-flags: -Zmir-enable-passes=-SimplifyLocals-before-const-prop
|
||||
// EMIT_MIR ref_deref.main.PromoteTemps.diff
|
||||
// EMIT_MIR ref_deref.main.ConstProp.diff
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// unit-test
|
||||
// compile-flags: -Zmir-enable-passes=-SimplifyLocals-before-const-prop
|
||||
// EMIT_MIR ref_deref_project.main.PromoteTemps.diff
|
||||
// EMIT_MIR ref_deref_project.main.ConstProp.diff
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
StorageLive(_4); // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
_9 = const _; // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
// mir::Constant
|
||||
// + span: $DIR/slice_len.rs:5:6: 5:19
|
||||
// + span: $DIR/slice_len.rs:6:6: 6:19
|
||||
// + literal: Const { ty: &[u32; 3], val: Unevaluated(main, [], Some(promoted[0])) }
|
||||
_4 = _9; // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
_3 = _4; // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
StorageLive(_4); // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
_9 = const _; // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
// mir::Constant
|
||||
// + span: $DIR/slice_len.rs:5:6: 5:19
|
||||
// + span: $DIR/slice_len.rs:6:6: 6:19
|
||||
// + literal: Const { ty: &[u32; 3], val: Unevaluated(main, [], Some(promoted[0])) }
|
||||
_4 = _9; // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
_3 = _4; // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
// compile-flags: -Zmir-enable-passes=-SimplifyLocals-before-const-prop
|
||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||
|
||||
// EMIT_MIR slice_len.main.ConstProp.diff
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue