blob: 7012cc5aa7f60161e80fa3d8c3c03a2c7ae0e85d [file] [log] [blame]
- // MIR for `foo` before ScalarReplacementOfAggregates
+ // MIR for `foo` after ScalarReplacementOfAggregates
fn foo() -> () {
let mut _0: ();
let _1: Foo<T>;
let mut _2: std::result::Result<std::boxed::Box<dyn std::fmt::Display>, <T as Err>::Err>;
let mut _3: std::boxed::Box<dyn std::fmt::Display>;
let mut _4: std::boxed::Box<u32>;
let mut _7: isize;
let _9: ();
let _10: ();
let mut _11: std::fmt::Arguments<'_>;
let mut _13: &std::boxed::Box<dyn std::fmt::Display>;
let mut _14: &u32;
let mut _16: core::fmt::rt::Argument<'_>;
let mut _17: &std::boxed::Box<dyn std::fmt::Display>;
let mut _18: core::fmt::rt::Argument<'_>;
let mut _19: &u32;
let mut _20: &[u8; 7];
let _21: &[u8; 7];
let mut _22: &[core::fmt::rt::Argument<'_>; 2];
let _23: &[core::fmt::rt::Argument<'_>; 2];
let mut _24: &std::boxed::Box<dyn std::fmt::Display>;
let mut _25: &u32;
let mut _26: bool;
let mut _27: isize;
let mut _28: isize;
let mut _29: isize;
+ let _30: std::result::Result<std::boxed::Box<dyn std::fmt::Display>, <T as Err>::Err>;
+ let _31: u32;
scope 1 {
- debug foo => _1;
+ debug ((foo: Foo<T>).0: std::result::Result<std::boxed::Box<dyn std::fmt::Display>, <T as Err>::Err>) => _30;
+ debug ((foo: Foo<T>).1: u32) => _31;
let _5: std::result::Result<std::boxed::Box<dyn std::fmt::Display>, <T as Err>::Err>;
scope 2 {
debug x => _5;
let _6: u32;
scope 3 {
debug y => _6;
scope 4 {
debug x => _8;
let _8: std::boxed::Box<dyn std::fmt::Display>;
let _12: (&std::boxed::Box<dyn std::fmt::Display>, &u32);
+ let _32: &std::boxed::Box<dyn std::fmt::Display>;
+ let _33: &u32;
scope 5 {
- debug args => _12;
+ debug ((args: (&Box<dyn std::fmt::Display>, &u32)).0: &std::boxed::Box<dyn std::fmt::Display>) => _32;
+ debug ((args: (&Box<dyn std::fmt::Display>, &u32)).1: &u32) => _33;
let _15: [core::fmt::rt::Argument<'_>; 2];
scope 6 {
debug args => _15;
}
}
}
}
}
}
bb0: {
_26 = const false;
- StorageLive(_1);
+ StorageLive(_30);
+ StorageLive(_31);
+ nop;
StorageLive(_2);
StorageLive(_3);
StorageLive(_4);
_4 = Box::<u32>::new(const 5_u32) -> [return: bb1, unwind unreachable];
}
bb1: {
_3 = move _4 as std::boxed::Box<dyn std::fmt::Display> (PointerCoercion(Unsize, Implicit));
StorageDead(_4);
_2 = Result::<Box<dyn std::fmt::Display>, <T as Err>::Err>::Ok(move _3);
StorageDead(_3);
- _1 = Foo::<T> { x: move _2, y: const 7_u32 };
+ _30 = move _2;
+ _31 = const 7_u32;
+ nop;
StorageDead(_2);
StorageLive(_5);
_26 = const true;
- _5 = move (_1.0: std::result::Result<std::boxed::Box<dyn std::fmt::Display>, <T as Err>::Err>);
+ _5 = move _30;
StorageLive(_6);
- _6 = copy (_1.1: u32);
+ _6 = copy _31;
_7 = discriminant(_5);
switchInt(move _7) -> [0: bb2, otherwise: bb7];
}
bb2: {
StorageLive(_8);
_8 = move ((_5 as Ok).0: std::boxed::Box<dyn std::fmt::Display>);
StorageLive(_9);
StorageLive(_10);
StorageLive(_11);
- StorageLive(_12);
+ StorageLive(_32);
+ StorageLive(_33);
+ nop;
StorageLive(_13);
_13 = &_8;
StorageLive(_14);
_14 = &_6;
- _12 = (move _13, move _14);
+ _32 = move _13;
+ _33 = move _14;
+ nop;
StorageDead(_14);
StorageDead(_13);
StorageLive(_15);
StorageLive(_16);
StorageLive(_17);
- _24 = copy (_12.0: &std::boxed::Box<dyn std::fmt::Display>);
+ _24 = copy _32;
_17 = &(*_24);
_16 = core::fmt::rt::Argument::<'_>::new_display::<Box<dyn std::fmt::Display>>(move _17) -> [return: bb3, unwind unreachable];
}
bb3: {
StorageDead(_17);
StorageLive(_18);
StorageLive(_19);
- _25 = copy (_12.1: &u32);
+ _25 = copy _33;
_19 = &(*_25);
_18 = core::fmt::rt::Argument::<'_>::new_display::<u32>(move _19) -> [return: bb4, unwind unreachable];
}
bb4: {
StorageDead(_19);
_15 = [move _16, move _18];
StorageDead(_18);
StorageDead(_16);
StorageLive(_20);
StorageLive(_21);
_21 = const b"\xc0\x01 \xc0\x01\n\x00";
_20 = &(*_21);
StorageLive(_22);
StorageLive(_23);
_23 = &_15;
_22 = &(*_23);
_11 = Arguments::<'_>::new::<7, 2>(move _20, move _22) -> [return: bb5, unwind unreachable];
}
bb5: {
StorageDead(_23);
StorageDead(_22);
StorageDead(_21);
StorageDead(_20);
_10 = _eprint(move _11) -> [return: bb6, unwind unreachable];
}
bb6: {
StorageDead(_11);
StorageDead(_15);
- StorageDead(_12);
+ StorageDead(_32);
+ StorageDead(_33);
+ nop;
StorageDead(_10);
_9 = const ();
StorageDead(_9);
_0 = const ();
drop(_8) -> [return: bb8, unwind unreachable];
}
bb7: {
_0 = const ();
goto -> bb9;
}
bb8: {
StorageDead(_8);
goto -> bb9;
}
bb9: {
StorageDead(_6);
_27 = discriminant(_5);
switchInt(move _27) -> [0: bb10, otherwise: bb11];
}
bb10: {
_26 = const false;
StorageDead(_5);
- StorageDead(_1);
+ StorageDead(_30);
+ StorageDead(_31);
+ nop;
return;
}
bb11: {
drop(_5) -> [return: bb10, unwind unreachable];
}
}
ALLOC0 (size: 7, align: 1) {
c0 01 20 c0 01 0a 00 │ .. ....
}