Skip to content

Commit 2885ca3

Browse files
committed
bless mir-opt tests
1 parent 7c9b5b4 commit 2885ca3

19 files changed

+44
-44
lines changed

Diff for: src/test/mir-opt/const_promotion_extern_static.BAR.PromoteTemps.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@
2222
- // + ty: &i32
2323
- // + val: Value(Scalar(alloc0))
2424
+ // + ty: &[&i32; 1]
25-
+ // + val: Unevaluated(WithOptConstParam { did: DefId(0:6 ~ const_promotion_extern_static[317d]::BAR), const_param_did: None }, [], Some(promoted[0]))
25+
+ // + val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:6 ~ const_promotion_extern_static[317d]::BAR), const_param_did: None }, substs: [], promoted: Some(promoted[0]) })
2626
// mir::Constant
2727
- // + span: $DIR/const-promotion-extern-static.rs:9:33: 9:34
2828
- // + literal: Const { ty: &i32, val: Value(Scalar(alloc0)) }
2929
- _4 = &(*_5); // scope 0 at $DIR/const-promotion-extern-static.rs:9:32: 9:34
3030
- _3 = [move _4]; // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35
3131
- _2 = &_3; // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35
3232
+ // + span: $DIR/const-promotion-extern-static.rs:9:31: 9:35
33-
+ // + literal: Const { ty: &[&i32; 1], val: Unevaluated(WithOptConstParam { did: DefId(0:6 ~ const_promotion_extern_static[317d]::BAR), const_param_did: None }, [], Some(promoted[0])) }
33+
+ // + literal: Const { ty: &[&i32; 1], val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:6 ~ const_promotion_extern_static[317d]::BAR), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
3434
+ _2 = &(*_6); // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35
3535
_1 = move _2 as &[&i32] (Pointer(Unsize)); // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35
3636
- StorageDead(_4); // scope 0 at $DIR/const-promotion-extern-static.rs:9:34: 9:35

Diff for: src/test/mir-opt/const_promotion_extern_static.FOO.PromoteTemps.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@
2424
- // + ty: *const i32
2525
- // + val: Value(Scalar(alloc2))
2626
+ // + ty: &[&i32; 1]
27-
+ // + val: Unevaluated(WithOptConstParam { did: DefId(0:7 ~ const_promotion_extern_static[317d]::FOO), const_param_did: None }, [], Some(promoted[0]))
27+
+ // + val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:7 ~ const_promotion_extern_static[317d]::FOO), const_param_did: None }, substs: [], promoted: Some(promoted[0]) })
2828
// mir::Constant
2929
- // + span: $DIR/const-promotion-extern-static.rs:13:42: 13:43
3030
- // + literal: Const { ty: *const i32, val: Value(Scalar(alloc2)) }
3131
- _4 = &(*_5); // scope 1 at $DIR/const-promotion-extern-static.rs:13:41: 13:43
3232
- _3 = [move _4]; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46
3333
- _2 = &_3; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46
3434
+ // + span: $DIR/const-promotion-extern-static.rs:13:31: 13:46
35-
+ // + literal: Const { ty: &[&i32; 1], val: Unevaluated(WithOptConstParam { did: DefId(0:7 ~ const_promotion_extern_static[317d]::FOO), const_param_did: None }, [], Some(promoted[0])) }
35+
+ // + literal: Const { ty: &[&i32; 1], val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:7 ~ const_promotion_extern_static[317d]::FOO), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
3636
+ _2 = &(*_6); // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46
3737
_1 = move _2 as &[&i32] (Pointer(Unsize)); // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46
3838
- StorageDead(_4); // scope 0 at $DIR/const-promotion-extern-static.rs:13:45: 13:46

Diff for: src/test/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.main.ConstProp.32bit.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
_9 = const main::promoted[0]; // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
2929
// ty::Const
3030
// + ty: &[i32; 3]
31-
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ bad_op_unsafe_oob_for_slices[317d]::main), const_param_did: None }, [], Some(promoted[0]))
31+
// + val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ bad_op_unsafe_oob_for_slices[317d]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) })
3232
// mir::Constant
3333
// + span: $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
34-
// + literal: Const { ty: &[i32; 3], val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ bad_op_unsafe_oob_for_slices[317d]::main), const_param_did: None }, [], Some(promoted[0])) }
34+
// + literal: Const { ty: &[i32; 3], val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ bad_op_unsafe_oob_for_slices[317d]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
3535
_3 = _9; // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
3636
_2 = &raw const (*_3); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
3737
_1 = move _2 as *const [i32] (Pointer(Unsize)); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35

