X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=tests%2Fmir-opt%2Fconst_prop%2Faggregate.main.PreCodegen.after.mir;h=4706af92cba982460cb000b76ce91829be11aa13;hb=86cc4141f78f094ff639c76fe3c8ab72f64def26;hp=cfc9a72e3b2287d4a4595a679a93200a796e31a6;hpb=0f86ada9d8095a2cc61bfaf0b21f872e34602674;p=rust.git diff --git a/tests/mir-opt/const_prop/aggregate.main.PreCodegen.after.mir b/tests/mir-opt/const_prop/aggregate.main.PreCodegen.after.mir index cfc9a72e3b2..4706af92cba 100644 --- a/tests/mir-opt/const_prop/aggregate.main.PreCodegen.after.mir +++ b/tests/mir-opt/const_prop/aggregate.main.PreCodegen.after.mir @@ -2,9 +2,11 @@ fn main() -> () { let mut _0: (); // return place in scope 0 at $DIR/aggregate.rs:+0:11: +0:11 - let _1: i32; // in scope 0 at $DIR/aggregate.rs:+1:9: +1:10 - let mut _2: i32; // in scope 0 at $DIR/aggregate.rs:+1:13: +1:24 - let mut _3: (i32, i32, i32); // in scope 0 at $DIR/aggregate.rs:+1:13: +1:22 + let _1: u8; // in scope 0 at $DIR/aggregate.rs:+1:9: +1:10 + let mut _2: u8; // in scope 0 at $DIR/aggregate.rs:+1:13: +1:24 + let mut _3: (i32, u8, i32); // in scope 0 at $DIR/aggregate.rs:+1:13: +1:22 + let _4: (); // in scope 0 at $DIR/aggregate.rs:+2:5: +2:11 + let mut _5: u8; // in scope 0 at $DIR/aggregate.rs:+2:9: +2:10 scope 1 { debug x => _1; // in scope 1 at $DIR/aggregate.rs:+1:9: +1:10 } @@ -13,16 +15,25 @@ fn main() -> () { StorageLive(_1); // scope 0 at $DIR/aggregate.rs:+1:9: +1:10 StorageLive(_2); // scope 0 at $DIR/aggregate.rs:+1:13: +1:24 StorageLive(_3); // scope 0 at $DIR/aggregate.rs:+1:13: +1:22 - Deinit(_3); // scope 0 at $DIR/aggregate.rs:+1:13: +1:22 - (_3.0: i32) = const 0_i32; // scope 0 at $DIR/aggregate.rs:+1:13: +1:22 - (_3.1: i32) = const 1_i32; // scope 0 at $DIR/aggregate.rs:+1:13: +1:22 - (_3.2: i32) = const 2_i32; // scope 0 at $DIR/aggregate.rs:+1:13: +1:22 - _2 = const 1_i32; // scope 0 at $DIR/aggregate.rs:+1:13: +1:24 - _1 = const 1_i32; // scope 0 at $DIR/aggregate.rs:+1:13: +1:28 + _3 = (const 0_i32, const 1_u8, const 2_i32); // scope 0 at $DIR/aggregate.rs:+1:13: +1:22 + _2 = const 1_u8; // scope 0 at $DIR/aggregate.rs:+1:13: +1:24 + _1 = const 1_u8; // scope 0 at $DIR/aggregate.rs:+1:13: +1:28 StorageDead(_2); // scope 0 at $DIR/aggregate.rs:+1:27: +1:28 StorageDead(_3); // scope 0 at $DIR/aggregate.rs:+1:28: +1:29 - _0 = const (); // scope 0 at $DIR/aggregate.rs:+0:11: +2:2 - StorageDead(_1); // scope 0 at $DIR/aggregate.rs:+2:1: +2:2 - return; // scope 0 at $DIR/aggregate.rs:+2:2: +2:2 + StorageLive(_4); // scope 1 at $DIR/aggregate.rs:+2:5: +2:11 + StorageLive(_5); // scope 1 at $DIR/aggregate.rs:+2:9: +2:10 + _5 = const 1_u8; // scope 1 at $DIR/aggregate.rs:+2:9: +2:10 + _4 = foo(move _5) -> bb1; // scope 1 at $DIR/aggregate.rs:+2:5: +2:11 + // mir::Constant + // + span: $DIR/aggregate.rs:8:5: 8:8 + // + literal: Const { ty: fn(u8) {foo}, val: Value() } + } + + bb1: { + StorageDead(_5); // scope 1 at $DIR/aggregate.rs:+2:10: +2:11 + StorageDead(_4); // scope 1 at $DIR/aggregate.rs:+2:11: +2:12 + _0 = const (); // scope 0 at $DIR/aggregate.rs:+0:11: +3:2 + StorageDead(_1); // scope 0 at $DIR/aggregate.rs:+3:1: +3:2 + return; // scope 0 at $DIR/aggregate.rs:+3:2: +3:2 } }