提交 4717cf2f 编写于 作者: B bors

Auto merge of #75566 - alasher:master, r=oli-obk

Suppress verbose MIR comments for trivial types

Addresses #74508

This is my first contribution to the Rust project! Please let me know if anything needs revising, I'm happy to make changes.
......@@ -387,20 +387,30 @@ impl Visitor<'tcx> for ExtraComments<'tcx> {
fn visit_constant(&mut self, constant: &Constant<'tcx>, location: Location) {
self.super_constant(constant, location);
let Constant { span, user_ty, literal } = constant;
self.push("mir::Constant");
self.push(&format!("+ span: {}", self.tcx.sess.source_map().span_to_string(*span)));
if let Some(user_ty) = user_ty {
self.push(&format!("+ user_ty: {:?}", user_ty));
match literal.ty.kind {
ty::Int(_) | ty::Uint(_) | ty::Bool | ty::Char => {}
_ => {
self.push("mir::Constant");
self.push(&format!("+ span: {}", self.tcx.sess.source_map().span_to_string(*span)));
if let Some(user_ty) = user_ty {
self.push(&format!("+ user_ty: {:?}", user_ty));
}
self.push(&format!("+ literal: {:?}", literal));
}
}
self.push(&format!("+ literal: {:?}", literal));
}
fn visit_const(&mut self, constant: &&'tcx ty::Const<'tcx>, _: Location) {
self.super_const(constant);
let ty::Const { ty, val, .. } = constant;
self.push("ty::Const");
self.push(&format!("+ ty: {:?}", ty));
self.push(&format!("+ val: {:?}", val));
match ty.kind {
ty::Int(_) | ty::Uint(_) | ty::Bool | ty::Char => {}
_ => {
self.push("ty::Const");
self.push(&format!("+ ty: {:?}", ty));
self.push(&format!("+ val: {:?}", val));
}
}
}
fn visit_rvalue(&mut self, rvalue: &Rvalue<'tcx>, location: Location) {
......
......@@ -129,23 +129,11 @@ fn address_of_reborrow() -> () {
StorageLive(_1); // scope 0 at $DIR/address-of.rs:4:9: 4:10
StorageLive(_2); // scope 0 at $DIR/address-of.rs:4:14: 4:21
_2 = [const 0_i32; 10]; // scope 0 at $DIR/address-of.rs:4:14: 4:21
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000000))
// mir::Constant
// + span: $DIR/address-of.rs:4:15: 4:16
// + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
_1 = &_2; // scope 0 at $DIR/address-of.rs:4:13: 4:21
FakeRead(ForLet, _1); // scope 0 at $DIR/address-of.rs:4:9: 4:10
StorageLive(_3); // scope 1 at $DIR/address-of.rs:5:9: 5:14
StorageLive(_4); // scope 1 at $DIR/address-of.rs:5:22: 5:29
_4 = [const 0_i32; 10]; // scope 1 at $DIR/address-of.rs:5:22: 5:29
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000000))
// mir::Constant
// + span: $DIR/address-of.rs:5:23: 5:24
// + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
_3 = &mut _4; // scope 1 at $DIR/address-of.rs:5:17: 5:29
FakeRead(ForLet, _3); // scope 1 at $DIR/address-of.rs:5:9: 5:14
StorageLive(_5); // scope 2 at $DIR/address-of.rs:7:5: 7:18
......
......@@ -26,32 +26,8 @@ fn main() -> () {
bb0: {
StorageLive(_1); // scope 0 at $DIR/array-index-is-temporary.rs:13:9: 13:14
_1 = [const 42_u32, const 43_u32, const 44_u32]; // scope 0 at $DIR/array-index-is-temporary.rs:13:17: 13:29
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x0000002a))
// mir::Constant
// + span: $DIR/array-index-is-temporary.rs:13:18: 13:20
// + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) }
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x0000002b))
// mir::Constant
// + span: $DIR/array-index-is-temporary.rs:13:22: 13:24
// + literal: Const { ty: u32, val: Value(Scalar(0x0000002b)) }
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x0000002c))
// mir::Constant
// + span: $DIR/array-index-is-temporary.rs:13:26: 13:28
// + literal: Const { ty: u32, val: Value(Scalar(0x0000002c)) }
StorageLive(_2); // scope 1 at $DIR/array-index-is-temporary.rs:14:9: 14:14
_2 = const 1_usize; // scope 1 at $DIR/array-index-is-temporary.rs:14:17: 14:18
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/array-index-is-temporary.rs:14:17: 14:18
// + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) }
StorageLive(_3); // scope 2 at $DIR/array-index-is-temporary.rs:15:9: 15:10
StorageLive(_4); // scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31
_4 = &mut _2; // scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31
......
......@@ -26,32 +26,8 @@ fn main() -> () {
bb0: {
StorageLive(_1); // scope 0 at $DIR/array-index-is-temporary.rs:13:9: 13:14
_1 = [const 42_u32, const 43_u32, const 44_u32]; // scope 0 at $DIR/array-index-is-temporary.rs:13:17: 13:29
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x0000002a))
// mir::Constant
// + span: $DIR/array-index-is-temporary.rs:13:18: 13:20
// + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) }
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x0000002b))
// mir::Constant
// + span: $DIR/array-index-is-temporary.rs:13:22: 13:24
// + literal: Const { ty: u32, val: Value(Scalar(0x0000002b)) }
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x0000002c))
// mir::Constant
// + span: $DIR/array-index-is-temporary.rs:13:26: 13:28
// + literal: Const { ty: u32, val: Value(Scalar(0x0000002c)) }
StorageLive(_2); // scope 1 at $DIR/array-index-is-temporary.rs:14:9: 14:14
_2 = const 1_usize; // scope 1 at $DIR/array-index-is-temporary.rs:14:17: 14:18
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x0000000000000001))
// mir::Constant
// + span: $DIR/array-index-is-temporary.rs:14:17: 14:18
// + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000001)) }
StorageLive(_3); // scope 2 at $DIR/array-index-is-temporary.rs:15:9: 15:10
StorageLive(_4); // scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31
_4 = &mut _2; // scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31
......
......@@ -28,12 +28,6 @@ fn main() -> () {
bb0: {
StorageLive(_1); // scope 0 at $DIR/basic_assignment.rs:11:9: 11:17
_1 = const false; // scope 0 at $DIR/basic_assignment.rs:11:20: 11:25
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/basic_assignment.rs:11:20: 11:25
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
FakeRead(ForLet, _1); // scope 0 at $DIR/basic_assignment.rs:11:9: 11:17
StorageLive(_2); // scope 1 at $DIR/basic_assignment.rs:12:9: 12:17
StorageLive(_3); // scope 2 at $DIR/basic_assignment.rs:16:16: 16:24
......
......@@ -22,18 +22,6 @@ fn main() -> () {
// + literal: Const { ty: &[u8; 3], val: Value(Scalar(alloc0)) }
StorageLive(_2); // scope 1 at $DIR/byte_slice.rs:6:9: 6:10
_2 = [const 5_u8, const 120_u8]; // scope 1 at $DIR/byte_slice.rs:6:13: 6:24
// ty::Const
// + ty: u8
// + val: Value(Scalar(0x05))
// mir::Constant
// + span: $DIR/byte_slice.rs:6:14: 6:17
// + literal: Const { ty: u8, val: Value(Scalar(0x05)) }
// ty::Const
// + ty: u8
// + val: Value(Scalar(0x78))
// mir::Constant
// + span: $DIR/byte_slice.rs:6:19: 6:23
// + literal: Const { ty: u8, val: Value(Scalar(0x78)) }
_0 = const (); // scope 0 at $DIR/byte_slice.rs:4:11: 7:2
// ty::Const
// + ty: ()
......
......@@ -29,20 +29,8 @@
StorageLive(_2); // scope 0 at $DIR/combine_array_len.rs:5:9: 5:10
StorageLive(_3); // scope 0 at $DIR/combine_array_len.rs:5:15: 5:16
_3 = const 0_usize; // scope 0 at $DIR/combine_array_len.rs:5:15: 5:16
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x00000000))
// mir::Constant
// + span: $DIR/combine_array_len.rs:5:15: 5:16
// + literal: Const { ty: usize, val: Value(Scalar(0x00000000)) }
- _4 = Len(_1); // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17
+ _4 = const 2_usize; // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x00000002))
+ // mir::Constant
+ // + span: $DIR/combine_array_len.rs:5:13: 5:17
+ // + literal: Const { ty: usize, val: Value(Scalar(0x00000002)) }
_5 = Lt(_3, _4); // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17
assert(move _5, "index out of bounds: the len is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17
}
......@@ -53,20 +41,8 @@
StorageLive(_6); // scope 1 at $DIR/combine_array_len.rs:6:9: 6:10
StorageLive(_7); // scope 1 at $DIR/combine_array_len.rs:6:15: 6:16
_7 = const 1_usize; // scope 1 at $DIR/combine_array_len.rs:6:15: 6:16
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/combine_array_len.rs:6:15: 6:16
// + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) }
- _8 = Len(_1); // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17
+ _8 = const 2_usize; // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x00000002))
+ // mir::Constant
+ // + span: $DIR/combine_array_len.rs:6:13: 6:17
+ // + literal: Const { ty: usize, val: Value(Scalar(0x00000002)) }
_9 = Lt(_7, _8); // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17
assert(move _9, "index out of bounds: the len is {} but the index is {}", move _8, _7) -> bb2; // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17
}
......
......@@ -29,20 +29,8 @@
StorageLive(_2); // scope 0 at $DIR/combine_array_len.rs:5:9: 5:10
StorageLive(_3); // scope 0 at $DIR/combine_array_len.rs:5:15: 5:16
_3 = const 0_usize; // scope 0 at $DIR/combine_array_len.rs:5:15: 5:16
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x0000000000000000))
// mir::Constant
// + span: $DIR/combine_array_len.rs:5:15: 5:16
// + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000000)) }
- _4 = Len(_1); // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17
+ _4 = const 2_usize; // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x0000000000000002))
+ // mir::Constant
+ // + span: $DIR/combine_array_len.rs:5:13: 5:17
+ // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000002)) }
_5 = Lt(_3, _4); // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17
assert(move _5, "index out of bounds: the len is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17
}
......@@ -53,20 +41,8 @@
StorageLive(_6); // scope 1 at $DIR/combine_array_len.rs:6:9: 6:10
StorageLive(_7); // scope 1 at $DIR/combine_array_len.rs:6:15: 6:16
_7 = const 1_usize; // scope 1 at $DIR/combine_array_len.rs:6:15: 6:16
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x0000000000000001))
// mir::Constant
// + span: $DIR/combine_array_len.rs:6:15: 6:16
// + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000001)) }
- _8 = Len(_1); // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17
+ _8 = const 2_usize; // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x0000000000000002))
+ // mir::Constant
+ // + span: $DIR/combine_array_len.rs:6:13: 6:17
+ // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000002)) }
_9 = Lt(_7, _8); // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17
assert(move _9, "index out of bounds: the len is {} but the index is {}", move _8, _7) -> bb2; // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17
}
......
......@@ -15,45 +15,12 @@
StorageLive(_2); // scope 0 at $DIR/aggregate.rs:5:13: 5:24
StorageLive(_3); // scope 0 at $DIR/aggregate.rs:5:13: 5:22
(_3.0: i32) = const 0_i32; // scope 0 at $DIR/aggregate.rs:5:13: 5:22
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000000))
// mir::Constant
// + span: $DIR/aggregate.rs:5:14: 5:15
// + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
(_3.1: i32) = const 1_i32; // scope 0 at $DIR/aggregate.rs:5:13: 5:22
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/aggregate.rs:5:17: 5:18
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
(_3.2: i32) = const 2_i32; // scope 0 at $DIR/aggregate.rs:5:13: 5:22
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000002))
// mir::Constant
// + span: $DIR/aggregate.rs:5:20: 5:21
// + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) }
- _2 = (_3.1: i32); // scope 0 at $DIR/aggregate.rs:5:13: 5:24
- _1 = Add(move _2, const 0_i32); // scope 0 at $DIR/aggregate.rs:5:13: 5:28
+ _2 = const 1_i32; // scope 0 at $DIR/aggregate.rs:5:13: 5:24
// ty::Const
// + ty: i32
- // + val: Value(Scalar(0x00000000))
+ // + val: Value(Scalar(0x00000001))
// mir::Constant
- // + span: $DIR/aggregate.rs:5:27: 5:28
- // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
+ // + span: $DIR/aggregate.rs:5:13: 5:24
+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
+ _1 = const 1_i32; // scope 0 at $DIR/aggregate.rs:5:13: 5:28
+ // ty::Const
+ // + ty: i32
+ // + val: Value(Scalar(0x00000001))
+ // mir::Constant
+ // + span: $DIR/aggregate.rs:5:13: 5:28
+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
StorageDead(_2); // scope 0 at $DIR/aggregate.rs:5:27: 5:28
StorageDead(_3); // scope 0 at $DIR/aggregate.rs:5:28: 5:29
_0 = const (); // scope 0 at $DIR/aggregate.rs:4:11: 6:2
......
......@@ -16,84 +16,18 @@
StorageLive(_1); // scope 0 at $DIR/array_index.rs:5:9: 5:10
StorageLive(_2); // scope 0 at $DIR/array_index.rs:5:18: 5:30
_2 = [const 0_u32, const 1_u32, const 2_u32, const 3_u32]; // scope 0 at $DIR/array_index.rs:5:18: 5:30
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x00000000))
// mir::Constant
// + span: $DIR/array_index.rs:5:19: 5:20
// + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) }
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/array_index.rs:5:22: 5:23
// + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) }
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x00000002))
// mir::Constant
// + span: $DIR/array_index.rs:5:25: 5:26
// + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) }
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x00000003))
// mir::Constant
// + span: $DIR/array_index.rs:5:28: 5:29
// + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) }
StorageLive(_3); // scope 0 at $DIR/array_index.rs:5:31: 5:32
_3 = const 2_usize; // scope 0 at $DIR/array_index.rs:5:31: 5:32
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x00000002))
// mir::Constant
// + span: $DIR/array_index.rs:5:31: 5:32
// + literal: Const { ty: usize, val: Value(Scalar(0x00000002)) }
_4 = const 4_usize; // scope 0 at $DIR/array_index.rs:5:18: 5:33
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x00000004))
// mir::Constant
// + span: $DIR/array_index.rs:5:18: 5:33
// + literal: Const { ty: usize, val: Value(Scalar(0x00000004)) }
- _5 = Lt(_3, _4); // scope 0 at $DIR/array_index.rs:5:18: 5:33
- assert(move _5, "index out of bounds: the len is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/array_index.rs:5:18: 5:33
+ _5 = const true; // scope 0 at $DIR/array_index.rs:5:18: 5:33
+ // ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x01))
+ // mir::Constant
+ // + span: $DIR/array_index.rs:5:18: 5:33
+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
+ assert(const true, "index out of bounds: the len is {} but the index is {}", const 4_usize, const 2_usize) -> bb1; // scope 0 at $DIR/array_index.rs:5:18: 5:33
+ // ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x01))
+ // mir::Constant
+ // + span: $DIR/array_index.rs:5:18: 5:33
+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x00000004))
+ // mir::Constant
+ // + span: $DIR/array_index.rs:5:18: 5:33
+ // + literal: Const { ty: usize, val: Value(Scalar(0x00000004)) }
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x00000002))
+ // mir::Constant
+ // + span: $DIR/array_index.rs:5:18: 5:33
+ // + literal: Const { ty: usize, val: Value(Scalar(0x00000002)) }
}
bb1: {
- _1 = _2[_3]; // scope 0 at $DIR/array_index.rs:5:18: 5:33
+ _1 = const 2_u32; // scope 0 at $DIR/array_index.rs:5:18: 5:33
+ // ty::Const
+ // + ty: u32
+ // + val: Value(Scalar(0x00000002))
+ // mir::Constant
+ // + span: $DIR/array_index.rs:5:18: 5:33
+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) }
StorageDead(_3); // scope 0 at $DIR/array_index.rs:5:33: 5:34
StorageDead(_2); // scope 0 at $DIR/array_index.rs:5:33: 5:34
_0 = const (); // scope 0 at $DIR/array_index.rs:4:11: 6:2
......
......@@ -16,84 +16,18 @@
StorageLive(_1); // scope 0 at $DIR/array_index.rs:5:9: 5:10
StorageLive(_2); // scope 0 at $DIR/array_index.rs:5:18: 5:30
_2 = [const 0_u32, const 1_u32, const 2_u32, const 3_u32]; // scope 0 at $DIR/array_index.rs:5:18: 5:30
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x00000000))
// mir::Constant
// + span: $DIR/array_index.rs:5:19: 5:20
// + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) }
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/array_index.rs:5:22: 5:23
// + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) }
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x00000002))
// mir::Constant
// + span: $DIR/array_index.rs:5:25: 5:26
// + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) }
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x00000003))
// mir::Constant
// + span: $DIR/array_index.rs:5:28: 5:29
// + literal: Const { ty: u32, val: Value(Scalar(0x00000003)) }
StorageLive(_3); // scope 0 at $DIR/array_index.rs:5:31: 5:32
_3 = const 2_usize; // scope 0 at $DIR/array_index.rs:5:31: 5:32
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x0000000000000002))
// mir::Constant
// + span: $DIR/array_index.rs:5:31: 5:32
// + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000002)) }
_4 = const 4_usize; // scope 0 at $DIR/array_index.rs:5:18: 5:33
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x0000000000000004))
// mir::Constant
// + span: $DIR/array_index.rs:5:18: 5:33
// + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000004)) }
- _5 = Lt(_3, _4); // scope 0 at $DIR/array_index.rs:5:18: 5:33
- assert(move _5, "index out of bounds: the len is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/array_index.rs:5:18: 5:33
+ _5 = const true; // scope 0 at $DIR/array_index.rs:5:18: 5:33
+ // ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x01))
+ // mir::Constant
+ // + span: $DIR/array_index.rs:5:18: 5:33
+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
+ assert(const true, "index out of bounds: the len is {} but the index is {}", const 4_usize, const 2_usize) -> bb1; // scope 0 at $DIR/array_index.rs:5:18: 5:33
+ // ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x01))
+ // mir::Constant
+ // + span: $DIR/array_index.rs:5:18: 5:33
+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x0000000000000004))
+ // mir::Constant
+ // + span: $DIR/array_index.rs:5:18: 5:33
+ // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000004)) }
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x0000000000000002))
+ // mir::Constant
+ // + span: $DIR/array_index.rs:5:18: 5:33
+ // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000002)) }
}
bb1: {
- _1 = _2[_3]; // scope 0 at $DIR/array_index.rs:5:18: 5:33
+ _1 = const 2_u32; // scope 0 at $DIR/array_index.rs:5:18: 5:33
+ // ty::Const
+ // + ty: u32
+ // + val: Value(Scalar(0x00000002))
+ // mir::Constant
+ // + span: $DIR/array_index.rs:5:18: 5:33
+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) }
StorageDead(_3); // scope 0 at $DIR/array_index.rs:5:33: 5:34
StorageDead(_2); // scope 0 at $DIR/array_index.rs:5:33: 5:34
_0 = const (); // scope 0 at $DIR/array_index.rs:4:11: 6:2
......
......@@ -20,119 +20,30 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/bad_op_div_by_zero.rs:4:9: 4:10
_1 = const 0_i32; // scope 0 at $DIR/bad_op_div_by_zero.rs:4:13: 4:14
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000000))
// mir::Constant
// + span: $DIR/bad_op_div_by_zero.rs:4:13: 4:14
// + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
StorageLive(_2); // scope 1 at $DIR/bad_op_div_by_zero.rs:5:9: 5:11
StorageLive(_3); // scope 1 at $DIR/bad_op_div_by_zero.rs:5:18: 5:19
- _3 = _1; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:18: 5:19
- _4 = Eq(_3, const 0_i32); // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
+ _3 = const 0_i32; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:18: 5:19
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000000))
// mir::Constant
- // + span: $DIR/bad_op_div_by_zero.rs:5:14: 5:19
+ // + span: $DIR/bad_op_div_by_zero.rs:5:18: 5:19
// + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
- assert(!move _4, "attempt to divide {} by zero", const 1_i32) -> bb1; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
+ _3 = const 0_i32; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:18: 5:19
+ _4 = const true; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
// ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x01))
+ // mir::Constant
+ // + span: $DIR/bad_op_div_by_zero.rs:5:14: 5:19
+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
+ assert(!const true, "attempt to divide {} by zero", const 1_i32) -> bb1; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
+ // ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x01))
+ // mir::Constant
+ // + span: $DIR/bad_op_div_by_zero.rs:5:14: 5:19
+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
+ // ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/bad_op_div_by_zero.rs:5:14: 5:15
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
}
bb1: {
- _5 = Eq(_3, const -1_i32); // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
+ _5 = const false; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
// ty::Const
- // + ty: i32
- // + val: Value(Scalar(0xffffffff))
+ // + ty: bool
+ // + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/bad_op_div_by_zero.rs:5:14: 5:19
- // + literal: Const { ty: i32, val: Value(Scalar(0xffffffff)) }
- _6 = Eq(const 1_i32, const i32::MIN); // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
+ _6 = const false; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
// ty::Const
- // + ty: i32
- // + val: Value(Scalar(0x00000001))
+ // + ty: bool
+ // + val: Value(Scalar(0x00))
// mir::Constant
- // + span: $DIR/bad_op_div_by_zero.rs:5:14: 5:15
- // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
+ // + span: $DIR/bad_op_div_by_zero.rs:5:14: 5:19
+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
+ _7 = const false; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
// ty::Const
- // + ty: i32
- // + val: Value(Scalar(0x80000000))
+ // + ty: bool
+ // + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/bad_op_div_by_zero.rs:5:14: 5:19
- // + literal: Const { ty: i32, val: Value(Scalar(0x80000000)) }
- _7 = BitAnd(move _5, move _6); // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
- assert(!move _7, "attempt to compute `{} / {}` which would overflow", const 1_i32, _3) -> bb2; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
+ _5 = const false; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
+ _6 = const false; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
+ _7 = const false; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
+ assert(!const false, "attempt to compute `{} / {}` which would overflow", const 1_i32, const 0_i32) -> bb2; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
// ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x00))
+ // mir::Constant
+ // + span: $DIR/bad_op_div_by_zero.rs:5:14: 5:19
+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
+ // ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/bad_op_div_by_zero.rs:5:14: 5:15
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
+ // ty::Const
+ // + ty: i32
+ // + val: Value(Scalar(0x00000000))
+ // mir::Constant
+ // + span: $DIR/bad_op_div_by_zero.rs:5:14: 5:19
+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
}
bb2: {
- _2 = Div(const 1_i32, move _3); // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
+ _2 = Div(const 1_i32, const 0_i32); // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/bad_op_div_by_zero.rs:5:14: 5:15
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
+ // ty::Const
+ // + ty: i32
+ // + val: Value(Scalar(0x00000000))
+ // mir::Constant
+ // + span: $DIR/bad_op_div_by_zero.rs:5:14: 5:19
+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
StorageDead(_3); // scope 1 at $DIR/bad_op_div_by_zero.rs:5:18: 5:19
_0 = const (); // scope 0 at $DIR/bad_op_div_by_zero.rs:3:11: 6:2
// ty::Const
......
......@@ -20,119 +20,30 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/bad_op_mod_by_zero.rs:4:9: 4:10
_1 = const 0_i32; // scope 0 at $DIR/bad_op_mod_by_zero.rs:4:13: 4:14
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000000))
// mir::Constant
// + span: $DIR/bad_op_mod_by_zero.rs:4:13: 4:14
// + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
StorageLive(_2); // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:9: 5:11
StorageLive(_3); // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:18: 5:19
- _3 = _1; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:18: 5:19
- _4 = Eq(_3, const 0_i32); // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
+ _3 = const 0_i32; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:18: 5:19
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000000))
// mir::Constant
- // + span: $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
+ // + span: $DIR/bad_op_mod_by_zero.rs:5:18: 5:19
// + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
- assert(!move _4, "attempt to calculate the remainder of {} with a divisor of zero", const 1_i32) -> bb1; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
+ _3 = const 0_i32; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:18: 5:19
+ _4 = const true; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
// ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x01))
+ // mir::Constant
+ // + span: $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
+ assert(!const true, "attempt to calculate the remainder of {} with a divisor of zero", const 1_i32) -> bb1; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
+ // ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x01))
+ // mir::Constant
+ // + span: $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
+ // ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/bad_op_mod_by_zero.rs:5:14: 5:15
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
}
bb1: {
- _5 = Eq(_3, const -1_i32); // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
+ _5 = const false; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
// ty::Const
- // + ty: i32
- // + val: Value(Scalar(0xffffffff))
+ // + ty: bool
+ // + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
- // + literal: Const { ty: i32, val: Value(Scalar(0xffffffff)) }
- _6 = Eq(const 1_i32, const i32::MIN); // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
+ _6 = const false; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
// ty::Const
- // + ty: i32
- // + val: Value(Scalar(0x00000001))
+ // + ty: bool
+ // + val: Value(Scalar(0x00))
// mir::Constant
- // + span: $DIR/bad_op_mod_by_zero.rs:5:14: 5:15
- // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
+ // + span: $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
+ _7 = const false; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
// ty::Const
- // + ty: i32
- // + val: Value(Scalar(0x80000000))
+ // + ty: bool
+ // + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
- // + literal: Const { ty: i32, val: Value(Scalar(0x80000000)) }
- _7 = BitAnd(move _5, move _6); // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
- assert(!move _7, "attempt to compute the remainder of `{} % {}` which would overflow", const 1_i32, _3) -> bb2; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
+ _5 = const false; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
+ _6 = const false; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
+ _7 = const false; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
+ assert(!const false, "attempt to compute the remainder of `{} % {}` which would overflow", const 1_i32, const 0_i32) -> bb2; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
// ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x00))
+ // mir::Constant
+ // + span: $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
+ // ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/bad_op_mod_by_zero.rs:5:14: 5:15
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
+ // ty::Const
+ // + ty: i32
+ // + val: Value(Scalar(0x00000000))
+ // mir::Constant
+ // + span: $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
}
bb2: {
- _2 = Rem(const 1_i32, move _3); // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
+ _2 = Rem(const 1_i32, const 0_i32); // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/bad_op_mod_by_zero.rs:5:14: 5:15
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
+ // ty::Const
+ // + ty: i32
+ // + val: Value(Scalar(0x00000000))
+ // mir::Constant
+ // + span: $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
StorageDead(_3); // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:18: 5:19
_0 = const (); // scope 0 at $DIR/bad_op_mod_by_zero.rs:3:11: 6:2
// ty::Const
......
......@@ -40,29 +40,11 @@
StorageLive(_5); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:13: 7:15
StorageLive(_6); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:23: 7:24
_6 = const 3_usize; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:23: 7:24
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x00000003))
// mir::Constant
// + span: $DIR/bad_op_unsafe_oob_for_slices.rs:7:23: 7:24
// + literal: Const { ty: usize, val: Value(Scalar(0x00000003)) }
_7 = Len((*_1)); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
- _8 = Lt(_6, _7); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
- assert(move _8, "index out of bounds: the len is {} but the index is {}", move _7, _6) -> bb1; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
+ _8 = Lt(const 3_usize, _7); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x00000003))
+ // mir::Constant
+ // + span: $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
+ // + literal: Const { ty: usize, val: Value(Scalar(0x00000003)) }
+ assert(move _8, "index out of bounds: the len is {} but the index is {}", move _7, const 3_usize) -> bb1; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x00000003))
+ // mir::Constant
+ // + span: $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
+ // + literal: Const { ty: usize, val: Value(Scalar(0x00000003)) }
}
bb1: {
......
......@@ -40,29 +40,11 @@
StorageLive(_5); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:13: 7:15
StorageLive(_6); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:23: 7:24
_6 = const 3_usize; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:23: 7:24
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x0000000000000003))
// mir::Constant
// + span: $DIR/bad_op_unsafe_oob_for_slices.rs:7:23: 7:24
// + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000003)) }
_7 = Len((*_1)); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
- _8 = Lt(_6, _7); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
- assert(move _8, "index out of bounds: the len is {} but the index is {}", move _7, _6) -> bb1; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
+ _8 = Lt(const 3_usize, _7); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x0000000000000003))
+ // mir::Constant
+ // + span: $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
+ // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000003)) }
+ assert(move _8, "index out of bounds: the len is {} but the index is {}", move _7, const 3_usize) -> bb1; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x0000000000000003))
+ // mir::Constant
+ // + span: $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
+ // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000003)) }
}
bb1: {
......
......@@ -16,35 +16,15 @@
_4 = _2; // scope 0 at $DIR/boolean_identities.rs:5:6: 5:7
- _3 = BitOr(move _4, const true); // scope 0 at $DIR/boolean_identities.rs:5:5: 5:15
+ _3 = const true; // scope 0 at $DIR/boolean_identities.rs:5:5: 5:15
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x01))
// mir::Constant
- // + span: $DIR/boolean_identities.rs:5:10: 5:14
+ // + span: $DIR/boolean_identities.rs:5:5: 5:15
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
StorageDead(_4); // scope 0 at $DIR/boolean_identities.rs:5:14: 5:15
StorageLive(_5); // scope 0 at $DIR/boolean_identities.rs:5:18: 5:29
StorageLive(_6); // scope 0 at $DIR/boolean_identities.rs:5:19: 5:20
_6 = _1; // scope 0 at $DIR/boolean_identities.rs:5:19: 5:20
- _5 = BitAnd(move _6, const false); // scope 0 at $DIR/boolean_identities.rs:5:18: 5:29
+ _5 = const false; // scope 0 at $DIR/boolean_identities.rs:5:18: 5:29
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
- // + span: $DIR/boolean_identities.rs:5:23: 5:28
+ // + span: $DIR/boolean_identities.rs:5:18: 5:29
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
StorageDead(_6); // scope 0 at $DIR/boolean_identities.rs:5:28: 5:29
- _0 = BitAnd(move _3, move _5); // scope 0 at $DIR/boolean_identities.rs:5:5: 5:29
+ _0 = const false; // scope 0 at $DIR/boolean_identities.rs:5:5: 5:29
+ // ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x00))
+ // mir::Constant
+ // + span: $DIR/boolean_identities.rs:5:5: 5:29
+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
StorageDead(_5); // scope 0 at $DIR/boolean_identities.rs:5:28: 5:29
StorageDead(_3); // scope 0 at $DIR/boolean_identities.rs:5:28: 5:29
return; // scope 0 at $DIR/boolean_identities.rs:6:2: 6:2
......
......@@ -18,22 +18,10 @@
StorageLive(_4); // scope 0 at $DIR/boxes.rs:12:14: 12:22
_4 = Box(i32); // scope 0 at $DIR/boxes.rs:12:14: 12:22
(*_4) = const 42_i32; // scope 0 at $DIR/boxes.rs:12:19: 12:21
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x0000002a))
// mir::Constant
// + span: $DIR/boxes.rs:12:19: 12:21
// + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) }
_3 = move _4; // scope 0 at $DIR/boxes.rs:12:14: 12:22
StorageDead(_4); // scope 0 at $DIR/boxes.rs:12:21: 12:22
_2 = (*_3); // scope 0 at $DIR/boxes.rs:12:13: 12:22
_1 = Add(move _2, const 0_i32); // scope 0 at $DIR/boxes.rs:12:13: 12:26
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000000))
// mir::Constant
// + span: $DIR/boxes.rs:12:25: 12:26
// + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
StorageDead(_2); // scope 0 at $DIR/boxes.rs:12:25: 12:26
drop(_3) -> [return: bb2, unwind: bb1]; // scope 0 at $DIR/boxes.rs:12:26: 12:27
}
......
......@@ -16,29 +16,9 @@
StorageLive(_1); // scope 0 at $DIR/cast.rs:4:9: 4:10
- _1 = const 42_u8 as u32 (Misc); // scope 0 at $DIR/cast.rs:4:13: 4:24
+ _1 = const 42_u32; // scope 0 at $DIR/cast.rs:4:13: 4:24
// ty::Const
- // + ty: u8
- // + val: Value(Scalar(0x2a))
- // mir::Constant
- // + span: $DIR/cast.rs:4:13: 4:17
- // + literal: Const { ty: u8, val: Value(Scalar(0x2a)) }
- StorageLive(_2); // scope 1 at $DIR/cast.rs:6:9: 6:10
StorageLive(_2); // scope 1 at $DIR/cast.rs:6:9: 6:10
- _2 = const 42_u32 as u8 (Misc); // scope 1 at $DIR/cast.rs:6:13: 6:24
- // ty::Const
// + ty: u32
// + val: Value(Scalar(0x0000002a))
// mir::Constant
- // + span: $DIR/cast.rs:6:13: 6:18
+ // + span: $DIR/cast.rs:4:13: 4:24
// + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) }
+ StorageLive(_2); // scope 1 at $DIR/cast.rs:6:9: 6:10
+ _2 = const 42_u8; // scope 1 at $DIR/cast.rs:6:13: 6:24
+ // ty::Const
+ // + ty: u8
+ // + val: Value(Scalar(0x2a))
+ // mir::Constant
+ // + span: $DIR/cast.rs:6:13: 6:24
+ // + literal: Const { ty: u8, val: Value(Scalar(0x2a)) }
_0 = const (); // scope 0 at $DIR/cast.rs:3:11: 7:2
// ty::Const
// + ty: ()
......
......@@ -12,57 +12,14 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/checked_add.rs:5:9: 5:10
- _2 = CheckedAdd(const 1_u32, const 1_u32); // scope 0 at $DIR/checked_add.rs:5:18: 5:23
+ _2 = (const 2_u32, const false); // scope 0 at $DIR/checked_add.rs:5:18: 5:23
// ty::Const
// + ty: u32
- // + val: Value(Scalar(0x00000001))
+ // + val: Value(Scalar(0x00000002))
// mir::Constant
- // + span: $DIR/checked_add.rs:5:18: 5:19
- // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) }
+ // + span: $DIR/checked_add.rs:5:18: 5:23
+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) }
// ty::Const
- // + ty: u32
- // + val: Value(Scalar(0x00000001))
+ // + ty: bool
+ // + val: Value(Scalar(0x00))
// mir::Constant
- // + span: $DIR/checked_add.rs:5:22: 5:23
- // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) }
- assert(!move (_2.1: bool), "attempt to compute `{} + {}` which would overflow", const 1_u32, const 1_u32) -> bb1; // scope 0 at $DIR/checked_add.rs:5:18: 5:23
+ // + span: $DIR/checked_add.rs:5:18: 5:23
+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
+ _2 = (const 2_u32, const false); // scope 0 at $DIR/checked_add.rs:5:18: 5:23
+ assert(!const false, "attempt to compute `{} + {}` which would overflow", const 1_u32, const 1_u32) -> bb1; // scope 0 at $DIR/checked_add.rs:5:18: 5:23
// ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x00))
+ // mir::Constant
+ // + span: $DIR/checked_add.rs:5:18: 5:23
+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
+ // ty::Const
// + ty: u32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/checked_add.rs:5:18: 5:19
// + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) }
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/checked_add.rs:5:22: 5:23
// + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) }
}
bb1: {
- _1 = move (_2.0: u32); // scope 0 at $DIR/checked_add.rs:5:18: 5:23
+ _1 = const 2_u32; // scope 0 at $DIR/checked_add.rs:5:18: 5:23
+ // ty::Const
+ // + ty: u32
+ // + val: Value(Scalar(0x00000002))
+ // mir::Constant
+ // + span: $DIR/checked_add.rs:5:18: 5:23
+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) }
_0 = const (); // scope 0 at $DIR/checked_add.rs:4:11: 6:2
// ty::Const
// + ty: ()
......
......@@ -9,23 +9,9 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/control-flow-simplification.rs:12:8: 12:21
- _1 = const <bool as NeedsDrop>::NEEDS; // scope 0 at $DIR/control-flow-simplification.rs:12:8: 12:21
+ _1 = const false; // scope 0 at $DIR/control-flow-simplification.rs:12:8: 12:21
// ty::Const
// + ty: bool
- // + val: Unevaluated(WithOptConstParam { did: DefId(0:4 ~ control_flow_simplification[317d]::NeedsDrop[0]::NEEDS[0]), const_param_did: None }, [bool], None)
+ // + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/control-flow-simplification.rs:12:8: 12:21
- // + literal: Const { ty: bool, val: Unevaluated(WithOptConstParam { did: DefId(0:4 ~ control_flow_simplification[317d]::NeedsDrop[0]::NEEDS[0]), const_param_did: None }, [bool], None) }
- switchInt(_1) -> [false: bb1, otherwise: bb2]; // scope 0 at $DIR/control-flow-simplification.rs:12:5: 14:6
+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
+ _1 = const false; // scope 0 at $DIR/control-flow-simplification.rs:12:8: 12:21
+ switchInt(const false) -> [false: bb1, otherwise: bb2]; // scope 0 at $DIR/control-flow-simplification.rs:12:5: 14:6
+ // ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x00))
+ // mir::Constant
+ // + span: $DIR/control-flow-simplification.rs:12:5: 14:6
+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
}
bb1: {
......
......@@ -16,39 +16,15 @@
StorageLive(_2); // scope 0 at $DIR/discriminant.rs:11:13: 11:64
StorageLive(_3); // scope 0 at $DIR/discriminant.rs:11:34: 11:44
((_3 as Some).0: bool) = const true; // scope 0 at $DIR/discriminant.rs:11:34: 11:44
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/discriminant.rs:11:39: 11:43
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
discriminant(_3) = 1; // scope 0 at $DIR/discriminant.rs:11:34: 11:44
- _4 = discriminant(_3); // scope 0 at $DIR/discriminant.rs:11:21: 11:31
- switchInt(move _4) -> [1_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/discriminant.rs:11:21: 11:31
+ _4 = const 1_isize; // scope 0 at $DIR/discriminant.rs:11:21: 11:31
+ // ty::Const
+ // + ty: isize
+ // + val: Value(Scalar(0x00000001))
+ // mir::Constant
+ // + span: $DIR/discriminant.rs:11:21: 11:31
+ // + literal: Const { ty: isize, val: Value(Scalar(0x00000001)) }
+ switchInt(const 1_isize) -> [1_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/discriminant.rs:11:21: 11:31
+ // ty::Const
+ // + ty: isize
+ // + val: Value(Scalar(0x00000001))
+ // mir::Constant
+ // + span: $DIR/discriminant.rs:11:21: 11:31
+ // + literal: Const { ty: isize, val: Value(Scalar(0x00000001)) }
}
bb1: {
_2 = const 10_i32; // scope 0 at $DIR/discriminant.rs:11:59: 11:61
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x0000000a))
// mir::Constant
// + span: $DIR/discriminant.rs:11:59: 11:61
// + literal: Const { ty: i32, val: Value(Scalar(0x0000000a)) }
goto -> bb4; // scope 0 at $DIR/discriminant.rs:11:13: 11:64
}
......@@ -58,23 +34,11 @@
bb3: {
_2 = const 42_i32; // scope 0 at $DIR/discriminant.rs:11:47: 11:49
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x0000002a))
// mir::Constant
// + span: $DIR/discriminant.rs:11:47: 11:49
// + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) }
goto -> bb4; // scope 0 at $DIR/discriminant.rs:11:13: 11:64
}
bb4: {
_1 = Add(move _2, const 0_i32); // scope 0 at $DIR/discriminant.rs:11:13: 11:68
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000000))
// mir::Constant
// + span: $DIR/discriminant.rs:11:67: 11:68
// + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
StorageDead(_2); // scope 0 at $DIR/discriminant.rs:11:67: 11:68
StorageDead(_3); // scope 0 at $DIR/discriminant.rs:11:68: 11:69
_0 = const (); // scope 0 at $DIR/discriminant.rs:10:11: 12:2
......
......@@ -16,39 +16,15 @@
StorageLive(_2); // scope 0 at $DIR/discriminant.rs:11:13: 11:64
StorageLive(_3); // scope 0 at $DIR/discriminant.rs:11:34: 11:44
((_3 as Some).0: bool) = const true; // scope 0 at $DIR/discriminant.rs:11:34: 11:44
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/discriminant.rs:11:39: 11:43
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
discriminant(_3) = 1; // scope 0 at $DIR/discriminant.rs:11:34: 11:44
- _4 = discriminant(_3); // scope 0 at $DIR/discriminant.rs:11:21: 11:31
- switchInt(move _4) -> [1_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/discriminant.rs:11:21: 11:31
+ _4 = const 1_isize; // scope 0 at $DIR/discriminant.rs:11:21: 11:31
+ // ty::Const
+ // + ty: isize
+ // + val: Value(Scalar(0x0000000000000001))
+ // mir::Constant
+ // + span: $DIR/discriminant.rs:11:21: 11:31
+ // + literal: Const { ty: isize, val: Value(Scalar(0x0000000000000001)) }
+ switchInt(const 1_isize) -> [1_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/discriminant.rs:11:21: 11:31
+ // ty::Const
+ // + ty: isize
+ // + val: Value(Scalar(0x0000000000000001))
+ // mir::Constant
+ // + span: $DIR/discriminant.rs:11:21: 11:31
+ // + literal: Const { ty: isize, val: Value(Scalar(0x0000000000000001)) }
}
bb1: {
_2 = const 10_i32; // scope 0 at $DIR/discriminant.rs:11:59: 11:61
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x0000000a))
// mir::Constant
// + span: $DIR/discriminant.rs:11:59: 11:61
// + literal: Const { ty: i32, val: Value(Scalar(0x0000000a)) }
goto -> bb4; // scope 0 at $DIR/discriminant.rs:11:13: 11:64
}
......@@ -58,23 +34,11 @@
bb3: {
_2 = const 42_i32; // scope 0 at $DIR/discriminant.rs:11:47: 11:49
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x0000002a))
// mir::Constant
// + span: $DIR/discriminant.rs:11:47: 11:49
// + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) }
goto -> bb4; // scope 0 at $DIR/discriminant.rs:11:13: 11:64
}
bb4: {
_1 = Add(move _2, const 0_i32); // scope 0 at $DIR/discriminant.rs:11:13: 11:68
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000000))
// mir::Constant
// + span: $DIR/discriminant.rs:11:67: 11:68
// + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
StorageDead(_2); // scope 0 at $DIR/discriminant.rs:11:67: 11:68
StorageDead(_3); // scope 0 at $DIR/discriminant.rs:11:68: 11:69
_0 = const (); // scope 0 at $DIR/discriminant.rs:10:11: 12:2
......
......@@ -14,65 +14,16 @@
StorageLive(_1); // scope 0 at $DIR/indirect.rs:5:9: 5:10
StorageLive(_2); // scope 0 at $DIR/indirect.rs:5:13: 5:25
- _2 = const 2_u32 as u8 (Misc); // scope 0 at $DIR/indirect.rs:5:13: 5:25
+ _2 = const 2_u8; // scope 0 at $DIR/indirect.rs:5:13: 5:25
// ty::Const
- // + ty: u32
- // + val: Value(Scalar(0x00000002))
+ // + ty: u8
+ // + val: Value(Scalar(0x02))
// mir::Constant
- // + span: $DIR/indirect.rs:5:14: 5:18
- // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) }
- _3 = CheckedAdd(_2, const 1_u8); // scope 0 at $DIR/indirect.rs:5:13: 5:29
+ // + span: $DIR/indirect.rs:5:13: 5:25
+ // + literal: Const { ty: u8, val: Value(Scalar(0x02)) }
+ _3 = (const 3_u8, const false); // scope 0 at $DIR/indirect.rs:5:13: 5:29
// ty::Const
// + ty: u8
- // + val: Value(Scalar(0x01))
+ // + val: Value(Scalar(0x03))
// mir::Constant
- // + span: $DIR/indirect.rs:5:28: 5:29
- // + literal: Const { ty: u8, val: Value(Scalar(0x01)) }
- assert(!move (_3.1: bool), "attempt to compute `{} + {}` which would overflow", move _2, const 1_u8) -> bb1; // scope 0 at $DIR/indirect.rs:5:13: 5:29
+ // + span: $DIR/indirect.rs:5:13: 5:29
+ // + literal: Const { ty: u8, val: Value(Scalar(0x03)) }
// ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x00))
+ // mir::Constant
+ // + span: $DIR/indirect.rs:5:13: 5:29
+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
+ _2 = const 2_u8; // scope 0 at $DIR/indirect.rs:5:13: 5:25
+ _3 = (const 3_u8, const false); // scope 0 at $DIR/indirect.rs:5:13: 5:29
+ assert(!const false, "attempt to compute `{} + {}` which would overflow", const 2_u8, const 1_u8) -> bb1; // scope 0 at $DIR/indirect.rs:5:13: 5:29
+ // ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x00))
+ // mir::Constant
+ // + span: $DIR/indirect.rs:5:13: 5:29
+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
+ // ty::Const
// + ty: u8
+ // + val: Value(Scalar(0x02))
+ // mir::Constant
+ // + span: $DIR/indirect.rs:5:13: 5:29
+ // + literal: Const { ty: u8, val: Value(Scalar(0x02)) }
+ // ty::Const
+ // + ty: u8
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/indirect.rs:5:28: 5:29
// + literal: Const { ty: u8, val: Value(Scalar(0x01)) }
}
bb1: {
- _1 = move (_3.0: u8); // scope 0 at $DIR/indirect.rs:5:13: 5:29
+ _1 = const 3_u8; // scope 0 at $DIR/indirect.rs:5:13: 5:29
+ // ty::Const
+ // + ty: u8
+ // + val: Value(Scalar(0x03))
+ // mir::Constant
+ // + span: $DIR/indirect.rs:5:13: 5:29
+ // + literal: Const { ty: u8, val: Value(Scalar(0x03)) }
StorageDead(_2); // scope 0 at $DIR/indirect.rs:5:28: 5:29
_0 = const (); // scope 0 at $DIR/indirect.rs:4:11: 6:2
// ty::Const
......
......@@ -20,19 +20,7 @@
+ // + span: $DIR/issue-66971.rs:16:12: 16:22
+ // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
(_2.1: u8) = const 0_u8; // scope 0 at $DIR/issue-66971.rs:16:12: 16:22
// ty::Const
// + ty: u8
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/issue-66971.rs:16:17: 16:18
// + literal: Const { ty: u8, val: Value(Scalar(0x00)) }
(_2.2: u8) = const 0_u8; // scope 0 at $DIR/issue-66971.rs:16:12: 16:22
// ty::Const
// + ty: u8
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/issue-66971.rs:16:20: 16:21
// + literal: Const { ty: u8, val: Value(Scalar(0x00)) }
StorageDead(_3); // scope 0 at $DIR/issue-66971.rs:16:21: 16:22
_1 = const encode(move _2) -> bb1; // scope 0 at $DIR/issue-66971.rs:16:5: 16:23
// ty::Const
......
......@@ -12,33 +12,9 @@
StorageLive(_2); // scope 0 at $DIR/issue-67019.rs:11:10: 11:19
StorageLive(_3); // scope 0 at $DIR/issue-67019.rs:11:11: 11:17
(_3.0: u8) = const 1_u8; // scope 0 at $DIR/issue-67019.rs:11:11: 11:17
// ty::Const
// + ty: u8
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/issue-67019.rs:11:12: 11:13
// + literal: Const { ty: u8, val: Value(Scalar(0x01)) }
(_3.1: u8) = const 2_u8; // scope 0 at $DIR/issue-67019.rs:11:11: 11:17
// ty::Const
// + ty: u8
// + val: Value(Scalar(0x02))
// mir::Constant
// + span: $DIR/issue-67019.rs:11:15: 11:16
// + literal: Const { ty: u8, val: Value(Scalar(0x02)) }
- (_2.0: (u8, u8)) = move _3; // scope 0 at $DIR/issue-67019.rs:11:10: 11:19
+ (_2.0: (u8, u8)) = (const 1_u8, const 2_u8); // scope 0 at $DIR/issue-67019.rs:11:10: 11:19
+ // ty::Const
+ // + ty: u8
+ // + val: Value(Scalar(0x01))
+ // mir::Constant
+ // + span: $DIR/issue-67019.rs:11:10: 11:19
+ // + literal: Const { ty: u8, val: Value(Scalar(0x01)) }
+ // ty::Const
+ // + ty: u8
+ // + val: Value(Scalar(0x02))
+ // mir::Constant
+ // + span: $DIR/issue-67019.rs:11:10: 11:19
+ // + literal: Const { ty: u8, val: Value(Scalar(0x02)) }
StorageDead(_3); // scope 0 at $DIR/issue-67019.rs:11:18: 11:19
_1 = const test(move _2) -> bb1; // scope 0 at $DIR/issue-67019.rs:11:5: 11:20
// ty::Const
......
......@@ -16,55 +16,13 @@
StorageLive(_1); // scope 0 at $DIR/large_array_index.rs:6:9: 6:10
StorageLive(_2); // scope 0 at $DIR/large_array_index.rs:6:17: 6:29
_2 = [const 0_u8; 5000]; // scope 0 at $DIR/large_array_index.rs:6:17: 6:29
// ty::Const
// + ty: u8
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/large_array_index.rs:6:18: 6:22
// + literal: Const { ty: u8, val: Value(Scalar(0x00)) }
StorageLive(_3); // scope 0 at $DIR/large_array_index.rs:6:30: 6:31
_3 = const 2_usize; // scope 0 at $DIR/large_array_index.rs:6:30: 6:31
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x00000002))
// mir::Constant
// + span: $DIR/large_array_index.rs:6:30: 6:31
// + literal: Const { ty: usize, val: Value(Scalar(0x00000002)) }
_4 = const 5000_usize; // scope 0 at $DIR/large_array_index.rs:6:17: 6:32
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x00001388))
// mir::Constant
// + span: $DIR/large_array_index.rs:6:17: 6:32
// + literal: Const { ty: usize, val: Value(Scalar(0x00001388)) }
- _5 = Lt(_3, _4); // scope 0 at $DIR/large_array_index.rs:6:17: 6:32
- assert(move _5, "index out of bounds: the len is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/large_array_index.rs:6:17: 6:32
+ _5 = const true; // scope 0 at $DIR/large_array_index.rs:6:17: 6:32
+ // ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x01))
+ // mir::Constant
+ // + span: $DIR/large_array_index.rs:6:17: 6:32
+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
+ assert(const true, "index out of bounds: the len is {} but the index is {}", const 5000_usize, const 2_usize) -> bb1; // scope 0 at $DIR/large_array_index.rs:6:17: 6:32
+ // ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x01))
+ // mir::Constant
+ // + span: $DIR/large_array_index.rs:6:17: 6:32
+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x00001388))
+ // mir::Constant
+ // + span: $DIR/large_array_index.rs:6:17: 6:32
+ // + literal: Const { ty: usize, val: Value(Scalar(0x00001388)) }
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x00000002))
+ // mir::Constant
+ // + span: $DIR/large_array_index.rs:6:17: 6:32
+ // + literal: Const { ty: usize, val: Value(Scalar(0x00000002)) }
}
bb1: {
......
......@@ -16,55 +16,13 @@
StorageLive(_1); // scope 0 at $DIR/large_array_index.rs:6:9: 6:10
StorageLive(_2); // scope 0 at $DIR/large_array_index.rs:6:17: 6:29
_2 = [const 0_u8; 5000]; // scope 0 at $DIR/large_array_index.rs:6:17: 6:29
// ty::Const
// + ty: u8
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/large_array_index.rs:6:18: 6:22
// + literal: Const { ty: u8, val: Value(Scalar(0x00)) }
StorageLive(_3); // scope 0 at $DIR/large_array_index.rs:6:30: 6:31
_3 = const 2_usize; // scope 0 at $DIR/large_array_index.rs:6:30: 6:31
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x0000000000000002))
// mir::Constant
// + span: $DIR/large_array_index.rs:6:30: 6:31
// + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000002)) }
_4 = const 5000_usize; // scope 0 at $DIR/large_array_index.rs:6:17: 6:32
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x0000000000001388))
// mir::Constant
// + span: $DIR/large_array_index.rs:6:17: 6:32
// + literal: Const { ty: usize, val: Value(Scalar(0x0000000000001388)) }
- _5 = Lt(_3, _4); // scope 0 at $DIR/large_array_index.rs:6:17: 6:32
- assert(move _5, "index out of bounds: the len is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/large_array_index.rs:6:17: 6:32
+ _5 = const true; // scope 0 at $DIR/large_array_index.rs:6:17: 6:32
+ // ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x01))
+ // mir::Constant
+ // + span: $DIR/large_array_index.rs:6:17: 6:32
+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
+ assert(const true, "index out of bounds: the len is {} but the index is {}", const 5000_usize, const 2_usize) -> bb1; // scope 0 at $DIR/large_array_index.rs:6:17: 6:32
+ // ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x01))
+ // mir::Constant
+ // + span: $DIR/large_array_index.rs:6:17: 6:32
+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x0000000000001388))
+ // mir::Constant
+ // + span: $DIR/large_array_index.rs:6:17: 6:32
+ // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000001388)) }
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x0000000000000002))
+ // mir::Constant
+ // + span: $DIR/large_array_index.rs:6:17: 6:32
+ // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000002)) }
}
bb1: {
......
......@@ -11,13 +11,6 @@
_2 = _1; // scope 0 at $DIR/mult_by_zero.rs:5:3: 5:4
- _0 = Mul(move _2, const 0_i32); // scope 0 at $DIR/mult_by_zero.rs:5:3: 5:8
+ _0 = const 0_i32; // scope 0 at $DIR/mult_by_zero.rs:5:3: 5:8
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000000))
// mir::Constant
- // + span: $DIR/mult_by_zero.rs:5:7: 5:8
+ // + span: $DIR/mult_by_zero.rs:5:3: 5:8
// + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
StorageDead(_2); // scope 0 at $DIR/mult_by_zero.rs:5:7: 5:8
return; // scope 0 at $DIR/mult_by_zero.rs:6:2: 6:2
}
......
......@@ -15,28 +15,10 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/mutable_variable.rs:5:9: 5:14
_1 = const 42_i32; // scope 0 at $DIR/mutable_variable.rs:5:17: 5:19
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x0000002a))
// mir::Constant
// + span: $DIR/mutable_variable.rs:5:17: 5:19
// + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) }
_1 = const 99_i32; // scope 1 at $DIR/mutable_variable.rs:6:5: 6:11
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000063))
// mir::Constant
// + span: $DIR/mutable_variable.rs:6:9: 6:11
// + literal: Const { ty: i32, val: Value(Scalar(0x00000063)) }
StorageLive(_2); // scope 1 at $DIR/mutable_variable.rs:7:9: 7:10
- _2 = _1; // scope 1 at $DIR/mutable_variable.rs:7:13: 7:14
+ _2 = const 99_i32; // scope 1 at $DIR/mutable_variable.rs:7:13: 7:14
+ // ty::Const
+ // + ty: i32
+ // + val: Value(Scalar(0x00000063))
+ // mir::Constant
+ // + span: $DIR/mutable_variable.rs:7:13: 7:14
+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000063)) }
_0 = const (); // scope 0 at $DIR/mutable_variable.rs:4:11: 8:2
// ty::Const
// + ty: ()
......
......@@ -15,41 +15,11 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/mutable_variable_aggregate.rs:5:9: 5:14
(_1.0: i32) = const 42_i32; // scope 0 at $DIR/mutable_variable_aggregate.rs:5:17: 5:25
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x0000002a))
// mir::Constant
// + span: $DIR/mutable_variable_aggregate.rs:5:18: 5:20
// + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) }
(_1.1: i32) = const 43_i32; // scope 0 at $DIR/mutable_variable_aggregate.rs:5:17: 5:25
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x0000002b))
// mir::Constant
// + span: $DIR/mutable_variable_aggregate.rs:5:22: 5:24
// + literal: Const { ty: i32, val: Value(Scalar(0x0000002b)) }
(_1.1: i32) = const 99_i32; // scope 1 at $DIR/mutable_variable_aggregate.rs:6:5: 6:13
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000063))
// mir::Constant
// + span: $DIR/mutable_variable_aggregate.rs:6:11: 6:13
// + literal: Const { ty: i32, val: Value(Scalar(0x00000063)) }
StorageLive(_2); // scope 1 at $DIR/mutable_variable_aggregate.rs:7:9: 7:10
- _2 = _1; // scope 1 at $DIR/mutable_variable_aggregate.rs:7:13: 7:14
+ _2 = (const 42_i32, const 99_i32); // scope 1 at $DIR/mutable_variable_aggregate.rs:7:13: 7:14
+ // ty::Const
+ // + ty: i32
+ // + val: Value(Scalar(0x0000002a))
+ // mir::Constant
+ // + span: $DIR/mutable_variable_aggregate.rs:7:13: 7:14
+ // + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) }
+ // ty::Const
+ // + ty: i32
+ // + val: Value(Scalar(0x00000063))
+ // mir::Constant
+ // + span: $DIR/mutable_variable_aggregate.rs:7:13: 7:14
+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000063)) }
_0 = const (); // scope 0 at $DIR/mutable_variable_aggregate.rs:4:11: 8:2
// ty::Const
// + ty: ()
......
......@@ -19,28 +19,10 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:5:9: 5:14
(_1.0: i32) = const 42_i32; // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:5:17: 5:25
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x0000002a))
// mir::Constant
// + span: $DIR/mutable_variable_aggregate_mut_ref.rs:5:18: 5:20
// + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) }
(_1.1: i32) = const 43_i32; // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:5:17: 5:25
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x0000002b))
// mir::Constant
// + span: $DIR/mutable_variable_aggregate_mut_ref.rs:5:22: 5:24
// + literal: Const { ty: i32, val: Value(Scalar(0x0000002b)) }
StorageLive(_2); // scope 1 at $DIR/mutable_variable_aggregate_mut_ref.rs:6:9: 6:10
_2 = &mut _1; // scope 1 at $DIR/mutable_variable_aggregate_mut_ref.rs:6:13: 6:19
((*_2).1: i32) = const 99_i32; // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:7:5: 7:13
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000063))
// mir::Constant
// + span: $DIR/mutable_variable_aggregate_mut_ref.rs:7:11: 7:13
// + literal: Const { ty: i32, val: Value(Scalar(0x00000063)) }
StorageLive(_3); // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:8:9: 8:10
_3 = _1; // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:8:13: 8:14
_0 = const (); // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:4:11: 9:2
......
......@@ -25,28 +25,10 @@
bb1: {
(_1.1: i32) = const 99_i32; // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:6:5: 6:13
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000063))
// mir::Constant
// + span: $DIR/mutable_variable_aggregate_partial_read.rs:6:11: 6:13
// + literal: Const { ty: i32, val: Value(Scalar(0x00000063)) }
(_1.0: i32) = const 42_i32; // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:7:5: 7:13
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x0000002a))
// mir::Constant
// + span: $DIR/mutable_variable_aggregate_partial_read.rs:7:11: 7:13
// + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) }
StorageLive(_2); // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:8:9: 8:10
- _2 = (_1.1: i32); // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:8:13: 8:16
+ _2 = const 99_i32; // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:8:13: 8:16
+ // ty::Const
+ // + ty: i32
+ // + val: Value(Scalar(0x00000063))
+ // mir::Constant
+ // + span: $DIR/mutable_variable_aggregate_partial_read.rs:8:13: 8:16
+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000063)) }
_0 = const (); // scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:4:11: 9:2
// ty::Const
// + ty: ()
......
......@@ -20,12 +20,6 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/mutable_variable_no_prop.rs:7:9: 7:14
_1 = const 42_u32; // scope 0 at $DIR/mutable_variable_no_prop.rs:7:17: 7:19
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x0000002a))
// mir::Constant
// + span: $DIR/mutable_variable_no_prop.rs:7:17: 7:19
// + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) }
StorageLive(_2); // scope 1 at $DIR/mutable_variable_no_prop.rs:8:5: 10:6
StorageLive(_3); // scope 2 at $DIR/mutable_variable_no_prop.rs:9:13: 9:19
StorageLive(_4); // scope 2 at $DIR/mutable_variable_no_prop.rs:9:13: 9:19
......
......@@ -35,19 +35,7 @@
bb1: {
StorageLive(_2); // scope 1 at $DIR/mutable_variable_unprop_assign.rs:6:9: 6:14
(_2.0: i32) = const 1_i32; // scope 1 at $DIR/mutable_variable_unprop_assign.rs:6:29: 6:35
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/mutable_variable_unprop_assign.rs:6:30: 6:31
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
(_2.1: i32) = const 2_i32; // scope 1 at $DIR/mutable_variable_unprop_assign.rs:6:29: 6:35
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000002))
// mir::Constant
// + span: $DIR/mutable_variable_unprop_assign.rs:6:33: 6:34
// + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) }
StorageLive(_3); // scope 2 at $DIR/mutable_variable_unprop_assign.rs:7:11: 7:12
_3 = _1; // scope 2 at $DIR/mutable_variable_unprop_assign.rs:7:11: 7:12
(_2.1: i32) = move _3; // scope 2 at $DIR/mutable_variable_unprop_assign.rs:7:5: 7:12
......
......@@ -25,176 +25,37 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10
- _2 = CheckedAdd(const 2_i32, const 2_i32); // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
+ _2 = (const 4_i32, const false); // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
// ty::Const
// + ty: i32
- // + val: Value(Scalar(0x00000002))
+ // + val: Value(Scalar(0x00000004))
// mir::Constant
- // + span: $DIR/optimizes_into_variable.rs:12:13: 12:14
- // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) }
+ // + span: $DIR/optimizes_into_variable.rs:12:13: 12:18
+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000004)) }
// ty::Const
- // + ty: i32
- // + val: Value(Scalar(0x00000002))
+ // + ty: bool
+ // + val: Value(Scalar(0x00))
// mir::Constant
- // + span: $DIR/optimizes_into_variable.rs:12:17: 12:18
- // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) }
- assert(!move (_2.1: bool), "attempt to compute `{} + {}` which would overflow", const 2_i32, const 2_i32) -> bb1; // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
+ // + span: $DIR/optimizes_into_variable.rs:12:13: 12:18
+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
+ _2 = (const 4_i32, const false); // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
+ assert(!const false, "attempt to compute `{} + {}` which would overflow", const 2_i32, const 2_i32) -> bb1; // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
// ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x00))
+ // mir::Constant
+ // + span: $DIR/optimizes_into_variable.rs:12:13: 12:18
+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
+ // ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000002))
// mir::Constant
// + span: $DIR/optimizes_into_variable.rs:12:13: 12:14
// + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) }
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000002))
// mir::Constant
// + span: $DIR/optimizes_into_variable.rs:12:17: 12:18
// + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) }
}
bb1: {
- _1 = move (_2.0: i32); // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
+ _1 = const 4_i32; // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
+ // ty::Const
+ // + ty: i32
+ // + val: Value(Scalar(0x00000004))
+ // mir::Constant
+ // + span: $DIR/optimizes_into_variable.rs:12:13: 12:18
+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000004)) }
StorageLive(_3); // scope 1 at $DIR/optimizes_into_variable.rs:13:9: 13:10
StorageLive(_4); // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:31
_4 = [const 0_i32, const 1_i32, const 2_i32, const 3_i32, const 4_i32, const 5_i32]; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:31
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000000))
// mir::Constant
// + span: $DIR/optimizes_into_variable.rs:13:14: 13:15
// + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/optimizes_into_variable.rs:13:17: 13:18
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000002))
// mir::Constant
// + span: $DIR/optimizes_into_variable.rs:13:20: 13:21
// + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) }
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000003))
// mir::Constant
// + span: $DIR/optimizes_into_variable.rs:13:23: 13:24
// + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) }
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000004))
// mir::Constant
// + span: $DIR/optimizes_into_variable.rs:13:26: 13:27
// + literal: Const { ty: i32, val: Value(Scalar(0x00000004)) }
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000005))
// mir::Constant
// + span: $DIR/optimizes_into_variable.rs:13:29: 13:30
// + literal: Const { ty: i32, val: Value(Scalar(0x00000005)) }
StorageLive(_5); // scope 1 at $DIR/optimizes_into_variable.rs:13:32: 13:33
_5 = const 3_usize; // scope 1 at $DIR/optimizes_into_variable.rs:13:32: 13:33
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x00000003))
// mir::Constant
// + span: $DIR/optimizes_into_variable.rs:13:32: 13:33
// + literal: Const { ty: usize, val: Value(Scalar(0x00000003)) }
_6 = const 6_usize; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x00000006))
// mir::Constant
// + span: $DIR/optimizes_into_variable.rs:13:13: 13:34
// + literal: Const { ty: usize, val: Value(Scalar(0x00000006)) }
- _7 = Lt(_5, _6); // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
- assert(move _7, "index out of bounds: the len is {} but the index is {}", move _6, _5) -> bb2; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
+ _7 = const true; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
+ // ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x01))
+ // mir::Constant
+ // + span: $DIR/optimizes_into_variable.rs:13:13: 13:34
+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
+ assert(const true, "index out of bounds: the len is {} but the index is {}", const 6_usize, const 3_usize) -> bb2; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
+ // ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x01))
+ // mir::Constant
+ // + span: $DIR/optimizes_into_variable.rs:13:13: 13:34
+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x00000006))
+ // mir::Constant
+ // + span: $DIR/optimizes_into_variable.rs:13:13: 13:34
+ // + literal: Const { ty: usize, val: Value(Scalar(0x00000006)) }
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x00000003))
+ // mir::Constant
+ // + span: $DIR/optimizes_into_variable.rs:13:13: 13:34
+ // + literal: Const { ty: usize, val: Value(Scalar(0x00000003)) }
}
bb2: {
- _3 = _4[_5]; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
+ _3 = const 3_i32; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
+ // ty::Const
+ // + ty: i32
+ // + val: Value(Scalar(0x00000003))
+ // mir::Constant
+ // + span: $DIR/optimizes_into_variable.rs:13:13: 13:34
+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) }
StorageDead(_5); // scope 1 at $DIR/optimizes_into_variable.rs:13:34: 13:35
StorageDead(_4); // scope 1 at $DIR/optimizes_into_variable.rs:13:34: 13:35
StorageLive(_8); // scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10
StorageLive(_9); // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36
(_9.0: u32) = const 12_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x0000000c))
// mir::Constant
// + span: $DIR/optimizes_into_variable.rs:14:25: 14:27
// + literal: Const { ty: u32, val: Value(Scalar(0x0000000c)) }
(_9.1: u32) = const 42_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x0000002a))
// mir::Constant
// + span: $DIR/optimizes_into_variable.rs:14:32: 14:34
// + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) }
- _8 = (_9.1: u32); // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38
+ _8 = const 42_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38
+ // ty::Const
+ // + ty: u32
+ // + val: Value(Scalar(0x0000002a))
+ // mir::Constant
+ // + span: $DIR/optimizes_into_variable.rs:14:13: 14:38
+ // + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) }
StorageDead(_9); // scope 2 at $DIR/optimizes_into_variable.rs:14:38: 14:39
_0 = const (); // scope 0 at $DIR/optimizes_into_variable.rs:11:11: 15:2
// ty::Const
......
......@@ -25,176 +25,37 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10
- _2 = CheckedAdd(const 2_i32, const 2_i32); // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
+ _2 = (const 4_i32, const false); // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
// ty::Const
// + ty: i32
- // + val: Value(Scalar(0x00000002))
+ // + val: Value(Scalar(0x00000004))
// mir::Constant
- // + span: $DIR/optimizes_into_variable.rs:12:13: 12:14
- // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) }
+ // + span: $DIR/optimizes_into_variable.rs:12:13: 12:18
+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000004)) }
// ty::Const
- // + ty: i32
- // + val: Value(Scalar(0x00000002))
+ // + ty: bool
+ // + val: Value(Scalar(0x00))
// mir::Constant
- // + span: $DIR/optimizes_into_variable.rs:12:17: 12:18
- // + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) }
- assert(!move (_2.1: bool), "attempt to compute `{} + {}` which would overflow", const 2_i32, const 2_i32) -> bb1; // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
+ // + span: $DIR/optimizes_into_variable.rs:12:13: 12:18
+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
+ _2 = (const 4_i32, const false); // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
+ assert(!const false, "attempt to compute `{} + {}` which would overflow", const 2_i32, const 2_i32) -> bb1; // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
// ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x00))
+ // mir::Constant
+ // + span: $DIR/optimizes_into_variable.rs:12:13: 12:18
+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
+ // ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000002))
// mir::Constant
// + span: $DIR/optimizes_into_variable.rs:12:13: 12:14
// + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) }
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000002))
// mir::Constant
// + span: $DIR/optimizes_into_variable.rs:12:17: 12:18
// + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) }
}
bb1: {
- _1 = move (_2.0: i32); // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
+ _1 = const 4_i32; // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
+ // ty::Const
+ // + ty: i32
+ // + val: Value(Scalar(0x00000004))
+ // mir::Constant
+ // + span: $DIR/optimizes_into_variable.rs:12:13: 12:18
+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000004)) }
StorageLive(_3); // scope 1 at $DIR/optimizes_into_variable.rs:13:9: 13:10
StorageLive(_4); // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:31
_4 = [const 0_i32, const 1_i32, const 2_i32, const 3_i32, const 4_i32, const 5_i32]; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:31
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000000))
// mir::Constant
// + span: $DIR/optimizes_into_variable.rs:13:14: 13:15
// + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/optimizes_into_variable.rs:13:17: 13:18
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000002))
// mir::Constant
// + span: $DIR/optimizes_into_variable.rs:13:20: 13:21
// + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) }
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000003))
// mir::Constant
// + span: $DIR/optimizes_into_variable.rs:13:23: 13:24
// + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) }
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000004))
// mir::Constant
// + span: $DIR/optimizes_into_variable.rs:13:26: 13:27
// + literal: Const { ty: i32, val: Value(Scalar(0x00000004)) }
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000005))
// mir::Constant
// + span: $DIR/optimizes_into_variable.rs:13:29: 13:30
// + literal: Const { ty: i32, val: Value(Scalar(0x00000005)) }
StorageLive(_5); // scope 1 at $DIR/optimizes_into_variable.rs:13:32: 13:33
_5 = const 3_usize; // scope 1 at $DIR/optimizes_into_variable.rs:13:32: 13:33
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x0000000000000003))
// mir::Constant
// + span: $DIR/optimizes_into_variable.rs:13:32: 13:33
// + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000003)) }
_6 = const 6_usize; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x0000000000000006))
// mir::Constant
// + span: $DIR/optimizes_into_variable.rs:13:13: 13:34
// + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000006)) }
- _7 = Lt(_5, _6); // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
- assert(move _7, "index out of bounds: the len is {} but the index is {}", move _6, _5) -> bb2; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
+ _7 = const true; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
+ // ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x01))
+ // mir::Constant
+ // + span: $DIR/optimizes_into_variable.rs:13:13: 13:34
+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
+ assert(const true, "index out of bounds: the len is {} but the index is {}", const 6_usize, const 3_usize) -> bb2; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
+ // ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x01))
+ // mir::Constant
+ // + span: $DIR/optimizes_into_variable.rs:13:13: 13:34
+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x0000000000000006))
+ // mir::Constant
+ // + span: $DIR/optimizes_into_variable.rs:13:13: 13:34
+ // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000006)) }
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x0000000000000003))
+ // mir::Constant
+ // + span: $DIR/optimizes_into_variable.rs:13:13: 13:34
+ // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000003)) }
}
bb2: {
- _3 = _4[_5]; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
+ _3 = const 3_i32; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
+ // ty::Const
+ // + ty: i32
+ // + val: Value(Scalar(0x00000003))
+ // mir::Constant
+ // + span: $DIR/optimizes_into_variable.rs:13:13: 13:34
+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) }
StorageDead(_5); // scope 1 at $DIR/optimizes_into_variable.rs:13:34: 13:35
StorageDead(_4); // scope 1 at $DIR/optimizes_into_variable.rs:13:34: 13:35
StorageLive(_8); // scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10
StorageLive(_9); // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36
(_9.0: u32) = const 12_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x0000000c))
// mir::Constant
// + span: $DIR/optimizes_into_variable.rs:14:25: 14:27
// + literal: Const { ty: u32, val: Value(Scalar(0x0000000c)) }
(_9.1: u32) = const 42_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x0000002a))
// mir::Constant
// + span: $DIR/optimizes_into_variable.rs:14:32: 14:34
// + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) }
- _8 = (_9.1: u32); // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38
+ _8 = const 42_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38
+ // ty::Const
+ // + ty: u32
+ // + val: Value(Scalar(0x0000002a))
+ // mir::Constant
+ // + span: $DIR/optimizes_into_variable.rs:14:13: 14:38
+ // + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) }
StorageDead(_9); // scope 2 at $DIR/optimizes_into_variable.rs:14:38: 14:39
_0 = const (); // scope 0 at $DIR/optimizes_into_variable.rs:11:11: 15:2
// ty::Const
......
......@@ -18,28 +18,10 @@ fn main() -> () {
bb0: {
StorageLive(_1); // scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10
_1 = const 4_i32; // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000004))
// mir::Constant
// + span: $DIR/optimizes_into_variable.rs:12:13: 12:18
// + literal: Const { ty: i32, val: Value(Scalar(0x00000004)) }
StorageLive(_2); // scope 1 at $DIR/optimizes_into_variable.rs:13:9: 13:10
_2 = const 3_i32; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000003))
// mir::Constant
// + span: $DIR/optimizes_into_variable.rs:13:13: 13:34
// + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) }
StorageLive(_3); // scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10
_3 = const 42_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x0000002a))
// mir::Constant
// + span: $DIR/optimizes_into_variable.rs:14:13: 14:38
// + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) }
_0 = const (); // scope 0 at $DIR/optimizes_into_variable.rs:11:11: 15:2
// ty::Const
// + ty: ()
......
......@@ -18,28 +18,10 @@ fn main() -> () {
bb0: {
StorageLive(_1); // scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10
_1 = const 4_i32; // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000004))
// mir::Constant
// + span: $DIR/optimizes_into_variable.rs:12:13: 12:18
// + literal: Const { ty: i32, val: Value(Scalar(0x00000004)) }
StorageLive(_2); // scope 1 at $DIR/optimizes_into_variable.rs:13:9: 13:10
_2 = const 3_i32; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000003))
// mir::Constant
// + span: $DIR/optimizes_into_variable.rs:13:13: 13:34
// + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) }
StorageLive(_3); // scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10
_3 = const 42_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x0000002a))
// mir::Constant
// + span: $DIR/optimizes_into_variable.rs:14:13: 14:38
// + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) }
_0 = const (); // scope 0 at $DIR/optimizes_into_variable.rs:11:11: 15:2
// ty::Const
// + ty: ()
......
......@@ -25,12 +25,6 @@
// + literal: Const { ty: &u8, val: Value(Scalar(alloc0)) }
- _2 = (*_3); // scope 0 at $DIR/read_immutable_static.rs:7:13: 7:16
+ _2 = const 2_u8; // scope 0 at $DIR/read_immutable_static.rs:7:13: 7:16
+ // ty::Const
+ // + ty: u8
+ // + val: Value(Scalar(0x02))
+ // mir::Constant
+ // + span: $DIR/read_immutable_static.rs:7:13: 7:16
+ // + literal: Const { ty: u8, val: Value(Scalar(0x02)) }
StorageLive(_4); // scope 0 at $DIR/read_immutable_static.rs:7:19: 7:22
StorageLive(_5); // scope 0 at $DIR/read_immutable_static.rs:7:19: 7:22
_5 = const {alloc0: &u8}; // scope 0 at $DIR/read_immutable_static.rs:7:19: 7:22
......@@ -43,19 +37,7 @@
- _4 = (*_5); // scope 0 at $DIR/read_immutable_static.rs:7:19: 7:22
- _1 = Add(move _2, move _4); // scope 0 at $DIR/read_immutable_static.rs:7:13: 7:22
+ _4 = const 2_u8; // scope 0 at $DIR/read_immutable_static.rs:7:19: 7:22
+ // ty::Const
+ // + ty: u8
+ // + val: Value(Scalar(0x02))
+ // mir::Constant
+ // + span: $DIR/read_immutable_static.rs:7:19: 7:22
+ // + literal: Const { ty: u8, val: Value(Scalar(0x02)) }
+ _1 = const 4_u8; // scope 0 at $DIR/read_immutable_static.rs:7:13: 7:22
+ // ty::Const
+ // + ty: u8
+ // + val: Value(Scalar(0x04))
+ // mir::Constant
+ // + span: $DIR/read_immutable_static.rs:7:13: 7:22
+ // + literal: Const { ty: u8, val: Value(Scalar(0x04)) }
StorageDead(_4); // scope 0 at $DIR/read_immutable_static.rs:7:21: 7:22
StorageDead(_2); // scope 0 at $DIR/read_immutable_static.rs:7:21: 7:22
StorageDead(_5); // scope 0 at $DIR/read_immutable_static.rs:7:22: 7:23
......
......@@ -21,12 +21,6 @@
_2 = _4; // scope 0 at $DIR/ref_deref.rs:5:6: 5:10
- _1 = (*_2); // scope 0 at $DIR/ref_deref.rs:5:5: 5:10
+ _1 = const 4_i32; // scope 0 at $DIR/ref_deref.rs:5:5: 5:10
+ // ty::Const
+ // + ty: i32
+ // + val: Value(Scalar(0x00000004))
+ // mir::Constant
+ // + span: $DIR/ref_deref.rs:5:5: 5:10
+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000004)) }
StorageDead(_2); // scope 0 at $DIR/ref_deref.rs:5:10: 5:11
StorageDead(_1); // scope 0 at $DIR/ref_deref.rs:5:10: 5:11
_0 = const (); // scope 0 at $DIR/ref_deref.rs:4:11: 6:2
......
......@@ -13,16 +13,12 @@
StorageLive(_2); // scope 0 at $DIR/ref_deref.rs:5:6: 5:10
- StorageLive(_3); // scope 0 at $DIR/ref_deref.rs:5:8: 5:9
- _3 = const 4_i32; // scope 0 at $DIR/ref_deref.rs:5:8: 5:9
- _2 = &_3; // scope 0 at $DIR/ref_deref.rs:5:6: 5:10
+ _4 = const main::promoted[0]; // scope 0 at $DIR/ref_deref.rs:5:6: 5:10
// ty::Const
- // + ty: i32
- // + val: Value(Scalar(0x00000004))
+ // ty::Const
+ // + ty: &i32
+ // + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref[317d]::main[0]), const_param_did: None }, [], Some(promoted[0]))
// mir::Constant
- // + span: $DIR/ref_deref.rs:5:8: 5:9
- // + literal: Const { ty: i32, val: Value(Scalar(0x00000004)) }
- _2 = &_3; // scope 0 at $DIR/ref_deref.rs:5:6: 5:10
+ // mir::Constant
+ // + span: $DIR/ref_deref.rs:5:6: 5:10
+ // + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref[317d]::main[0]), const_param_did: None }, [], Some(promoted[0])) }
+ _2 = &(*_4); // scope 0 at $DIR/ref_deref.rs:5:6: 5:10
......
......@@ -13,22 +13,12 @@
StorageLive(_2); // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17
- StorageLive(_3); // scope 0 at $DIR/ref_deref_project.rs:5:8: 5:14
- _3 = (const 4_i32, const 5_i32); // scope 0 at $DIR/ref_deref_project.rs:5:8: 5:14
- _2 = &(_3.1: i32); // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17
+ _4 = const main::promoted[0]; // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17
// ty::Const
- // + ty: i32
- // + val: Value(Scalar(0x00000004))
+ // ty::Const
+ // + ty: &(i32, i32)
+ // + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref_project[317d]::main[0]), const_param_did: None }, [], Some(promoted[0]))
// mir::Constant
- // + span: $DIR/ref_deref_project.rs:5:9: 5:10
- // + literal: Const { ty: i32, val: Value(Scalar(0x00000004)) }
- // ty::Const
- // + ty: i32
- // + val: Value(Scalar(0x00000005))
- // mir::Constant
- // + span: $DIR/ref_deref_project.rs:5:12: 5:13
- // + literal: Const { ty: i32, val: Value(Scalar(0x00000005)) }
- _2 = &(_3.1: i32); // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17
+ // mir::Constant
+ // + span: $DIR/ref_deref_project.rs:5:6: 5:17
+ // + literal: Const { ty: &(i32, i32), val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ ref_deref_project[317d]::main[0]), const_param_did: None }, [], Some(promoted[0])) }
+ _2 = &((*_4).1: i32); // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17
......
......@@ -18,77 +18,20 @@
StorageLive(_2); // scope 0 at $DIR/repeat.rs:6:18: 6:28
StorageLive(_3); // scope 0 at $DIR/repeat.rs:6:18: 6:25
_3 = [const 42_u32; 8]; // scope 0 at $DIR/repeat.rs:6:18: 6:25
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x0000002a))
// mir::Constant
// + span: $DIR/repeat.rs:6:19: 6:21
// + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) }
StorageLive(_4); // scope 0 at $DIR/repeat.rs:6:26: 6:27
_4 = const 2_usize; // scope 0 at $DIR/repeat.rs:6:26: 6:27
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x00000002))
// mir::Constant
// + span: $DIR/repeat.rs:6:26: 6:27
// + literal: Const { ty: usize, val: Value(Scalar(0x00000002)) }
_5 = const 8_usize; // scope 0 at $DIR/repeat.rs:6:18: 6:28
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x00000008))
// mir::Constant
// + span: $DIR/repeat.rs:6:18: 6:28
// + literal: Const { ty: usize, val: Value(Scalar(0x00000008)) }
- _6 = Lt(_4, _5); // scope 0 at $DIR/repeat.rs:6:18: 6:28
- assert(move _6, "index out of bounds: the len is {} but the index is {}", move _5, _4) -> bb1; // scope 0 at $DIR/repeat.rs:6:18: 6:28
+ _6 = const true; // scope 0 at $DIR/repeat.rs:6:18: 6:28
+ // ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x01))
+ // mir::Constant
+ // + span: $DIR/repeat.rs:6:18: 6:28
+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
+ assert(const true, "index out of bounds: the len is {} but the index is {}", const 8_usize, const 2_usize) -> bb1; // scope 0 at $DIR/repeat.rs:6:18: 6:28
+ // ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x01))
+ // mir::Constant
+ // + span: $DIR/repeat.rs:6:18: 6:28
+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x00000008))
+ // mir::Constant
+ // + span: $DIR/repeat.rs:6:18: 6:28
+ // + literal: Const { ty: usize, val: Value(Scalar(0x00000008)) }
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x00000002))
+ // mir::Constant
+ // + span: $DIR/repeat.rs:6:18: 6:28
+ // + literal: Const { ty: usize, val: Value(Scalar(0x00000002)) }
}
bb1: {
- _2 = _3[_4]; // scope 0 at $DIR/repeat.rs:6:18: 6:28
- _1 = Add(move _2, const 0_u32); // scope 0 at $DIR/repeat.rs:6:18: 6:32
+ _2 = const 42_u32; // scope 0 at $DIR/repeat.rs:6:18: 6:28
// ty::Const
// + ty: u32
- // + val: Value(Scalar(0x00000000))
+ // + val: Value(Scalar(0x0000002a))
// mir::Constant
- // + span: $DIR/repeat.rs:6:31: 6:32
- // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) }
+ // + span: $DIR/repeat.rs:6:18: 6:28
+ // + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) }
+ _1 = const 42_u32; // scope 0 at $DIR/repeat.rs:6:18: 6:32
+ // ty::Const
+ // + ty: u32
+ // + val: Value(Scalar(0x0000002a))
+ // mir::Constant
+ // + span: $DIR/repeat.rs:6:18: 6:32
+ // + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) }
StorageDead(_2); // scope 0 at $DIR/repeat.rs:6:31: 6:32
StorageDead(_4); // scope 0 at $DIR/repeat.rs:6:32: 6:33
StorageDead(_3); // scope 0 at $DIR/repeat.rs:6:32: 6:33
......
......@@ -18,77 +18,20 @@
StorageLive(_2); // scope 0 at $DIR/repeat.rs:6:18: 6:28
StorageLive(_3); // scope 0 at $DIR/repeat.rs:6:18: 6:25
_3 = [const 42_u32; 8]; // scope 0 at $DIR/repeat.rs:6:18: 6:25
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x0000002a))
// mir::Constant
// + span: $DIR/repeat.rs:6:19: 6:21
// + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) }
StorageLive(_4); // scope 0 at $DIR/repeat.rs:6:26: 6:27
_4 = const 2_usize; // scope 0 at $DIR/repeat.rs:6:26: 6:27
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x0000000000000002))
// mir::Constant
// + span: $DIR/repeat.rs:6:26: 6:27
// + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000002)) }
_5 = const 8_usize; // scope 0 at $DIR/repeat.rs:6:18: 6:28
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x0000000000000008))
// mir::Constant
// + span: $DIR/repeat.rs:6:18: 6:28
// + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000008)) }
- _6 = Lt(_4, _5); // scope 0 at $DIR/repeat.rs:6:18: 6:28
- assert(move _6, "index out of bounds: the len is {} but the index is {}", move _5, _4) -> bb1; // scope 0 at $DIR/repeat.rs:6:18: 6:28
+ _6 = const true; // scope 0 at $DIR/repeat.rs:6:18: 6:28
+ // ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x01))
+ // mir::Constant
+ // + span: $DIR/repeat.rs:6:18: 6:28
+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
+ assert(const true, "index out of bounds: the len is {} but the index is {}", const 8_usize, const 2_usize) -> bb1; // scope 0 at $DIR/repeat.rs:6:18: 6:28
+ // ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x01))
+ // mir::Constant
+ // + span: $DIR/repeat.rs:6:18: 6:28
+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x0000000000000008))
+ // mir::Constant
+ // + span: $DIR/repeat.rs:6:18: 6:28
+ // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000008)) }
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x0000000000000002))
+ // mir::Constant
+ // + span: $DIR/repeat.rs:6:18: 6:28
+ // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000002)) }
}
bb1: {
- _2 = _3[_4]; // scope 0 at $DIR/repeat.rs:6:18: 6:28
- _1 = Add(move _2, const 0_u32); // scope 0 at $DIR/repeat.rs:6:18: 6:32
+ _2 = const 42_u32; // scope 0 at $DIR/repeat.rs:6:18: 6:28
// ty::Const
// + ty: u32
- // + val: Value(Scalar(0x00000000))
+ // + val: Value(Scalar(0x0000002a))
// mir::Constant
- // + span: $DIR/repeat.rs:6:31: 6:32
- // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) }
+ // + span: $DIR/repeat.rs:6:18: 6:28
+ // + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) }
+ _1 = const 42_u32; // scope 0 at $DIR/repeat.rs:6:18: 6:32
+ // ty::Const
+ // + ty: u32
+ // + val: Value(Scalar(0x0000002a))
+ // mir::Constant
+ // + span: $DIR/repeat.rs:6:18: 6:32
+ // + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) }
StorageDead(_2); // scope 0 at $DIR/repeat.rs:6:31: 6:32
StorageDead(_4); // scope 0 at $DIR/repeat.rs:6:32: 6:33
StorageDead(_3); // scope 0 at $DIR/repeat.rs:6:32: 6:33
......
......@@ -7,57 +7,14 @@
bb0: {
- _1 = CheckedAdd(const 2_u32, const 2_u32); // scope 0 at $DIR/return_place.rs:6:5: 6:10
+ _1 = (const 4_u32, const false); // scope 0 at $DIR/return_place.rs:6:5: 6:10
// ty::Const
// + ty: u32
- // + val: Value(Scalar(0x00000002))
+ // + val: Value(Scalar(0x00000004))
// mir::Constant
- // + span: $DIR/return_place.rs:6:5: 6:6
- // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) }
+ // + span: $DIR/return_place.rs:6:5: 6:10
+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000004)) }
// ty::Const
- // + ty: u32
- // + val: Value(Scalar(0x00000002))
+ // + ty: bool
+ // + val: Value(Scalar(0x00))
// mir::Constant
- // + span: $DIR/return_place.rs:6:9: 6:10
- // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) }
- assert(!move (_1.1: bool), "attempt to compute `{} + {}` which would overflow", const 2_u32, const 2_u32) -> bb1; // scope 0 at $DIR/return_place.rs:6:5: 6:10
+ // + span: $DIR/return_place.rs:6:5: 6:10
+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
+ _1 = (const 4_u32, const false); // scope 0 at $DIR/return_place.rs:6:5: 6:10
+ assert(!const false, "attempt to compute `{} + {}` which would overflow", const 2_u32, const 2_u32) -> bb1; // scope 0 at $DIR/return_place.rs:6:5: 6:10
// ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x00))
+ // mir::Constant
+ // + span: $DIR/return_place.rs:6:5: 6:10
+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
+ // ty::Const
// + ty: u32
// + val: Value(Scalar(0x00000002))
// mir::Constant
// + span: $DIR/return_place.rs:6:5: 6:6
// + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) }
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x00000002))
// mir::Constant
// + span: $DIR/return_place.rs:6:9: 6:10
// + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) }
}
bb1: {
- _0 = move (_1.0: u32); // scope 0 at $DIR/return_place.rs:6:5: 6:10
+ _0 = const 4_u32; // scope 0 at $DIR/return_place.rs:6:5: 6:10
+ // ty::Const
+ // + ty: u32
+ // + val: Value(Scalar(0x00000004))
+ // mir::Constant
+ // + span: $DIR/return_place.rs:6:5: 6:10
+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000004)) }
return; // scope 0 at $DIR/return_place.rs:7:2: 7:2
}
}
......
......@@ -5,12 +5,6 @@ fn add() -> u32 {
bb0: {
_0 = const 4_u32; // scope 0 at $DIR/return_place.rs:6:5: 6:10
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x00000004))
// mir::Constant
// + span: $DIR/return_place.rs:6:5: 6:10
// + literal: Const { ty: u32, val: Value(Scalar(0x00000004)) }
return; // scope 0 at $DIR/return_place.rs:7:2: 7:2
}
}
......@@ -13,36 +13,18 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/scalar_literal_propagation.rs:3:9: 3:10
_1 = const 1_u32; // scope 0 at $DIR/scalar_literal_propagation.rs:3:13: 3:14
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/scalar_literal_propagation.rs:3:13: 3:14
// + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) }
StorageLive(_2); // scope 1 at $DIR/scalar_literal_propagation.rs:4:5: 4:15
StorageLive(_3); // scope 1 at $DIR/scalar_literal_propagation.rs:4:13: 4:14
- _3 = _1; // scope 1 at $DIR/scalar_literal_propagation.rs:4:13: 4:14
- _2 = const consume(move _3) -> bb1; // scope 1 at $DIR/scalar_literal_propagation.rs:4:5: 4:15
+ _3 = const 1_u32; // scope 1 at $DIR/scalar_literal_propagation.rs:4:13: 4:14
// ty::Const
+ // + ty: u32
+ // + val: Value(Scalar(0x00000001))
+ // mir::Constant
+ // + span: $DIR/scalar_literal_propagation.rs:4:13: 4:14
+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) }
+ _2 = const consume(const 1_u32) -> bb1; // scope 1 at $DIR/scalar_literal_propagation.rs:4:5: 4:15
+ // ty::Const
// ty::Const
// + ty: fn(u32) {consume}
// + val: Value(Scalar(<ZST>))
// mir::Constant
// + span: $DIR/scalar_literal_propagation.rs:4:5: 4:12
// + literal: Const { ty: fn(u32) {consume}, val: Value(Scalar(<ZST>)) }
+ // ty::Const
+ // + ty: u32
+ // + val: Value(Scalar(0x00000001))
+ // mir::Constant
+ // + span: $DIR/scalar_literal_propagation.rs:4:5: 4:15
+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) }
}
bb1: {
......
......@@ -31,59 +31,17 @@
StorageDead(_3); // scope 0 at $DIR/slice_len.rs:5:18: 5:19
StorageLive(_6); // scope 0 at $DIR/slice_len.rs:5:31: 5:32
_6 = const 1_usize; // scope 0 at $DIR/slice_len.rs:5:31: 5:32
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/slice_len.rs:5:31: 5:32
// + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) }
- _7 = Len((*_2)); // scope 0 at $DIR/slice_len.rs:5:5: 5:33
- _8 = Lt(_6, _7); // scope 0 at $DIR/slice_len.rs:5:5: 5:33
- assert(move _8, "index out of bounds: the len is {} but the index is {}", move _7, _6) -> bb1; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
+ _7 = const 3_usize; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x00000003))
+ // mir::Constant
+ // + span: $DIR/slice_len.rs:5:5: 5:33
+ // + literal: Const { ty: usize, val: Value(Scalar(0x00000003)) }
+ _8 = const true; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
+ // ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x01))
+ // mir::Constant
+ // + span: $DIR/slice_len.rs:5:5: 5:33
+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
+ assert(const true, "index out of bounds: the len is {} but the index is {}", const 3_usize, const 1_usize) -> bb1; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
+ // ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x01))
+ // mir::Constant
+ // + span: $DIR/slice_len.rs:5:5: 5:33
+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x00000003))
+ // mir::Constant
+ // + span: $DIR/slice_len.rs:5:5: 5:33
+ // + literal: Const { ty: usize, val: Value(Scalar(0x00000003)) }
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x00000001))
+ // mir::Constant
+ // + span: $DIR/slice_len.rs:5:5: 5:33
+ // + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) }
}
bb1: {
- _1 = (*_2)[_6]; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
+ _1 = const 2_u32; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
+ // ty::Const
+ // + ty: u32
+ // + val: Value(Scalar(0x00000002))
+ // mir::Constant
+ // + span: $DIR/slice_len.rs:5:5: 5:33
+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) }
StorageDead(_6); // scope 0 at $DIR/slice_len.rs:5:33: 5:34
StorageDead(_4); // scope 0 at $DIR/slice_len.rs:5:33: 5:34
StorageDead(_2); // scope 0 at $DIR/slice_len.rs:5:33: 5:34
......
......@@ -31,59 +31,17 @@
StorageDead(_3); // scope 0 at $DIR/slice_len.rs:5:18: 5:19
StorageLive(_6); // scope 0 at $DIR/slice_len.rs:5:31: 5:32
_6 = const 1_usize; // scope 0 at $DIR/slice_len.rs:5:31: 5:32
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x0000000000000001))
// mir::Constant
// + span: $DIR/slice_len.rs:5:31: 5:32
// + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000001)) }
- _7 = Len((*_2)); // scope 0 at $DIR/slice_len.rs:5:5: 5:33
- _8 = Lt(_6, _7); // scope 0 at $DIR/slice_len.rs:5:5: 5:33
- assert(move _8, "index out of bounds: the len is {} but the index is {}", move _7, _6) -> bb1; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
+ _7 = const 3_usize; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x0000000000000003))
+ // mir::Constant
+ // + span: $DIR/slice_len.rs:5:5: 5:33
+ // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000003)) }
+ _8 = const true; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
+ // ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x01))
+ // mir::Constant
+ // + span: $DIR/slice_len.rs:5:5: 5:33
+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
+ assert(const true, "index out of bounds: the len is {} but the index is {}", const 3_usize, const 1_usize) -> bb1; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
+ // ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x01))
+ // mir::Constant
+ // + span: $DIR/slice_len.rs:5:5: 5:33
+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x0000000000000003))
+ // mir::Constant
+ // + span: $DIR/slice_len.rs:5:5: 5:33
+ // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000003)) }
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x0000000000000001))
+ // mir::Constant
+ // + span: $DIR/slice_len.rs:5:5: 5:33
+ // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000001)) }
}
bb1: {
- _1 = (*_2)[_6]; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
+ _1 = const 2_u32; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
+ // ty::Const
+ // + ty: u32
+ // + val: Value(Scalar(0x00000002))
+ // mir::Constant
+ // + span: $DIR/slice_len.rs:5:5: 5:33
+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) }
StorageDead(_6); // scope 0 at $DIR/slice_len.rs:5:33: 5:34
StorageDead(_4); // scope 0 at $DIR/slice_len.rs:5:33: 5:34
StorageDead(_2); // scope 0 at $DIR/slice_len.rs:5:33: 5:34
......
......@@ -8,20 +8,8 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/switch_int.rs:7:11: 7:12
_1 = const 1_i32; // scope 0 at $DIR/switch_int.rs:7:11: 7:12
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/switch_int.rs:7:11: 7:12
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
- switchInt(_1) -> [1_i32: bb2, otherwise: bb1]; // scope 0 at $DIR/switch_int.rs:8:9: 8:10
+ switchInt(const 1_i32) -> [1_i32: bb2, otherwise: bb1]; // scope 0 at $DIR/switch_int.rs:8:9: 8:10
+ // ty::Const
+ // + ty: i32
+ // + val: Value(Scalar(0x00000001))
+ // mir::Constant
+ // + span: $DIR/switch_int.rs:8:9: 8:10
+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
}
bb1: {
......@@ -32,12 +20,6 @@
// mir::Constant
// + span: $DIR/switch_int.rs:9:14: 9:17
// + literal: Const { ty: fn(i32) {foo}, val: Value(Scalar(<ZST>)) }
// ty::Const
// + ty: i32
// + val: Value(Scalar(0xffffffff))
// mir::Constant
// + span: $DIR/switch_int.rs:9:18: 9:20
// + literal: Const { ty: i32, val: Value(Scalar(0xffffffff)) }
}
bb2: {
......@@ -48,12 +30,6 @@
// mir::Constant
// + span: $DIR/switch_int.rs:8:14: 8:17
// + literal: Const { ty: fn(i32) {foo}, val: Value(Scalar(<ZST>)) }
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000000))
// mir::Constant
// + span: $DIR/switch_int.rs:8:18: 8:19
// + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
}
bb3: {
......
......@@ -8,19 +8,7 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/switch_int.rs:7:11: 7:12
_1 = const 1_i32; // scope 0 at $DIR/switch_int.rs:7:11: 7:12
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/switch_int.rs:7:11: 7:12
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
- switchInt(const 1_i32) -> [1_i32: bb2, otherwise: bb1]; // scope 0 at $DIR/switch_int.rs:8:9: 8:10
- // ty::Const
- // + ty: i32
- // + val: Value(Scalar(0x00000001))
- // mir::Constant
- // + span: $DIR/switch_int.rs:8:9: 8:10
- // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
+ goto -> bb2; // scope 0 at $DIR/switch_int.rs:8:9: 8:10
}
......@@ -32,12 +20,6 @@
// mir::Constant
// + span: $DIR/switch_int.rs:9:14: 9:17
// + literal: Const { ty: fn(i32) {foo}, val: Value(Scalar(<ZST>)) }
// ty::Const
// + ty: i32
// + val: Value(Scalar(0xffffffff))
// mir::Constant
// + span: $DIR/switch_int.rs:9:18: 9:20
// + literal: Const { ty: i32, val: Value(Scalar(0xffffffff)) }
}
bb2: {
......@@ -48,12 +30,6 @@
// mir::Constant
// + span: $DIR/switch_int.rs:8:14: 8:17
// + literal: Const { ty: fn(i32) {foo}, val: Value(Scalar(<ZST>)) }
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000000))
// mir::Constant
// + span: $DIR/switch_int.rs:8:18: 8:19
// + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
}
bb3: {
......
......@@ -13,35 +13,11 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/tuple_literal_propagation.rs:3:9: 3:10
(_1.0: u32) = const 1_u32; // scope 0 at $DIR/tuple_literal_propagation.rs:3:13: 3:19
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/tuple_literal_propagation.rs:3:14: 3:15
// + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) }
(_1.1: u32) = const 2_u32; // scope 0 at $DIR/tuple_literal_propagation.rs:3:13: 3:19
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x00000002))
// mir::Constant
// + span: $DIR/tuple_literal_propagation.rs:3:17: 3:18
// + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) }
StorageLive(_2); // scope 1 at $DIR/tuple_literal_propagation.rs:5:5: 5:15
StorageLive(_3); // scope 1 at $DIR/tuple_literal_propagation.rs:5:13: 5:14
- _3 = _1; // scope 1 at $DIR/tuple_literal_propagation.rs:5:13: 5:14
+ _3 = (const 1_u32, const 2_u32); // scope 1 at $DIR/tuple_literal_propagation.rs:5:13: 5:14
+ // ty::Const
+ // + ty: u32
+ // + val: Value(Scalar(0x00000001))
+ // mir::Constant
+ // + span: $DIR/tuple_literal_propagation.rs:5:13: 5:14
+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) }
+ // ty::Const
+ // + ty: u32
+ // + val: Value(Scalar(0x00000002))
+ // mir::Constant
+ // + span: $DIR/tuple_literal_propagation.rs:5:13: 5:14
+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) }
_2 = const consume(move _3) -> bb1; // scope 1 at $DIR/tuple_literal_propagation.rs:5:5: 5:15
// ty::Const
// + ty: fn((u32, u32)) {consume}
......
......@@ -20,22 +20,10 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/const_prop_miscompile.rs:12:9: 12:14
(_1.0: i32) = const 1_i32; // scope 0 at $DIR/const_prop_miscompile.rs:12:17: 12:21
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/const_prop_miscompile.rs:12:18: 12:19
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
StorageLive(_2); // scope 1 at $DIR/const_prop_miscompile.rs:13:5: 15:6
StorageLive(_3); // scope 2 at $DIR/const_prop_miscompile.rs:14:10: 14:22
_3 = &raw mut (_1.0: i32); // scope 2 at $DIR/const_prop_miscompile.rs:14:10: 14:22
(*_3) = const 5_i32; // scope 2 at $DIR/const_prop_miscompile.rs:14:9: 14:26
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000005))
// mir::Constant
// + span: $DIR/const_prop_miscompile.rs:14:25: 14:26
// + literal: Const { ty: i32, val: Value(Scalar(0x00000005)) }
StorageDead(_3); // scope 2 at $DIR/const_prop_miscompile.rs:14:26: 14:27
_2 = const (); // scope 2 at $DIR/const_prop_miscompile.rs:13:5: 15:6
// ty::Const
......@@ -49,12 +37,6 @@
StorageLive(_5); // scope 1 at $DIR/const_prop_miscompile.rs:16:13: 16:20
_5 = (_1.0: i32); // scope 1 at $DIR/const_prop_miscompile.rs:16:15: 16:18
_4 = Eq(move _5, const 5_i32); // scope 1 at $DIR/const_prop_miscompile.rs:16:13: 16:25
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000005))
// mir::Constant
// + span: $DIR/const_prop_miscompile.rs:16:24: 16:25
// + literal: Const { ty: i32, val: Value(Scalar(0x00000005)) }
StorageDead(_5); // scope 1 at $DIR/const_prop_miscompile.rs:16:24: 16:25
_0 = const (); // scope 0 at $DIR/const_prop_miscompile.rs:11:10: 17:2
// ty::Const
......
......@@ -17,32 +17,14 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/const_prop_miscompile.rs:5:9: 5:14
(_1.0: i32) = const 1_i32; // scope 0 at $DIR/const_prop_miscompile.rs:5:17: 5:21
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/const_prop_miscompile.rs:5:18: 5:19
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
StorageLive(_2); // scope 1 at $DIR/const_prop_miscompile.rs:6:6: 6:14
_2 = &mut (_1.0: i32); // scope 1 at $DIR/const_prop_miscompile.rs:6:6: 6:14
(*_2) = const 5_i32; // scope 1 at $DIR/const_prop_miscompile.rs:6:5: 6:18
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000005))
// mir::Constant
// + span: $DIR/const_prop_miscompile.rs:6:17: 6:18
// + literal: Const { ty: i32, val: Value(Scalar(0x00000005)) }
StorageDead(_2); // scope 1 at $DIR/const_prop_miscompile.rs:6:18: 6:19
StorageLive(_3); // scope 1 at $DIR/const_prop_miscompile.rs:7:9: 7:10
StorageLive(_4); // scope 1 at $DIR/const_prop_miscompile.rs:7:13: 7:20
_4 = (_1.0: i32); // scope 1 at $DIR/const_prop_miscompile.rs:7:15: 7:18
_3 = Eq(move _4, const 5_i32); // scope 1 at $DIR/const_prop_miscompile.rs:7:13: 7:25
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000005))
// mir::Constant
// + span: $DIR/const_prop_miscompile.rs:7:24: 7:25
// + literal: Const { ty: i32, val: Value(Scalar(0x00000005)) }
StorageDead(_4); // scope 1 at $DIR/const_prop_miscompile.rs:7:24: 7:25
_0 = const (); // scope 0 at $DIR/const_prop_miscompile.rs:4:10: 8:2
// ty::Const
......
......@@ -13,12 +13,6 @@
StorageLive(_2); // scope 0 at $DIR/copy_propagation_arg.rs:28:9: 28:10
_2 = _1; // scope 0 at $DIR/copy_propagation_arg.rs:28:13: 28:14
_1 = const 123_i32; // scope 1 at $DIR/copy_propagation_arg.rs:29:5: 29:12
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x0000007b))
// mir::Constant
// + span: $DIR/copy_propagation_arg.rs:29:9: 29:12
// + literal: Const { ty: i32, val: Value(Scalar(0x0000007b)) }
_0 = _2; // scope 1 at $DIR/copy_propagation_arg.rs:30:5: 30:6
StorageDead(_2); // scope 0 at $DIR/copy_propagation_arg.rs:31:1: 31:2
return; // scope 0 at $DIR/copy_propagation_arg.rs:31:2: 31:2
......
......@@ -24,12 +24,6 @@
StorageDead(_3); // scope 0 at $DIR/copy_propagation_arg.rs:16:12: 16:13
StorageDead(_2); // scope 0 at $DIR/copy_propagation_arg.rs:16:13: 16:14
_1 = const 5_u8; // scope 0 at $DIR/copy_propagation_arg.rs:17:5: 17:10
// ty::Const
// + ty: u8
// + val: Value(Scalar(0x05))
// mir::Constant
// + span: $DIR/copy_propagation_arg.rs:17:9: 17:10
// + literal: Const { ty: u8, val: Value(Scalar(0x05)) }
_0 = const (); // scope 0 at $DIR/copy_propagation_arg.rs:15:19: 18:2
// ty::Const
// + ty: ()
......
......@@ -19,12 +19,6 @@
// + span: $DIR/deaggregator_test.rs:9:20: 9:23
// + literal: Const { ty: f32, val: Value(Scalar(0x00000000)) }
+ (_0.2: bool) = const false; // scope 0 at $DIR/deaggregator_test.rs:9:5: 9:35
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/deaggregator_test.rs:9:28: 9:33
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
StorageDead(_2); // scope 0 at $DIR/deaggregator_test.rs:9:34: 9:35
return; // scope 0 at $DIR/deaggregator_test.rs:10:2: 10:2
}
......
......@@ -24,12 +24,6 @@ fn match_tuple(_1: (u32, bool, std::option::Option<i32>, u32)) -> u32 {
bb1: {
_0 = const 0_u32; // scope 0 at $DIR/exponential-or.rs:9:14: 9:15
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x00000000))
// mir::Constant
// + span: $DIR/exponential-or.rs:9:14: 9:15
// + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) }
goto -> bb10; // scope 0 at $DIR/exponential-or.rs:7:5: 10:6
}
......@@ -44,45 +38,21 @@ fn match_tuple(_1: (u32, bool, std::option::Option<i32>, u32)) -> u32 {
bb4: {
_5 = Le(const 6_u32, (_1.3: u32)); // scope 0 at $DIR/exponential-or.rs:8:62: 8:67
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x00000006))
// mir::Constant
// + span: $DIR/exponential-or.rs:8:62: 8:67
// + literal: Const { ty: u32, val: Value(Scalar(0x00000006)) }
switchInt(move _5) -> [false: bb6, otherwise: bb5]; // scope 0 at $DIR/exponential-or.rs:8:62: 8:67
}
bb5: {
_6 = Le((_1.3: u32), const 9_u32); // scope 0 at $DIR/exponential-or.rs:8:62: 8:67
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x00000009))
// mir::Constant
// + span: $DIR/exponential-or.rs:8:62: 8:67
// + literal: Const { ty: u32, val: Value(Scalar(0x00000009)) }
switchInt(move _6) -> [false: bb6, otherwise: bb8]; // scope 0 at $DIR/exponential-or.rs:8:62: 8:67
}
bb6: {
_3 = Le(const 13_u32, (_1.3: u32)); // scope 0 at $DIR/exponential-or.rs:8:70: 8:77
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x0000000d))
// mir::Constant
// + span: $DIR/exponential-or.rs:8:70: 8:77
// + literal: Const { ty: u32, val: Value(Scalar(0x0000000d)) }
switchInt(move _3) -> [false: bb1, otherwise: bb7]; // scope 0 at $DIR/exponential-or.rs:8:70: 8:77
}
bb7: {
_4 = Le((_1.3: u32), const 16_u32); // scope 0 at $DIR/exponential-or.rs:8:70: 8:77
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x00000010))
// mir::Constant
// + span: $DIR/exponential-or.rs:8:70: 8:77
// + literal: Const { ty: u32, val: Value(Scalar(0x00000010)) }
switchInt(move _4) -> [false: bb1, otherwise: bb8]; // scope 0 at $DIR/exponential-or.rs:8:70: 8:77
}
......
......@@ -116,12 +116,6 @@
_15 = move _16 as u32 (Misc); // scope 3 at $DIR/funky_arms.rs:26:59: 26:75
StorageDead(_16); // scope 3 at $DIR/funky_arms.rs:26:74: 26:75
_14 = Add(move _15, const 1_u32); // scope 3 at $DIR/funky_arms.rs:26:59: 26:79
// ty::Const
// + ty: u32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/funky_arms.rs:26:78: 26:79
// + literal: Const { ty: u32, val: Value(Scalar(0x00000001)) }
StorageDead(_15); // scope 3 at $DIR/funky_arms.rs:26:78: 26:79
StorageLive(_17); // scope 3 at $DIR/funky_arms.rs:26:81: 26:86
_17 = _3; // scope 3 at $DIR/funky_arms.rs:26:81: 26:86
......
......@@ -22,20 +22,8 @@ yields ()
bb0: {
StorageLive(_3); // scope 0 at $DIR/generator-storage-dead-unwind.rs:23:13: 23:14
(_3.0: i32) = const 5_i32; // scope 0 at $DIR/generator-storage-dead-unwind.rs:23:17: 23:23
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000005))
// mir::Constant
// + span: $DIR/generator-storage-dead-unwind.rs:23:21: 23:22
// + literal: Const { ty: i32, val: Value(Scalar(0x00000005)) }
StorageLive(_4); // scope 1 at $DIR/generator-storage-dead-unwind.rs:24:13: 24:14
(_4.0: i32) = const 6_i32; // scope 1 at $DIR/generator-storage-dead-unwind.rs:24:17: 24:23
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000006))
// mir::Constant
// + span: $DIR/generator-storage-dead-unwind.rs:24:21: 24:22
// + literal: Const { ty: i32, val: Value(Scalar(0x00000006)) }
StorageLive(_5); // scope 2 at $DIR/generator-storage-dead-unwind.rs:25:9: 25:14
StorageLive(_6); // scope 2 at $DIR/generator-storage-dead-unwind.rs:25:9: 25:14
_5 = yield(move _6) -> [resume: bb2, drop: bb4]; // scope 2 at $DIR/generator-storage-dead-unwind.rs:25:9: 25:14
......
......@@ -26,19 +26,7 @@ fn bar() -> bool {
StorageLive(_2); // scope 1 at $DIR/inline-any-operand.rs:12:5: 12:6
_2 = _1; // scope 1 at $DIR/inline-any-operand.rs:12:5: 12:6
_3 = const 1_i32; // scope 1 at $DIR/inline-any-operand.rs:12:5: 12:13
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/inline-any-operand.rs:12:7: 12:8
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
_4 = const -1_i32; // scope 1 at $DIR/inline-any-operand.rs:12:5: 12:13
// ty::Const
// + ty: i32
// + val: Value(Scalar(0xffffffff))
// mir::Constant
// + span: $DIR/inline-any-operand.rs:12:10: 12:12
// + literal: Const { ty: i32, val: Value(Scalar(0xffffffff)) }
_0 = Eq(move _3, move _4); // scope 2 at $DIR/inline-any-operand.rs:17:5: 17:11
StorageDead(_2); // scope 1 at $DIR/inline-any-operand.rs:12:12: 12:13
StorageDead(_1); // scope 0 at $DIR/inline-any-operand.rs:13:1: 13:2
......
......@@ -40,12 +40,6 @@
+ // + user_ty: UserType(0)
+ // + literal: Const { ty: alloc::raw_vec::RawVec<u32>, val: Value(ByRef { alloc: Allocation { bytes: [4, 0, 0, 0, 0, 0, 0, 0], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [255], len: Size { raw: 8 } }, size: Size { raw: 8 }, align: Align { pow2: 2 }, mutability: Not, extra: () }, offset: Size { raw: 0 } }) }
+ ((*_4).1: usize) = const 0_usize; // scope 2 at $SRC_DIR/alloc/src/vec.rs:LL:COL
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x00000000))
+ // mir::Constant
+ // + span: $SRC_DIR/alloc/src/vec.rs:LL:COL
+ // + literal: Const { ty: usize, val: Value(Scalar(0x00000000)) }
_1 = move _2; // scope 0 at $DIR/inline-into-box-place.rs:8:29: 8:43
StorageDead(_2); // scope 0 at $DIR/inline-into-box-place.rs:8:42: 8:43
_0 = const (); // scope 0 at $DIR/inline-into-box-place.rs:7:11: 9:2
......
......@@ -40,12 +40,6 @@
+ // + user_ty: UserType(0)
+ // + literal: Const { ty: alloc::raw_vec::RawVec<u32>, val: Value(ByRef { alloc: Allocation { bytes: [4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [65535], len: Size { raw: 16 } }, size: Size { raw: 16 }, align: Align { pow2: 3 }, mutability: Not, extra: () }, offset: Size { raw: 0 } }) }
+ ((*_4).1: usize) = const 0_usize; // scope 2 at $SRC_DIR/alloc/src/vec.rs:LL:COL
+ // ty::Const
+ // + ty: usize
+ // + val: Value(Scalar(0x0000000000000000))
+ // mir::Constant
+ // + span: $SRC_DIR/alloc/src/vec.rs:LL:COL
+ // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000000)) }
_1 = move _2; // scope 0 at $DIR/inline-into-box-place.rs:8:29: 8:43
StorageDead(_2); // scope 0 at $DIR/inline-into-box-place.rs:8:42: 8:43
_0 = const (); // scope 0 at $DIR/inline-into-box-place.rs:7:11: 9:2
......
......@@ -13,20 +13,16 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/inline-specialization.rs:5:9: 5:10
- _1 = const <std::vec::Vec<()> as Foo>::bar() -> bb1; // scope 0 at $DIR/inline-specialization.rs:5:13: 5:38
+ _1 = const 123_u32; // scope 2 at $DIR/inline-specialization.rs:14:31: 14:34
// ty::Const
- // ty::Const
- // + ty: fn() -> u32 {<std::vec::Vec<()> as Foo>::bar}
- // + val: Value(Scalar(<ZST>))
+ // + ty: u32
+ // + val: Value(Scalar(0x0000007b))
// mir::Constant
- // mir::Constant
- // + span: $DIR/inline-specialization.rs:5:13: 5:36
- // + literal: Const { ty: fn() -> u32 {<std::vec::Vec<()> as Foo>::bar}, val: Value(Scalar(<ZST>)) }
- }
-
- bb1: {
+ // + span: $DIR/inline-specialization.rs:14:31: 14:34
+ // + literal: Const { ty: u32, val: Value(Scalar(0x0000007b)) }
+ _1 = const 123_u32; // scope 2 at $DIR/inline-specialization.rs:14:31: 14:34
_0 = const (); // scope 0 at $DIR/inline-specialization.rs:4:11: 6:2
// ty::Const
// + ty: ()
......
......@@ -15,47 +15,11 @@
+ // + span: /the/src/instrument_coverage.rs:19:18: 19:18
+ // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(u64, u32, &'static str, u32, u32, u32, u32) {std::intrinsics::count_code_region}, val: Value(Scalar(<ZST>)) }
+ // ty::Const
+ // + ty: u64
+ // + val: Value(Scalar(0x8dabe565aaa2aefd))
+ // mir::Constant
+ // + span: /the/src/instrument_coverage.rs:19:18: 19:18
+ // + literal: Const { ty: u64, val: Value(Scalar(0x8dabe565aaa2aefd)) }
+ // ty::Const
+ // + ty: u32
+ // + val: Value(Scalar(0x00000000))
+ // mir::Constant
+ // + span: /the/src/instrument_coverage.rs:19:18: 19:18
+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) }
+ // ty::Const
+ // + ty: &str
+ // + val: Value(Slice { data: Allocation { bytes: [47, 116, 104, 101, 47, 115, 114, 99, 47, 105, 110, 115, 116, 114, 117, 109, 101, 110, 116, 95, 99, 111, 118, 101, 114, 97, 103, 101, 46, 114, 115], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [2147483647], len: Size { raw: 31 } }, size: Size { raw: 31 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 31 })
+ // mir::Constant
+ // + span: /the/src/instrument_coverage.rs:19:18: 19:18
+ // + literal: Const { ty: &str, val: Value(Slice { data: Allocation { bytes: [47, 116, 104, 101, 47, 115, 114, 99, 47, 105, 110, 115, 116, 114, 117, 109, 101, 110, 116, 95, 99, 111, 118, 101, 114, 97, 103, 101, 46, 114, 115], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [2147483647], len: Size { raw: 31 } }, size: Size { raw: 31 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 31 }) }
+ // ty::Const
+ // + ty: u32
+ // + val: Value(Scalar(0x00000013))
+ // mir::Constant
+ // + span: /the/src/instrument_coverage.rs:19:18: 19:18
+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000013)) }
+ // ty::Const
+ // + ty: u32
+ // + val: Value(Scalar(0x00000012))
+ // mir::Constant
+ // + span: /the/src/instrument_coverage.rs:19:18: 19:18
+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000012)) }
+ // ty::Const
+ // + ty: u32
+ // + val: Value(Scalar(0x00000015))
+ // mir::Constant
+ // + span: /the/src/instrument_coverage.rs:19:18: 19:18
+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000015)) }
+ // ty::Const
+ // + ty: u32
+ // + val: Value(Scalar(0x00000002))
+ // mir::Constant
+ // + span: /the/src/instrument_coverage.rs:19:18: 19:18
+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) }
+ }
+
+ bb1 (cleanup): {
......@@ -65,12 +29,6 @@
+ bb2: {
+ StorageDead(_1); // scope 0 at /the/src/instrument_coverage.rs:20:5: 20:9
_0 = const true; // scope 0 at /the/src/instrument_coverage.rs:20:5: 20:9
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: /the/src/instrument_coverage.rs:20:5: 20:9
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
return; // scope 0 at /the/src/instrument_coverage.rs:21:2: 21:2
}
}
......
......@@ -19,47 +19,11 @@
+ // + span: /the/src/instrument_coverage.rs:10:11: 10:11
+ // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(u64, u32, &'static str, u32, u32, u32, u32) {std::intrinsics::count_code_region}, val: Value(Scalar(<ZST>)) }
+ // ty::Const
+ // + ty: u64
+ // + val: Value(Scalar(0xde1b3f75a72fc7f7))
+ // mir::Constant
+ // + span: /the/src/instrument_coverage.rs:10:11: 10:11
+ // + literal: Const { ty: u64, val: Value(Scalar(0xde1b3f75a72fc7f7)) }
+ // ty::Const
+ // + ty: u32
+ // + val: Value(Scalar(0x00000000))
+ // mir::Constant
+ // + span: /the/src/instrument_coverage.rs:10:11: 10:11
+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) }
+ // ty::Const
+ // + ty: &str
+ // + val: Value(Slice { data: Allocation { bytes: [47, 116, 104, 101, 47, 115, 114, 99, 47, 105, 110, 115, 116, 114, 117, 109, 101, 110, 116, 95, 99, 111, 118, 101, 114, 97, 103, 101, 46, 114, 115], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [2147483647], len: Size { raw: 31 } }, size: Size { raw: 31 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 31 })
+ // mir::Constant
+ // + span: /the/src/instrument_coverage.rs:10:11: 10:11
+ // + literal: Const { ty: &str, val: Value(Slice { data: Allocation { bytes: [47, 116, 104, 101, 47, 115, 114, 99, 47, 105, 110, 115, 116, 114, 117, 109, 101, 110, 116, 95, 99, 111, 118, 101, 114, 97, 103, 101, 46, 114, 115], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [2147483647], len: Size { raw: 31 } }, size: Size { raw: 31 }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 31 }) }
+ // ty::Const
+ // + ty: u32
+ // + val: Value(Scalar(0x0000000a))
+ // mir::Constant
+ // + span: /the/src/instrument_coverage.rs:10:11: 10:11
+ // + literal: Const { ty: u32, val: Value(Scalar(0x0000000a)) }
+ // ty::Const
+ // + ty: u32
+ // + val: Value(Scalar(0x0000000b))
+ // mir::Constant
+ // + span: /the/src/instrument_coverage.rs:10:11: 10:11
+ // + literal: Const { ty: u32, val: Value(Scalar(0x0000000b)) }
+ // ty::Const
+ // + ty: u32
+ // + val: Value(Scalar(0x00000010))
+ // mir::Constant
+ // + span: /the/src/instrument_coverage.rs:10:11: 10:11
+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000010)) }
+ // ty::Const
+ // + ty: u32
+ // + val: Value(Scalar(0x00000002))
+ // mir::Constant
+ // + span: /the/src/instrument_coverage.rs:10:11: 10:11
+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000002)) }
}
bb1: {
......
......@@ -14,12 +14,6 @@ fn main() -> () {
bb0: {
StorageLive(_1); // scope 0 at $DIR/issue-38669.rs:5:9: 5:25
_1 = const false; // scope 0 at $DIR/issue-38669.rs:5:28: 5:33
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/issue-38669.rs:5:28: 5:33
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
FakeRead(ForLet, _1); // scope 0 at $DIR/issue-38669.rs:5:9: 5:25
goto -> bb2; // scope 1 at $DIR/issue-38669.rs:6:5: 11:6
}
......@@ -55,12 +49,6 @@ fn main() -> () {
StorageDead(_4); // scope 1 at $DIR/issue-38669.rs:9:9: 9:10
StorageDead(_3); // scope 1 at $DIR/issue-38669.rs:9:9: 9:10
_1 = const true; // scope 1 at $DIR/issue-38669.rs:10:9: 10:28
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/issue-38669.rs:10:24: 10:28
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
_2 = const (); // scope 1 at $DIR/issue-38669.rs:6:10: 11:6
// ty::Const
// + ty: ()
......
......@@ -13,21 +13,9 @@ fn main() -> () {
bb0: {
_5 = const false; // scope 0 at $DIR/issue-41110.rs:8:9: 8:10
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/issue-41110.rs:8:9: 8:10
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
StorageLive(_1); // scope 0 at $DIR/issue-41110.rs:8:9: 8:10
StorageLive(_2); // scope 0 at $DIR/issue-41110.rs:8:13: 8:14
_5 = const true; // scope 0 at $DIR/issue-41110.rs:8:13: 8:14
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/issue-41110.rs:8:13: 8:14
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
_2 = S; // scope 0 at $DIR/issue-41110.rs:8:13: 8:14
StorageLive(_3); // scope 0 at $DIR/issue-41110.rs:8:21: 8:27
StorageLive(_4); // scope 0 at $DIR/issue-41110.rs:8:21: 8:22
......@@ -48,12 +36,6 @@ fn main() -> () {
bb2: {
StorageDead(_4); // scope 0 at $DIR/issue-41110.rs:8:26: 8:27
_5 = const false; // scope 0 at $DIR/issue-41110.rs:8:13: 8:28
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/issue-41110.rs:8:13: 8:28
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
_1 = const S::other(move _2, move _3) -> [return: bb6, unwind: bb5]; // scope 0 at $DIR/issue-41110.rs:8:13: 8:28
// ty::Const
// + ty: fn(S, S) {S::other}
......@@ -78,12 +60,6 @@ fn main() -> () {
bb6: {
StorageDead(_3); // scope 0 at $DIR/issue-41110.rs:8:27: 8:28
_5 = const false; // scope 0 at $DIR/issue-41110.rs:8:27: 8:28
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/issue-41110.rs:8:27: 8:28
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
StorageDead(_2); // scope 0 at $DIR/issue-41110.rs:8:27: 8:28
_0 = const (); // scope 0 at $DIR/issue-41110.rs:7:11: 9:2
// ty::Const
......@@ -102,12 +78,6 @@ fn main() -> () {
bb8 (cleanup): {
_5 = const false; // scope 0 at $DIR/issue-41110.rs:8:27: 8:28
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/issue-41110.rs:8:27: 8:28
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
goto -> bb7; // scope 0 at $DIR/issue-41110.rs:8:27: 8:28
}
......
......@@ -17,20 +17,8 @@ fn test() -> () {
bb0: {
_6 = const false; // scope 0 at $DIR/issue-41110.rs:15:9: 15:10
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/issue-41110.rs:15:9: 15:10
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
StorageLive(_1); // scope 0 at $DIR/issue-41110.rs:15:9: 15:10
_6 = const true; // scope 0 at $DIR/issue-41110.rs:15:13: 15:14
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/issue-41110.rs:15:13: 15:14
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
_1 = S; // scope 0 at $DIR/issue-41110.rs:15:13: 15:14
StorageLive(_2); // scope 1 at $DIR/issue-41110.rs:16:9: 16:14
_2 = S; // scope 1 at $DIR/issue-41110.rs:16:17: 16:18
......@@ -55,12 +43,6 @@ fn test() -> () {
StorageDead(_3); // scope 2 at $DIR/issue-41110.rs:17:12: 17:13
StorageLive(_5); // scope 2 at $DIR/issue-41110.rs:18:9: 18:10
_6 = const false; // scope 2 at $DIR/issue-41110.rs:18:9: 18:10
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/issue-41110.rs:18:9: 18:10
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
_5 = move _1; // scope 2 at $DIR/issue-41110.rs:18:9: 18:10
goto -> bb12; // scope 2 at $DIR/issue-41110.rs:18:5: 18:6
}
......@@ -104,12 +86,6 @@ fn test() -> () {
bb10: {
_6 = const false; // scope 0 at $DIR/issue-41110.rs:19:1: 19:2
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/issue-41110.rs:19:1: 19:2
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
StorageDead(_1); // scope 0 at $DIR/issue-41110.rs:19:1: 19:2
return; // scope 0 at $DIR/issue-41110.rs:19:2: 19:2
}
......@@ -130,12 +106,6 @@ fn test() -> () {
bb14 (cleanup): {
_6 = const false; // scope 0 at $DIR/issue-41110.rs:19:1: 19:2
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/issue-41110.rs:19:1: 19:2
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
goto -> bb13; // scope 0 at $DIR/issue-41110.rs:19:1: 19:2
}
......
......@@ -6,31 +6,7 @@
bb0: {
_1 = CheckedAdd(const 1_usize, const 1_usize); // scope 0 at $DIR/issue-41697.rs:18:19: 18:22
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/issue-41697.rs:18:19: 18:20
// + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) }
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/issue-41697.rs:18:21: 18:22
// + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) }
assert(!move (_1.1: bool), "attempt to compute `{} + {}` which would overflow", const 1_usize, const 1_usize) -> [success: bb2, unwind: bb1]; // scope 0 at $DIR/issue-41697.rs:18:19: 18:22
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/issue-41697.rs:18:19: 18:20
// + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) }
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/issue-41697.rs:18:21: 18:22
// + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) }
}
bb1 (cleanup): {
......
......@@ -6,31 +6,7 @@
bb0: {
_1 = CheckedAdd(const 1_usize, const 1_usize); // scope 0 at $DIR/issue-41697.rs:18:19: 18:22
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x0000000000000001))
// mir::Constant
// + span: $DIR/issue-41697.rs:18:19: 18:20
// + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000001)) }
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x0000000000000001))
// mir::Constant
// + span: $DIR/issue-41697.rs:18:21: 18:22
// + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000001)) }
assert(!move (_1.1: bool), "attempt to compute `{} + {}` which would overflow", const 1_usize, const 1_usize) -> [success: bb2, unwind: bb1]; // scope 0 at $DIR/issue-41697.rs:18:19: 18:22
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x0000000000000001))
// mir::Constant
// + span: $DIR/issue-41697.rs:18:19: 18:20
// + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000001)) }
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x0000000000000001))
// mir::Constant
// + span: $DIR/issue-41697.rs:18:21: 18:22
// + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000001)) }
}
bb1 (cleanup): {
......
......@@ -22,26 +22,8 @@ fn main() -> () {
bb0: {
_9 = const false; // scope 0 at $DIR/issue-41888.rs:7:9: 7:10
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/issue-41888.rs:7:9: 7:10
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
_7 = const false; // scope 0 at $DIR/issue-41888.rs:7:9: 7:10
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/issue-41888.rs:7:9: 7:10
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
_8 = const false; // scope 0 at $DIR/issue-41888.rs:7:9: 7:10
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/issue-41888.rs:7:9: 7:10
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
StorageLive(_1); // scope 0 at $DIR/issue-41888.rs:7:9: 7:10
StorageLive(_2); // scope 1 at $DIR/issue-41888.rs:8:8: 8:14
_2 = const cond() -> [return: bb2, unwind: bb3]; // scope 1 at $DIR/issue-41888.rs:8:8: 8:14
......@@ -113,12 +95,6 @@ fn main() -> () {
bb10: {
StorageLive(_6); // scope 1 at $DIR/issue-41888.rs:10:21: 10:23
_9 = const false; // scope 1 at $DIR/issue-41888.rs:10:21: 10:23
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/issue-41888.rs:10:21: 10:23
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
_6 = move ((_1 as F).0: K); // scope 1 at $DIR/issue-41888.rs:10:21: 10:23
_0 = const (); // scope 2 at $DIR/issue-41888.rs:10:29: 13:10
// ty::Const
......@@ -137,26 +113,8 @@ fn main() -> () {
bb12: {
_7 = const false; // scope 0 at $DIR/issue-41888.rs:15:1: 15:2
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/issue-41888.rs:15:1: 15:2
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
_8 = const false; // scope 0 at $DIR/issue-41888.rs:15:1: 15:2
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/issue-41888.rs:15:1: 15:2
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
_9 = const false; // scope 0 at $DIR/issue-41888.rs:15:1: 15:2
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/issue-41888.rs:15:1: 15:2
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
StorageDead(_1); // scope 0 at $DIR/issue-41888.rs:15:1: 15:2
StorageDead(_2); // scope 0 at $DIR/issue-41888.rs:15:1: 15:2
return; // scope 0 at $DIR/issue-41888.rs:15:2: 15:2
......@@ -164,75 +122,27 @@ fn main() -> () {
bb13 (cleanup): {
_7 = const true; // scope 1 at $DIR/issue-41888.rs:9:9: 9:10
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/issue-41888.rs:9:9: 9:10
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
_8 = const true; // scope 1 at $DIR/issue-41888.rs:9:9: 9:10
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/issue-41888.rs:9:9: 9:10
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
_9 = const true; // scope 1 at $DIR/issue-41888.rs:9:9: 9:10
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/issue-41888.rs:9:9: 9:10
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
_1 = move _3; // scope 1 at $DIR/issue-41888.rs:9:9: 9:10
goto -> bb7; // scope 1 at $DIR/issue-41888.rs:9:9: 9:10
}
bb14: {
_7 = const true; // scope 1 at $DIR/issue-41888.rs:9:9: 9:10
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/issue-41888.rs:9:9: 9:10
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
_8 = const true; // scope 1 at $DIR/issue-41888.rs:9:9: 9:10
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/issue-41888.rs:9:9: 9:10
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
_9 = const true; // scope 1 at $DIR/issue-41888.rs:9:9: 9:10
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/issue-41888.rs:9:9: 9:10
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
_1 = move _3; // scope 1 at $DIR/issue-41888.rs:9:9: 9:10
goto -> bb6; // scope 1 at $DIR/issue-41888.rs:9:9: 9:10
}
bb15: {
_7 = const false; // scope 0 at $DIR/issue-41888.rs:15:1: 15:2
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/issue-41888.rs:15:1: 15:2
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
goto -> bb12; // scope 0 at $DIR/issue-41888.rs:15:1: 15:2
}
bb16 (cleanup): {
_7 = const false; // scope 0 at $DIR/issue-41888.rs:15:1: 15:2
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/issue-41888.rs:15:1: 15:2
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
goto -> bb1; // scope 0 at $DIR/issue-41888.rs:15:1: 15:2
}
......
......@@ -28,12 +28,6 @@ fn main() -> () {
StorageLive(_2); // scope 0 at $DIR/issue-49232.rs:7:13: 7:19
StorageLive(_3); // scope 0 at $DIR/issue-49232.rs:8:19: 8:23
_3 = const true; // scope 0 at $DIR/issue-49232.rs:8:19: 8:23
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/issue-49232.rs:8:19: 8:23
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
FakeRead(ForMatchedPlace, _3); // scope 0 at $DIR/issue-49232.rs:8:19: 8:23
switchInt(_3) -> [false: bb5, otherwise: bb6]; // scope 0 at $DIR/issue-49232.rs:9:17: 9:22
}
......@@ -59,12 +53,6 @@ fn main() -> () {
bb7: {
_2 = const 4_i32; // scope 0 at $DIR/issue-49232.rs:9:26: 9:27
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000004))
// mir::Constant
// + span: $DIR/issue-49232.rs:9:26: 9:27
// + literal: Const { ty: i32, val: Value(Scalar(0x00000004)) }
goto -> bb12; // scope 0 at $DIR/issue-49232.rs:8:13: 11:14
}
......
......@@ -10,12 +10,6 @@ fn foo(_1: [(Never, u32); 1]) -> u32 {
bb0: {
StorageLive(_2); // scope 0 at $DIR/issue-72181.rs:16:43: 16:44
_2 = const 0_usize; // scope 0 at $DIR/issue-72181.rs:16:43: 16:44
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x00000000))
// mir::Constant
// + span: $DIR/issue-72181.rs:16:43: 16:44
// + literal: Const { ty: usize, val: Value(Scalar(0x00000000)) }
_3 = Len(_1); // scope 0 at $DIR/issue-72181.rs:16:40: 16:45
_4 = Lt(_2, _3); // scope 0 at $DIR/issue-72181.rs:16:40: 16:45
assert(move _4, "index out of bounds: the len is {} but the index is {}", move _3, _2) -> [success: bb2, unwind: bb1]; // scope 0 at $DIR/issue-72181.rs:16:40: 16:45
......
......@@ -10,12 +10,6 @@ fn foo(_1: [(Never, u32); 1]) -> u32 {
bb0: {
StorageLive(_2); // scope 0 at $DIR/issue-72181.rs:16:43: 16:44
_2 = const 0_usize; // scope 0 at $DIR/issue-72181.rs:16:43: 16:44
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x0000000000000000))
// mir::Constant
// + span: $DIR/issue-72181.rs:16:43: 16:44
// + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000000)) }
_3 = Len(_1); // scope 0 at $DIR/issue-72181.rs:16:40: 16:45
_4 = Lt(_2, _3); // scope 0 at $DIR/issue-72181.rs:16:40: 16:45
assert(move _4, "index out of bounds: the len is {} but the index is {}", move _3, _2) -> [success: bb2, unwind: bb1]; // scope 0 at $DIR/issue-72181.rs:16:40: 16:45
......
......@@ -40,20 +40,8 @@ fn main() -> () {
StorageLive(_2); // scope 1 at $DIR/issue-72181.rs:26:9: 26:10
StorageLive(_3); // scope 1 at $DIR/issue-72181.rs:26:14: 26:27
_3 = Foo { a: const 42_u64 }; // scope 1 at $DIR/issue-72181.rs:26:14: 26:27
// ty::Const
// + ty: u64
// + val: Value(Scalar(0x000000000000002a))
// mir::Constant
// + span: $DIR/issue-72181.rs:26:23: 26:25
// + literal: Const { ty: u64, val: Value(Scalar(0x000000000000002a)) }
StorageLive(_4); // scope 1 at $DIR/issue-72181.rs:26:29: 26:42
_4 = Foo { a: const 10_u64 }; // scope 1 at $DIR/issue-72181.rs:26:29: 26:42
// ty::Const
// + ty: u64
// + val: Value(Scalar(0x000000000000000a))
// mir::Constant
// + span: $DIR/issue-72181.rs:26:38: 26:40
// + literal: Const { ty: u64, val: Value(Scalar(0x000000000000000a)) }
_2 = [move _3, move _4]; // scope 1 at $DIR/issue-72181.rs:26:13: 26:43
StorageDead(_4); // scope 1 at $DIR/issue-72181.rs:26:42: 26:43
StorageDead(_3); // scope 1 at $DIR/issue-72181.rs:26:42: 26:43
......@@ -61,12 +49,6 @@ fn main() -> () {
StorageLive(_5); // scope 2 at $DIR/issue-72181.rs:27:13: 27:30
StorageLive(_6); // scope 4 at $DIR/issue-72181.rs:27:24: 27:25
_6 = const 0_usize; // scope 4 at $DIR/issue-72181.rs:27:24: 27:25
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x00000000))
// mir::Constant
// + span: $DIR/issue-72181.rs:27:24: 27:25
// + literal: Const { ty: usize, val: Value(Scalar(0x00000000)) }
_7 = Len(_2); // scope 4 at $DIR/issue-72181.rs:27:22: 27:26
_8 = Lt(_6, _7); // scope 4 at $DIR/issue-72181.rs:27:22: 27:26
assert(move _8, "index out of bounds: the len is {} but the index is {}", move _7, _6) -> [success: bb3, unwind: bb1]; // scope 4 at $DIR/issue-72181.rs:27:22: 27:26
......
......@@ -40,20 +40,8 @@ fn main() -> () {
StorageLive(_2); // scope 1 at $DIR/issue-72181.rs:26:9: 26:10
StorageLive(_3); // scope 1 at $DIR/issue-72181.rs:26:14: 26:27
_3 = Foo { a: const 42_u64 }; // scope 1 at $DIR/issue-72181.rs:26:14: 26:27
// ty::Const
// + ty: u64
// + val: Value(Scalar(0x000000000000002a))
// mir::Constant
// + span: $DIR/issue-72181.rs:26:23: 26:25
// + literal: Const { ty: u64, val: Value(Scalar(0x000000000000002a)) }
StorageLive(_4); // scope 1 at $DIR/issue-72181.rs:26:29: 26:42
_4 = Foo { a: const 10_u64 }; // scope 1 at $DIR/issue-72181.rs:26:29: 26:42
// ty::Const
// + ty: u64
// + val: Value(Scalar(0x000000000000000a))
// mir::Constant
// + span: $DIR/issue-72181.rs:26:38: 26:40
// + literal: Const { ty: u64, val: Value(Scalar(0x000000000000000a)) }
_2 = [move _3, move _4]; // scope 1 at $DIR/issue-72181.rs:26:13: 26:43
StorageDead(_4); // scope 1 at $DIR/issue-72181.rs:26:42: 26:43
StorageDead(_3); // scope 1 at $DIR/issue-72181.rs:26:42: 26:43
......@@ -61,12 +49,6 @@ fn main() -> () {
StorageLive(_5); // scope 2 at $DIR/issue-72181.rs:27:13: 27:30
StorageLive(_6); // scope 4 at $DIR/issue-72181.rs:27:24: 27:25
_6 = const 0_usize; // scope 4 at $DIR/issue-72181.rs:27:24: 27:25
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x0000000000000000))
// mir::Constant
// + span: $DIR/issue-72181.rs:27:24: 27:25
// + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000000)) }
_7 = Len(_2); // scope 4 at $DIR/issue-72181.rs:27:22: 27:26
_8 = Lt(_6, _7); // scope 4 at $DIR/issue-72181.rs:27:22: 27:26
assert(move _8, "index out of bounds: the len is {} but the index is {}", move _7, _6) -> [success: bb3, unwind: bb1]; // scope 4 at $DIR/issue-72181.rs:27:22: 27:26
......
......@@ -72,12 +72,6 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
((_1 as Some).0: i32) = const 1_i32; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/issue-73223.rs:2:28: 2:29
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
discriminant(_1) = 1; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
_2 = ((_1 as Some).0: i32); // scope 0 at $DIR/issue-73223.rs:3:14: 3:15
StorageDead(_1); // scope 0 at $DIR/issue-73223.rs:5:6: 5:7
......@@ -107,12 +101,6 @@
StorageLive(_11); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_11 = (*_7); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_10 = Eq(move _11, const 1_i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
StorageDead(_11); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_9 = Not(move _10); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_10); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
......
......@@ -72,12 +72,6 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
((_1 as Some).0: i32) = const 1_i32; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/issue-73223.rs:2:28: 2:29
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
discriminant(_1) = 1; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
_2 = ((_1 as Some).0: i32); // scope 0 at $DIR/issue-73223.rs:3:14: 3:15
StorageDead(_1); // scope 0 at $DIR/issue-73223.rs:5:6: 5:7
......@@ -107,12 +101,6 @@
StorageLive(_11); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_11 = (*_7); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_10 = Eq(move _11, const 1_i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
StorageDead(_11); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_9 = Not(move _10); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_10); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
......
......@@ -97,20 +97,8 @@
StorageLive(_1); // scope 0 at $DIR/issue-73223.rs:2:9: 2:14
StorageLive(_2); // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
((_2 as Some).0: i32) = const 1_i32; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/issue-73223.rs:2:28: 2:29
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
discriminant(_2) = 1; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
_3 = const 1_isize; // scope 0 at $DIR/issue-73223.rs:3:9: 3:16
// ty::Const
// + ty: isize
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/issue-73223.rs:3:9: 3:16
// + literal: Const { ty: isize, val: Value(Scalar(0x00000001)) }
goto -> bb2; // scope 0 at $DIR/issue-73223.rs:3:9: 3:16
}
......@@ -166,19 +154,7 @@
_17 = (*_13); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_18); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_18 = const 1_i32; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
_16 = Eq(move _17, const 1_i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
StorageDead(_18); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_17); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_15 = Not(move _16); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
......
......@@ -97,20 +97,8 @@
StorageLive(_1); // scope 0 at $DIR/issue-73223.rs:2:9: 2:14
StorageLive(_2); // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
((_2 as Some).0: i32) = const 1_i32; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/issue-73223.rs:2:28: 2:29
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
discriminant(_2) = 1; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
_3 = const 1_isize; // scope 0 at $DIR/issue-73223.rs:3:9: 3:16
// ty::Const
// + ty: isize
// + val: Value(Scalar(0x0000000000000001))
// mir::Constant
// + span: $DIR/issue-73223.rs:3:9: 3:16
// + literal: Const { ty: isize, val: Value(Scalar(0x0000000000000001)) }
goto -> bb2; // scope 0 at $DIR/issue-73223.rs:3:9: 3:16
}
......@@ -166,19 +154,7 @@
_17 = (*_13); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_18); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_18 = const 1_i32; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
_16 = Eq(move _17, const 1_i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
StorageDead(_18); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_17); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_15 = Not(move _16); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
......
......@@ -16,12 +16,6 @@ fn main() -> () {
StorageLive(_1); // scope 0 at $DIR/loop_test.rs:10:5: 12:6
StorageLive(_2); // scope 0 at $DIR/loop_test.rs:10:8: 10:12
_2 = const true; // scope 0 at $DIR/loop_test.rs:10:8: 10:12
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/loop_test.rs:10:8: 10:12
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
FakeRead(ForMatchedPlace, _2); // scope 0 at $DIR/loop_test.rs:10:8: 10:12
switchInt(_2) -> [false: bb3, otherwise: bb2]; // scope 0 at $DIR/loop_test.rs:10:5: 12:6
}
......@@ -68,12 +62,6 @@ fn main() -> () {
bb6: {
StorageLive(_6); // scope 0 at $DIR/loop_test.rs:14:13: 14:14
_6 = const 1_i32; // scope 0 at $DIR/loop_test.rs:14:17: 14:18
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/loop_test.rs:14:17: 14:18
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
FakeRead(ForLet, _6); // scope 0 at $DIR/loop_test.rs:14:13: 14:14
StorageDead(_6); // scope 0 at $DIR/loop_test.rs:16:5: 16:6
goto -> bb5; // scope 0 at $DIR/loop_test.rs:15:9: 15:17
......
......@@ -74,12 +74,6 @@
- bb8: {
+ bb5: {
_0 = const 1_i32; // scope 1 at $DIR/match-arm-scopes.rs:15:77: 15:78
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/match-arm-scopes.rs:15:77: 15:78
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
- drop(_7) -> [return: bb24, unwind: bb14]; // scope 0 at $DIR/match-arm-scopes.rs:15:77: 15:78
+ drop(_7) -> [return: bb19, unwind: bb10]; // scope 0 at $DIR/match-arm-scopes.rs:15:77: 15:78
}
......@@ -115,12 +109,6 @@
- bb12: {
+ bb8: {
_0 = const 3_i32; // scope 0 at $DIR/match-arm-scopes.rs:15:59: 15:60
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000003))
// mir::Constant
// + span: $DIR/match-arm-scopes.rs:15:59: 15:60
// + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) }
StorageDead(_10); // scope 0 at $DIR/match-arm-scopes.rs:15:72: 15:73
StorageDead(_9); // scope 0 at $DIR/match-arm-scopes.rs:15:77: 15:78
StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:15:77: 15:78
......@@ -201,12 +189,6 @@
- bb21: {
+ bb16: {
_0 = const 3_i32; // scope 0 at $DIR/match-arm-scopes.rs:15:59: 15:60
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000003))
// mir::Constant
// + span: $DIR/match-arm-scopes.rs:15:59: 15:60
// + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) }
StorageDead(_13); // scope 0 at $DIR/match-arm-scopes.rs:15:72: 15:73
StorageDead(_12); // scope 0 at $DIR/match-arm-scopes.rs:15:77: 15:78
StorageDead(_8); // scope 0 at $DIR/match-arm-scopes.rs:15:77: 15:78
......@@ -252,12 +234,6 @@
- bb25: {
+ bb20: {
_0 = const 2_i32; // scope 2 at $DIR/match-arm-scopes.rs:16:41: 16:42
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000002))
// mir::Constant
// + span: $DIR/match-arm-scopes.rs:16:41: 16:42
// + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) }
- drop(_16) -> [return: bb27, unwind: bb14]; // scope 0 at $DIR/match-arm-scopes.rs:16:41: 16:42
+ drop(_16) -> [return: bb22, unwind: bb10]; // scope 0 at $DIR/match-arm-scopes.rs:16:41: 16:42
}
......
......@@ -27,12 +27,6 @@ fn full_tested_match() -> () {
StorageLive(_1); // scope 0 at $DIR/match_false_edges.rs:15:13: 19:6
StorageLive(_2); // scope 0 at $DIR/match_false_edges.rs:15:19: 15:27
_2 = std::option::Option::<i32>::Some(const 42_i32); // scope 0 at $DIR/match_false_edges.rs:15:19: 15:27
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x0000002a))
// mir::Constant
// + span: $DIR/match_false_edges.rs:15:24: 15:26
// + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) }
FakeRead(ForMatchedPlace, _2); // scope 0 at $DIR/match_false_edges.rs:15:19: 15:27
_3 = discriminant(_2); // scope 0 at $DIR/match_false_edges.rs:16:9: 16:16
switchInt(move _3) -> [0_isize: bb2, 1_isize: bb3, otherwise: bb5]; // scope 0 at $DIR/match_false_edges.rs:16:9: 16:16
......@@ -44,18 +38,6 @@ fn full_tested_match() -> () {
bb2: {
_1 = (const 3_i32, const 3_i32); // scope 0 at $DIR/match_false_edges.rs:18:17: 18:23
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000003))
// mir::Constant
// + span: $DIR/match_false_edges.rs:18:18: 18:19
// + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) }
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000003))
// mir::Constant
// + span: $DIR/match_false_edges.rs:18:21: 18:22
// + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) }
goto -> bb11; // scope 0 at $DIR/match_false_edges.rs:15:13: 19:6
}
......@@ -105,12 +87,6 @@ fn full_tested_match() -> () {
StorageLive(_8); // scope 2 at $DIR/match_false_edges.rs:16:35: 16:36
_8 = _5; // scope 2 at $DIR/match_false_edges.rs:16:35: 16:36
_1 = (const 1_i32, move _8); // scope 2 at $DIR/match_false_edges.rs:16:31: 16:37
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/match_false_edges.rs:16:32: 16:33
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
StorageDead(_8); // scope 2 at $DIR/match_false_edges.rs:16:36: 16:37
StorageDead(_5); // scope 0 at $DIR/match_false_edges.rs:16:36: 16:37
StorageDead(_6); // scope 0 at $DIR/match_false_edges.rs:16:36: 16:37
......@@ -129,12 +105,6 @@ fn full_tested_match() -> () {
StorageLive(_10); // scope 3 at $DIR/match_false_edges.rs:17:24: 17:25
_10 = _9; // scope 3 at $DIR/match_false_edges.rs:17:24: 17:25
_1 = (const 2_i32, move _10); // scope 3 at $DIR/match_false_edges.rs:17:20: 17:26
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000002))
// mir::Constant
// + span: $DIR/match_false_edges.rs:17:21: 17:22
// + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) }
StorageDead(_10); // scope 3 at $DIR/match_false_edges.rs:17:25: 17:26
StorageDead(_9); // scope 0 at $DIR/match_false_edges.rs:17:25: 17:26
goto -> bb11; // scope 0 at $DIR/match_false_edges.rs:15:13: 19:6
......
......@@ -26,12 +26,6 @@ fn full_tested_match2() -> () {
StorageLive(_1); // scope 0 at $DIR/match_false_edges.rs:26:13: 30:6
StorageLive(_2); // scope 0 at $DIR/match_false_edges.rs:26:19: 26:27
_2 = std::option::Option::<i32>::Some(const 42_i32); // scope 0 at $DIR/match_false_edges.rs:26:19: 26:27
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x0000002a))
// mir::Constant
// + span: $DIR/match_false_edges.rs:26:24: 26:26
// + literal: Const { ty: i32, val: Value(Scalar(0x0000002a)) }
FakeRead(ForMatchedPlace, _2); // scope 0 at $DIR/match_false_edges.rs:26:19: 26:27
_3 = discriminant(_2); // scope 0 at $DIR/match_false_edges.rs:27:9: 27:16
switchInt(move _3) -> [0_isize: bb2, 1_isize: bb3, otherwise: bb5]; // scope 0 at $DIR/match_false_edges.rs:27:9: 27:16
......@@ -55,12 +49,6 @@ fn full_tested_match2() -> () {
StorageLive(_10); // scope 3 at $DIR/match_false_edges.rs:29:24: 29:25
_10 = _9; // scope 3 at $DIR/match_false_edges.rs:29:24: 29:25
_1 = (const 2_i32, move _10); // scope 3 at $DIR/match_false_edges.rs:29:20: 29:26
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000002))
// mir::Constant
// + span: $DIR/match_false_edges.rs:29:21: 29:22
// + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) }
StorageDead(_10); // scope 3 at $DIR/match_false_edges.rs:29:25: 29:26
StorageDead(_9); // scope 0 at $DIR/match_false_edges.rs:29:25: 29:26
goto -> bb11; // scope 0 at $DIR/match_false_edges.rs:26:13: 30:6
......@@ -97,12 +85,6 @@ fn full_tested_match2() -> () {
StorageLive(_8); // scope 2 at $DIR/match_false_edges.rs:27:35: 27:36
_8 = _5; // scope 2 at $DIR/match_false_edges.rs:27:35: 27:36
_1 = (const 1_i32, move _8); // scope 2 at $DIR/match_false_edges.rs:27:31: 27:37
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/match_false_edges.rs:27:32: 27:33
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
StorageDead(_8); // scope 2 at $DIR/match_false_edges.rs:27:36: 27:37
StorageDead(_5); // scope 0 at $DIR/match_false_edges.rs:27:36: 27:37
StorageDead(_6); // scope 0 at $DIR/match_false_edges.rs:27:36: 27:37
......@@ -117,18 +99,6 @@ fn full_tested_match2() -> () {
bb10: {
_1 = (const 3_i32, const 3_i32); // scope 0 at $DIR/match_false_edges.rs:28:17: 28:23
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000003))
// mir::Constant
// + span: $DIR/match_false_edges.rs:28:18: 28:19
// + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) }
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000003))
// mir::Constant
// + span: $DIR/match_false_edges.rs:28:21: 28:22
// + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) }
goto -> bb11; // scope 0 at $DIR/match_false_edges.rs:26:13: 30:6
}
......
......@@ -37,12 +37,6 @@ fn main() -> () {
StorageLive(_1); // scope 0 at $DIR/match_false_edges.rs:35:13: 40:6
StorageLive(_2); // scope 0 at $DIR/match_false_edges.rs:35:19: 35:26
_2 = std::option::Option::<i32>::Some(const 1_i32); // scope 0 at $DIR/match_false_edges.rs:35:19: 35:26
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/match_false_edges.rs:35:24: 35:25
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
FakeRead(ForMatchedPlace, _2); // scope 0 at $DIR/match_false_edges.rs:35:19: 35:26
_4 = discriminant(_2); // scope 0 at $DIR/match_false_edges.rs:36:9: 36:17
switchInt(move _4) -> [1_isize: bb3, otherwise: bb2]; // scope 0 at $DIR/match_false_edges.rs:36:9: 36:17
......@@ -64,12 +58,6 @@ fn main() -> () {
StorageLive(_14); // scope 0 at $DIR/match_false_edges.rs:39:9: 39:11
_14 = _2; // scope 0 at $DIR/match_false_edges.rs:39:9: 39:11
_1 = const 4_i32; // scope 5 at $DIR/match_false_edges.rs:39:15: 39:16
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000004))
// mir::Constant
// + span: $DIR/match_false_edges.rs:39:15: 39:16
// + literal: Const { ty: i32, val: Value(Scalar(0x00000004)) }
StorageDead(_14); // scope 0 at $DIR/match_false_edges.rs:39:15: 39:16
goto -> bb15; // scope 0 at $DIR/match_false_edges.rs:35:13: 40:6
}
......@@ -103,12 +91,6 @@ fn main() -> () {
StorageLive(_6); // scope 0 at $DIR/match_false_edges.rs:36:14: 36:16
_6 = ((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:36:14: 36:16
_1 = const 1_i32; // scope 2 at $DIR/match_false_edges.rs:36:32: 36:33
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/match_false_edges.rs:36:32: 36:33
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
StorageDead(_6); // scope 0 at $DIR/match_false_edges.rs:36:32: 36:33
StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:36:32: 36:33
goto -> bb15; // scope 0 at $DIR/match_false_edges.rs:35:13: 40:6
......@@ -124,12 +106,6 @@ fn main() -> () {
StorageLive(_9); // scope 0 at $DIR/match_false_edges.rs:37:9: 37:11
_9 = _2; // scope 0 at $DIR/match_false_edges.rs:37:9: 37:11
_1 = const 2_i32; // scope 3 at $DIR/match_false_edges.rs:37:15: 37:16
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000002))
// mir::Constant
// + span: $DIR/match_false_edges.rs:37:15: 37:16
// + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) }
StorageDead(_9); // scope 0 at $DIR/match_false_edges.rs:37:15: 37:16
goto -> bb15; // scope 0 at $DIR/match_false_edges.rs:35:13: 40:6
}
......@@ -162,12 +138,6 @@ fn main() -> () {
StorageLive(_10); // scope 0 at $DIR/match_false_edges.rs:38:14: 38:15
_10 = ((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:38:14: 38:15
_1 = const 3_i32; // scope 4 at $DIR/match_false_edges.rs:38:33: 38:34
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000003))
// mir::Constant
// + span: $DIR/match_false_edges.rs:38:33: 38:34
// + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) }
StorageDead(_10); // scope 0 at $DIR/match_false_edges.rs:38:33: 38:34
StorageDead(_11); // scope 0 at $DIR/match_false_edges.rs:38:33: 38:34
goto -> bb15; // scope 0 at $DIR/match_false_edges.rs:35:13: 40:6
......
......@@ -21,42 +21,18 @@ fn main() -> () {
bb0: {
StorageLive(_1); // scope 0 at $DIR/match_test.rs:7:9: 7:10
_1 = const 3_i32; // scope 0 at $DIR/match_test.rs:7:13: 7:14
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000003))
// mir::Constant
// + span: $DIR/match_test.rs:7:13: 7:14
// + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) }
FakeRead(ForLet, _1); // scope 0 at $DIR/match_test.rs:7:9: 7:10
StorageLive(_2); // scope 1 at $DIR/match_test.rs:8:9: 8:10
_2 = const true; // scope 1 at $DIR/match_test.rs:8:13: 8:17
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/match_test.rs:8:13: 8:17
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
FakeRead(ForLet, _2); // scope 1 at $DIR/match_test.rs:8:9: 8:10
StorageLive(_3); // scope 2 at $DIR/match_test.rs:12:5: 17:6
FakeRead(ForMatchedPlace, _1); // scope 2 at $DIR/match_test.rs:12:11: 12:12
_6 = Le(const 0_i32, _1); // scope 2 at $DIR/match_test.rs:13:9: 13:14
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000000))
// mir::Constant
// + span: $DIR/match_test.rs:13:9: 13:14
// + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
switchInt(move _6) -> [false: bb4, otherwise: bb1]; // scope 2 at $DIR/match_test.rs:13:9: 13:14
}
bb1: {
_7 = Lt(_1, const 10_i32); // scope 2 at $DIR/match_test.rs:13:9: 13:14
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x0000000a))
// mir::Constant
// + span: $DIR/match_test.rs:13:9: 13:14
// + literal: Const { ty: i32, val: Value(Scalar(0x0000000a)) }
switchInt(move _7) -> [false: bb4, otherwise: bb2]; // scope 2 at $DIR/match_test.rs:13:9: 13:14
}
......@@ -66,34 +42,16 @@ fn main() -> () {
bb3: {
_3 = const 3_i32; // scope 2 at $DIR/match_test.rs:16:14: 16:15
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000003))
// mir::Constant
// + span: $DIR/match_test.rs:16:14: 16:15
// + literal: Const { ty: i32, val: Value(Scalar(0x00000003)) }
goto -> bb14; // scope 2 at $DIR/match_test.rs:12:5: 17:6
}
bb4: {
_4 = Le(const 10_i32, _1); // scope 2 at $DIR/match_test.rs:14:9: 14:16
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x0000000a))
// mir::Constant
// + span: $DIR/match_test.rs:14:9: 14:16
// + literal: Const { ty: i32, val: Value(Scalar(0x0000000a)) }
switchInt(move _4) -> [false: bb7, otherwise: bb5]; // scope 2 at $DIR/match_test.rs:14:9: 14:16
}
bb5: {
_5 = Le(_1, const 20_i32); // scope 2 at $DIR/match_test.rs:14:9: 14:16
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000014))
// mir::Constant
// + span: $DIR/match_test.rs:14:9: 14:16
// + literal: Const { ty: i32, val: Value(Scalar(0x00000014)) }
switchInt(move _5) -> [false: bb7, otherwise: bb6]; // scope 2 at $DIR/match_test.rs:14:9: 14:16
}
......@@ -120,12 +78,6 @@ fn main() -> () {
StorageDead(_9); // scope 2 at $DIR/match_test.rs:13:23: 13:24
FakeRead(ForMatchGuard, _8); // scope 2 at $DIR/match_test.rs:13:18: 13:19
_3 = const 0_i32; // scope 2 at $DIR/match_test.rs:13:23: 13:24
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000000))
// mir::Constant
// + span: $DIR/match_test.rs:13:23: 13:24
// + literal: Const { ty: i32, val: Value(Scalar(0x00000000)) }
goto -> bb14; // scope 2 at $DIR/match_test.rs:12:5: 17:6
}
......@@ -136,23 +88,11 @@ fn main() -> () {
bb12: {
_3 = const 1_i32; // scope 2 at $DIR/match_test.rs:14:20: 14:21
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/match_test.rs:14:20: 14:21
// + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
goto -> bb14; // scope 2 at $DIR/match_test.rs:12:5: 17:6
}
bb13: {
_3 = const 2_i32; // scope 2 at $DIR/match_test.rs:15:15: 15:16
// ty::Const
// + ty: i32
// + val: Value(Scalar(0x00000002))
// mir::Constant
// + span: $DIR/match_test.rs:15:15: 15:16
// + literal: Const { ty: i32, val: Value(Scalar(0x00000002)) }
goto -> bb14; // scope 2 at $DIR/match_test.rs:12:5: 17:6
}
......
......@@ -34,97 +34,25 @@
StorageLive(_6); // scope 4 at $DIR/matches_reduce_branches.rs:17:5: 32:6
- switchInt(_1) -> [7_i32: bb2, otherwise: bb1]; // scope 4 at $DIR/matches_reduce_branches.rs:18:9: 18:10
+ _2 = Ne(_1, const 7_i32); // scope 4 at $DIR/matches_reduce_branches.rs:19:13: 19:22
+ // ty::Const
+ // + ty: i32
+ // + val: Value(Scalar(0x00000007))
+ // mir::Constant
+ // + span: $DIR/matches_reduce_branches.rs:1:1: 1:1
+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000007)) }
+ _3 = Eq(_1, const 7_i32); // scope 4 at $DIR/matches_reduce_branches.rs:20:13: 20:21
+ // ty::Const
+ // + ty: i32
+ // + val: Value(Scalar(0x00000007))
+ // mir::Constant
+ // + span: $DIR/matches_reduce_branches.rs:1:1: 1:1
+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000007)) }
+ _4 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:21:13: 21:22
+ // ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x00))
+ // mir::Constant
+ // + span: $DIR/matches_reduce_branches.rs:21:17: 21:22
+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
+ _5 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:22:13: 22:21
+ // ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x01))
+ // mir::Constant
+ // + span: $DIR/matches_reduce_branches.rs:22:17: 22:21
+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
+ goto -> bb3; // scope 4 at $DIR/matches_reduce_branches.rs:18:9: 18:10
}
bb1: {
_2 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:26:13: 26:21
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/matches_reduce_branches.rs:26:17: 26:21
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
_3 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:27:13: 27:22
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/matches_reduce_branches.rs:27:17: 27:22
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
_4 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:28:13: 28:22
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/matches_reduce_branches.rs:28:17: 28:22
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
_5 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:29:13: 29:21
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/matches_reduce_branches.rs:29:17: 29:21
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
goto -> bb3; // scope 4 at $DIR/matches_reduce_branches.rs:17:5: 32:6
}
bb2: {
_2 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:19:13: 19:22
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/matches_reduce_branches.rs:19:17: 19:22
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
_3 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:20:13: 20:21
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/matches_reduce_branches.rs:20:17: 20:21
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
_4 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:21:13: 21:22
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/matches_reduce_branches.rs:21:17: 21:22
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
_5 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:22:13: 22:21
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/matches_reduce_branches.rs:22:17: 22:21
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
goto -> bb3; // scope 4 at $DIR/matches_reduce_branches.rs:17:5: 32:6
}
......
......@@ -34,97 +34,25 @@
StorageLive(_6); // scope 4 at $DIR/matches_reduce_branches.rs:17:5: 32:6
- switchInt(_1) -> [7_i32: bb2, otherwise: bb1]; // scope 4 at $DIR/matches_reduce_branches.rs:18:9: 18:10
+ _2 = Ne(_1, const 7_i32); // scope 4 at $DIR/matches_reduce_branches.rs:19:13: 19:22
+ // ty::Const
+ // + ty: i32
+ // + val: Value(Scalar(0x00000007))
+ // mir::Constant
+ // + span: $DIR/matches_reduce_branches.rs:1:1: 1:1
+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000007)) }
+ _3 = Eq(_1, const 7_i32); // scope 4 at $DIR/matches_reduce_branches.rs:20:13: 20:21
+ // ty::Const
+ // + ty: i32
+ // + val: Value(Scalar(0x00000007))
+ // mir::Constant
+ // + span: $DIR/matches_reduce_branches.rs:1:1: 1:1
+ // + literal: Const { ty: i32, val: Value(Scalar(0x00000007)) }
+ _4 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:21:13: 21:22
+ // ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x00))
+ // mir::Constant
+ // + span: $DIR/matches_reduce_branches.rs:21:17: 21:22
+ // + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
+ _5 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:22:13: 22:21
+ // ty::Const
+ // + ty: bool
+ // + val: Value(Scalar(0x01))
+ // mir::Constant
+ // + span: $DIR/matches_reduce_branches.rs:22:17: 22:21
+ // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
+ goto -> bb3; // scope 4 at $DIR/matches_reduce_branches.rs:18:9: 18:10
}
bb1: {
_2 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:26:13: 26:21
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/matches_reduce_branches.rs:26:17: 26:21
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
_3 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:27:13: 27:22
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/matches_reduce_branches.rs:27:17: 27:22
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
_4 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:28:13: 28:22
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/matches_reduce_branches.rs:28:17: 28:22
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
_5 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:29:13: 29:21
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/matches_reduce_branches.rs:29:17: 29:21
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
goto -> bb3; // scope 4 at $DIR/matches_reduce_branches.rs:17:5: 32:6
}
bb2: {
_2 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:19:13: 19:22
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/matches_reduce_branches.rs:19:17: 19:22
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
_3 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:20:13: 20:21
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/matches_reduce_branches.rs:20:17: 20:21
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
_4 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:21:13: 21:22
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/matches_reduce_branches.rs:21:17: 21:22
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
_5 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:22:13: 22:21
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/matches_reduce_branches.rs:22:17: 22:21
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
goto -> bb3; // scope 4 at $DIR/matches_reduce_branches.rs:17:5: 32:6
}
......
......@@ -12,34 +12,16 @@
_3 = discriminant(_1); // scope 0 at $DIR/matches_reduce_branches.rs:6:22: 6:26
- switchInt(move _3) -> [0_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/matches_reduce_branches.rs:6:22: 6:26
+ _2 = Eq(_3, const 0_isize); // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
+ // ty::Const
+ // + ty: isize
+ // + val: Value(Scalar(0x00000000))
+ // mir::Constant
+ // + span: $DIR/matches_reduce_branches.rs:1:1: 1:1
+ // + literal: Const { ty: isize, val: Value(Scalar(0x00000000)) }
+ goto -> bb3; // scope 0 at $DIR/matches_reduce_branches.rs:6:22: 6:26
}
bb1: {
_2 = const false; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
goto -> bb3; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
}
bb2: {
_2 = const true; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
goto -> bb3; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
}
......
......@@ -12,34 +12,16 @@
_3 = discriminant(_1); // scope 0 at $DIR/matches_reduce_branches.rs:6:22: 6:26
- switchInt(move _3) -> [0_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/matches_reduce_branches.rs:6:22: 6:26
+ _2 = Eq(_3, const 0_isize); // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
+ // ty::Const
+ // + ty: isize
+ // + val: Value(Scalar(0x0000000000000000))
+ // mir::Constant
+ // + span: $DIR/matches_reduce_branches.rs:1:1: 1:1
+ // + literal: Const { ty: isize, val: Value(Scalar(0x0000000000000000)) }
+ goto -> bb3; // scope 0 at $DIR/matches_reduce_branches.rs:6:22: 6:26
}
bb1: {
_2 = const false; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: bool, val: Value(Scalar(0x00)) }
goto -> bb3; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
}
bb2: {
_2 = const true; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
goto -> bb3; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
}
......
......@@ -13,23 +13,11 @@
bb1: {
_0 = const 1_u8; // scope 0 at $DIR/matches_u8.rs:14:17: 14:18
// ty::Const
// + ty: u8
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/matches_u8.rs:14:17: 14:18
// + literal: Const { ty: u8, val: Value(Scalar(0x01)) }
goto -> bb3; // scope 0 at $DIR/matches_u8.rs:12:5: 15:6
}
bb2: {
_0 = const 0_u8; // scope 0 at $DIR/matches_u8.rs:13:17: 13:18
// ty::Const
// + ty: u8
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/matches_u8.rs:13:17: 13:18
// + literal: Const { ty: u8, val: Value(Scalar(0x00)) }
goto -> bb3; // scope 0 at $DIR/matches_u8.rs:12:5: 15:6
}
......
......@@ -13,23 +13,11 @@
bb1: {
_0 = const 1_u8; // scope 0 at $DIR/matches_u8.rs:14:17: 14:18
// ty::Const
// + ty: u8
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/matches_u8.rs:14:17: 14:18
// + literal: Const { ty: u8, val: Value(Scalar(0x01)) }
goto -> bb3; // scope 0 at $DIR/matches_u8.rs:12:5: 15:6
}
bb2: {
_0 = const 0_u8; // scope 0 at $DIR/matches_u8.rs:13:17: 13:18
// ty::Const
// + ty: u8
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/matches_u8.rs:13:17: 13:18
// + literal: Const { ty: u8, val: Value(Scalar(0x00)) }
goto -> bb3; // scope 0 at $DIR/matches_u8.rs:12:5: 15:6
}
......
......@@ -13,23 +13,11 @@
bb1: {
_0 = const 1_i8; // scope 0 at $DIR/matches_u8.rs:22:17: 22:18
// ty::Const
// + ty: i8
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/matches_u8.rs:22:17: 22:18
// + literal: Const { ty: i8, val: Value(Scalar(0x01)) }
goto -> bb3; // scope 0 at $DIR/matches_u8.rs:20:5: 23:6
}
bb2: {
_0 = const 0_i8; // scope 0 at $DIR/matches_u8.rs:21:17: 21:18
// ty::Const
// + ty: i8
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/matches_u8.rs:21:17: 21:18
// + literal: Const { ty: i8, val: Value(Scalar(0x00)) }
goto -> bb3; // scope 0 at $DIR/matches_u8.rs:20:5: 23:6
}
......
......@@ -13,23 +13,11 @@
bb1: {
_0 = const 1_i8; // scope 0 at $DIR/matches_u8.rs:22:17: 22:18
// ty::Const
// + ty: i8
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/matches_u8.rs:22:17: 22:18
// + literal: Const { ty: i8, val: Value(Scalar(0x01)) }
goto -> bb3; // scope 0 at $DIR/matches_u8.rs:20:5: 23:6
}
bb2: {
_0 = const 0_i8; // scope 0 at $DIR/matches_u8.rs:21:17: 21:18
// ty::Const
// + ty: i8
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/matches_u8.rs:21:17: 21:18
// + literal: Const { ty: i8, val: Value(Scalar(0x00)) }
goto -> bb3; // scope 0 at $DIR/matches_u8.rs:20:5: 23:6
}
......
......@@ -43,12 +43,6 @@ fn use_x(_1: &'_#6r mut i32, _2: &'_#7r u32, _3: &'_#8r u32, _4: &'_#9r u32) ->
bb0: {
_0 = const Const(Value(Scalar(0x01)): bool); // bb0[0]: scope 0 at $DIR/named-lifetimes-basic.rs:12:88: 12:92
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/named-lifetimes-basic.rs:12:88: 12:92
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
return; // bb0[1]: scope 0 at $DIR/named-lifetimes-basic.rs:12:94: 12:94
}
}
......@@ -46,34 +46,10 @@ fn main() -> () {
bb0: {
StorageLive(_1); // bb0[0]: scope 0 at $DIR/region-subtyping-basic.rs:17:9: 17:14
_1 = [const Const(Value(Scalar(0x00000001)): usize), const Const(Value(Scalar(0x00000002)): usize), const Const(Value(Scalar(0x00000003)): usize)]; // bb0[1]: scope 0 at $DIR/region-subtyping-basic.rs:17:17: 17:26
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x00000001))
// mir::Constant
// + span: $DIR/region-subtyping-basic.rs:17:18: 17:19
// + literal: Const { ty: usize, val: Value(Scalar(0x00000001)) }
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x00000002))
// mir::Constant
// + span: $DIR/region-subtyping-basic.rs:17:21: 17:22
// + literal: Const { ty: usize, val: Value(Scalar(0x00000002)) }
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x00000003))
// mir::Constant
// + span: $DIR/region-subtyping-basic.rs:17:24: 17:25
// + literal: Const { ty: usize, val: Value(Scalar(0x00000003)) }
FakeRead(ForLet, _1); // bb0[2]: scope 0 at $DIR/region-subtyping-basic.rs:17:9: 17:14
StorageLive(_2); // bb0[3]: scope 1 at $DIR/region-subtyping-basic.rs:18:9: 18:10
StorageLive(_3); // bb0[4]: scope 1 at $DIR/region-subtyping-basic.rs:18:16: 18:17
_3 = const Const(Value(Scalar(0x00000000)): usize); // bb0[5]: scope 1 at $DIR/region-subtyping-basic.rs:18:16: 18:17
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x00000000))
// mir::Constant
// + span: $DIR/region-subtyping-basic.rs:18:16: 18:17
// + literal: Const { ty: usize, val: Value(Scalar(0x00000000)) }
_4 = Len(_1); // bb0[6]: scope 1 at $DIR/region-subtyping-basic.rs:18:14: 18:18
_5 = Lt(_3, _4); // bb0[7]: scope 1 at $DIR/region-subtyping-basic.rs:18:14: 18:18
assert(move _5, "index out of bounds: the len is {} but the index is {}", move _4, _3) -> [success: bb2, unwind: bb1]; // bb0[8]: scope 1 at $DIR/region-subtyping-basic.rs:18:14: 18:18
......@@ -91,12 +67,6 @@ fn main() -> () {
FakeRead(ForLet, _6); // bb2[4]: scope 2 at $DIR/region-subtyping-basic.rs:19:9: 19:10
StorageLive(_7); // bb2[5]: scope 3 at $DIR/region-subtyping-basic.rs:20:8: 20:12
_7 = const Const(Value(Scalar(0x01)): bool); // bb2[6]: scope 3 at $DIR/region-subtyping-basic.rs:20:8: 20:12
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/region-subtyping-basic.rs:20:8: 20:12
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
FakeRead(ForMatchedPlace, _7); // bb2[7]: scope 3 at $DIR/region-subtyping-basic.rs:20:8: 20:12
switchInt(_7) -> [Const(Value(Scalar(0x00)): bool): bb4, otherwise: bb3]; // bb2[8]: scope 3 at $DIR/region-subtyping-basic.rs:20:5: 24:6
}
......@@ -114,12 +84,6 @@ fn main() -> () {
// mir::Constant
// + span: $DIR/region-subtyping-basic.rs:23:9: 23:14
// + literal: Const { ty: fn(usize) -> bool {use_x}, val: Value(Scalar(<ZST>)) }
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x00000016))
// mir::Constant
// + span: $DIR/region-subtyping-basic.rs:23:15: 23:17
// + literal: Const { ty: usize, val: Value(Scalar(0x00000016)) }
}
bb5: {
......
......@@ -46,34 +46,10 @@ fn main() -> () {
bb0: {
StorageLive(_1); // bb0[0]: scope 0 at $DIR/region-subtyping-basic.rs:17:9: 17:14
_1 = [const Const(Value(Scalar(0x0000000000000001)): usize), const Const(Value(Scalar(0x0000000000000002)): usize), const Const(Value(Scalar(0x0000000000000003)): usize)]; // bb0[1]: scope 0 at $DIR/region-subtyping-basic.rs:17:17: 17:26
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x0000000000000001))
// mir::Constant
// + span: $DIR/region-subtyping-basic.rs:17:18: 17:19
// + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000001)) }
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x0000000000000002))
// mir::Constant
// + span: $DIR/region-subtyping-basic.rs:17:21: 17:22
// + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000002)) }
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x0000000000000003))
// mir::Constant
// + span: $DIR/region-subtyping-basic.rs:17:24: 17:25
// + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000003)) }
FakeRead(ForLet, _1); // bb0[2]: scope 0 at $DIR/region-subtyping-basic.rs:17:9: 17:14
StorageLive(_2); // bb0[3]: scope 1 at $DIR/region-subtyping-basic.rs:18:9: 18:10
StorageLive(_3); // bb0[4]: scope 1 at $DIR/region-subtyping-basic.rs:18:16: 18:17
_3 = const Const(Value(Scalar(0x0000000000000000)): usize); // bb0[5]: scope 1 at $DIR/region-subtyping-basic.rs:18:16: 18:17
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x0000000000000000))
// mir::Constant
// + span: $DIR/region-subtyping-basic.rs:18:16: 18:17
// + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000000)) }
_4 = Len(_1); // bb0[6]: scope 1 at $DIR/region-subtyping-basic.rs:18:14: 18:18
_5 = Lt(_3, _4); // bb0[7]: scope 1 at $DIR/region-subtyping-basic.rs:18:14: 18:18
assert(move _5, "index out of bounds: the len is {} but the index is {}", move _4, _3) -> [success: bb2, unwind: bb1]; // bb0[8]: scope 1 at $DIR/region-subtyping-basic.rs:18:14: 18:18
......@@ -91,12 +67,6 @@ fn main() -> () {
FakeRead(ForLet, _6); // bb2[4]: scope 2 at $DIR/region-subtyping-basic.rs:19:9: 19:10
StorageLive(_7); // bb2[5]: scope 3 at $DIR/region-subtyping-basic.rs:20:8: 20:12
_7 = const Const(Value(Scalar(0x01)): bool); // bb2[6]: scope 3 at $DIR/region-subtyping-basic.rs:20:8: 20:12
// ty::Const
// + ty: bool
// + val: Value(Scalar(0x01))
// mir::Constant
// + span: $DIR/region-subtyping-basic.rs:20:8: 20:12
// + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
FakeRead(ForMatchedPlace, _7); // bb2[7]: scope 3 at $DIR/region-subtyping-basic.rs:20:8: 20:12
switchInt(_7) -> [Const(Value(Scalar(0x00)): bool): bb4, otherwise: bb3]; // bb2[8]: scope 3 at $DIR/region-subtyping-basic.rs:20:5: 24:6
}
......@@ -114,12 +84,6 @@ fn main() -> () {
// mir::Constant
// + span: $DIR/region-subtyping-basic.rs:23:9: 23:14
// + literal: Const { ty: fn(usize) -> bool {use_x}, val: Value(Scalar(<ZST>)) }
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x0000000000000016))
// mir::Constant
// + span: $DIR/region-subtyping-basic.rs:23:15: 23:17
// + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000016)) }
}
bb5: {
......
......@@ -19,12 +19,6 @@
- StorageLive(_2); // scope 0 at $DIR/nrvo-simple.rs:3:9: 3:16
- _2 = [const 0_u8; 1024]; // scope 0 at $DIR/nrvo-simple.rs:3:19: 3:28
+ _0 = [const 0_u8; 1024]; // scope 0 at $DIR/nrvo-simple.rs:3:19: 3:28
// ty::Const
// + ty: u8
// + val: Value(Scalar(0x00))
// mir::Constant
// + span: $DIR/nrvo-simple.rs:3:20: 3:21
// + literal: Const { ty: u8, val: Value(Scalar(0x00)) }
StorageLive(_3); // scope 1 at $DIR/nrvo-simple.rs:4:5: 4:19
StorageLive(_5); // scope 1 at $DIR/nrvo-simple.rs:4:10: 4:18
StorageLive(_6); // scope 1 at $DIR/nrvo-simple.rs:4:10: 4:18
......
......@@ -17,12 +17,6 @@ fn main() -> () {
StorageLive(_2); // scope 0 at $DIR/packed-struct-drop-aligned.rs:6:24: 6:42
StorageLive(_3); // scope 0 at $DIR/packed-struct-drop-aligned.rs:6:32: 6:41
_3 = Droppy(const 0_usize); // scope 0 at $DIR/packed-struct-drop-aligned.rs:6:32: 6:41
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x00000000))
// mir::Constant
// + span: $DIR/packed-struct-drop-aligned.rs:6:39: 6:40
// + literal: Const { ty: usize, val: Value(Scalar(0x00000000)) }
_2 = Aligned(move _3); // scope 0 at $DIR/packed-struct-drop-aligned.rs:6:24: 6:42
StorageDead(_3); // scope 0 at $DIR/packed-struct-drop-aligned.rs:6:41: 6:42
_1 = Packed(move _2); // scope 0 at $DIR/packed-struct-drop-aligned.rs:6:17: 6:43
......@@ -30,12 +24,6 @@ fn main() -> () {
StorageLive(_4); // scope 1 at $DIR/packed-struct-drop-aligned.rs:7:11: 7:29
StorageLive(_5); // scope 1 at $DIR/packed-struct-drop-aligned.rs:7:19: 7:28
_5 = Droppy(const 0_usize); // scope 1 at $DIR/packed-struct-drop-aligned.rs:7:19: 7:28
// ty::Const
// + ty: usize
// + val: Value(Scalar(0x00000000))
// mir::Constant
// + span: $DIR/packed-struct-drop-aligned.rs:7:26: 7:27
// + literal: Const { ty: usize, val: Value(Scalar(0x00000000)) }
_4 = Aligned(move _5); // scope 1 at $DIR/packed-struct-drop-aligned.rs:7:11: 7:29
StorageDead(_5); // scope 1 at $DIR/packed-struct-drop-aligned.rs:7:28: 7:29
StorageLive(_6); // scope 1 at $DIR/packed-struct-drop-aligned.rs:7:5: 7:8
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册