Diff for: src/test/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.main.ConstProp.64bit.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
_9 = const main::promoted[0]; // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
2929
// ty::Const
3030
// + ty: &[i32; 3]
31-
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ bad_op_unsafe_oob_for_slices[317d]::main), const_param_did: None }, [], Some(promoted[0]))
31+
// + val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ bad_op_unsafe_oob_for_slices[317d]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) })
3232
// mir::Constant
3333
// + span: $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
34-
// + literal: Const { ty: &[i32; 3], val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ bad_op_unsafe_oob_for_slices[317d]::main), const_param_did: None }, [], Some(promoted[0])) }
34+
// + literal: Const { ty: &[i32; 3], val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ bad_op_unsafe_oob_for_slices[317d]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
3535
_3 = _9; // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
3636
_2 = &raw const (*_3); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
3737
_1 = move _2 as *const [i32] (Pointer(Unsize)); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35

Diff for: src/test/mir-opt/const_prop/const_prop_fails_gracefully.main.ConstProp.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
_3 = const FOO; // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:16
2020
// ty::Const
2121
// + ty: &i32
22-
// + val: Unevaluated(WithOptConstParam { did: DefId(0:5 ~ const_prop_fails_gracefully[317d]::main::FOO), const_param_did: None }, [], None)
22+
// + val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:5 ~ const_prop_fails_gracefully[317d]::main::FOO), const_param_did: None }, substs: [], promoted: None })
2323
// mir::Constant
2424
// + span: $DIR/const_prop_fails_gracefully.rs:7:13: 7:16
25-
// + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:5 ~ const_prop_fails_gracefully[317d]::main::FOO), const_param_did: None }, [], None) }
25+
// + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:5 ~ const_prop_fails_gracefully[317d]::main::FOO), const_param_did: None }, substs: [], promoted: None }) }
2626
_2 = &raw const (*_3); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:16
2727
_1 = move _2 as usize (Misc); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:39
2828
StorageDead(_2); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:38: 7:39

Diff for: src/test/mir-opt/const_prop/ref_deref.main.ConstProp.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
_4 = const main::promoted[0]; // scope 0 at $DIR/ref_deref.rs:5:6: 5:10
1515
// ty::Const
1616
// + ty: &i32
17-
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref[317d]::main), const_param_did: None }, [], Some(promoted[0]))
17+
// + val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ ref_deref[317d]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) })
1818
// mir::Constant
1919
// + span: $DIR/ref_deref.rs:5:6: 5:10
20-
// + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref[317d]::main), const_param_did: None }, [], Some(promoted[0])) }
20+
// + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ ref_deref[317d]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
2121
_2 = _4; // scope 0 at $DIR/ref_deref.rs:5:6: 5:10
2222
- _1 = (*_2); // scope 0 at $DIR/ref_deref.rs:5:5: 5:10
2323
+ _1 = const 4_i32; // scope 0 at $DIR/ref_deref.rs:5:5: 5:10

Diff for: src/test/mir-opt/const_prop/ref_deref.main.PromoteTemps.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
+ _4 = const main::promoted[0]; // scope 0 at $DIR/ref_deref.rs:5:6: 5:10
1818
+ // ty::Const
1919
+ // + ty: &i32
20-
+ // + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref[317d]::main), const_param_did: None }, [], Some(promoted[0]))
20+
+ // + val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ ref_deref[317d]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) })
2121
+ // mir::Constant
2222
+ // + span: $DIR/ref_deref.rs:5:6: 5:10
23-
+ // + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref[317d]::main), const_param_did: None }, [], Some(promoted[0])) }
23+
+ // + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ ref_deref[317d]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
2424
+ _2 = &(*_4); // scope 0 at $DIR/ref_deref.rs:5:6: 5:10
2525
_1 = (*_2); // scope 0 at $DIR/ref_deref.rs:5:5: 5:10
2626
- StorageDead(_3); // scope 0 at $DIR/ref_deref.rs:5:10: 5:11

Diff for: src/test/mir-opt/const_prop/ref_deref_project.main.ConstProp.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
_4 = const main::promoted[0]; // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17
1515
// ty::Const
1616
// + ty: &(i32, i32)
17-
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref_project[317d]::main), const_param_did: None }, [], Some(promoted[0]))
17+
// + val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ ref_deref_project[317d]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) })
1818
// mir::Constant
1919
// + span: $DIR/ref_deref_project.rs:5:6: 5:17
20-
// + literal: Const { ty: &(i32, i32), val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref_project[317d]::main), const_param_did: None }, [], Some(promoted[0])) }
20+
// + literal: Const { ty: &(i32, i32), val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ ref_deref_project[317d]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
2121
_2 = &((*_4).1: i32); // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17
2222
_1 = (*_2); // scope 0 at $DIR/ref_deref_project.rs:5:5: 5:17
2323
StorageDead(_2); // scope 0 at $DIR/ref_deref_project.rs:5:17: 5:18

Diff for: src/test/mir-opt/const_prop/ref_deref_project.main.PromoteTemps.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
+ _4 = const main::promoted[0]; // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17
1818
+ // ty::Const
1919
+ // + ty: &(i32, i32)
20-
+ // + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref_project[317d]::main), const_param_did: None }, [], Some(promoted[0]))
20+
+ // + val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ ref_deref_project[317d]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) })
2121
+ // mir::Constant
2222
+ // + span: $DIR/ref_deref_project.rs:5:6: 5:17
23-
+ // + literal: Const { ty: &(i32, i32), val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref_project[317d]::main), const_param_did: None }, [], Some(promoted[0])) }
23+
+ // + literal: Const { ty: &(i32, i32), val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ ref_deref_project[317d]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
2424
+ _2 = &((*_4).1: i32); // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17
2525
_1 = (*_2); // scope 0 at $DIR/ref_deref_project.rs:5:5: 5:17
2626
- StorageDead(_3); // scope 0 at $DIR/ref_deref_project.rs:5:17: 5:18

Diff for: src/test/mir-opt/const_prop/slice_len.main.ConstProp.32bit.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
_9 = const main::promoted[0]; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
2222
// ty::Const
2323
// + ty: &[u32; 3]
24-
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ slice_len[317d]::main), const_param_did: None }, [], Some(promoted[0]))
24+
// + val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ slice_len[317d]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) })
2525
// mir::Constant
2626
// + span: $DIR/slice_len.rs:5:6: 5:19
27-
// + literal: Const { ty: &[u32; 3], val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ slice_len[317d]::main), const_param_did: None }, [], Some(promoted[0])) }
27+
// + literal: Const { ty: &[u32; 3], val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ slice_len[317d]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
2828
_4 = _9; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
2929
_3 = _4; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
3030
_2 = move _3 as &[u32] (Pointer(Unsize)); // scope 0 at $DIR/slice_len.rs:5:6: 5:19

Diff for: src/test/mir-opt/const_prop/slice_len.main.ConstProp.64bit.diff

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
_9 = const main::promoted[0]; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
2222
// ty::Const
2323
// + ty: &[u32; 3]
24-
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ slice_len[317d]::main), const_param_did: None }, [], Some(promoted[0]))
24+
// + val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ slice_len[317d]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) })
2525
// mir::Constant
2626
// + span: $DIR/slice_len.rs:5:6: 5:19
27-
// + literal: Const { ty: &[u32; 3], val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ slice_len[317d]::main), const_param_did: None }, [], Some(promoted[0])) }
27+
// + literal: Const { ty: &[u32; 3], val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ slice_len[317d]::main), const_param_did: None }, substs: [], promoted: Some(promoted[0]) }) }
2828
_4 = _9; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
2929
_3 = _4; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
3030
_2 = move _3 as &[u32] (Pointer(Unsize)); // scope 0 at $DIR/slice_len.rs:5:6: 5:19

0 commit comments

Comments
 (0)