diff --git a/src/test/mir-opt/issue_73223.main.PreCodegen.32bit.diff b/src/test/mir-opt/issue_73223.main.PreCodegen.32bit.diff index 95632293d9991..ff9d6a6a6d0a6 100644 --- a/src/test/mir-opt/issue_73223.main.PreCodegen.32bit.diff +++ b/src/test/mir-opt/issue_73223.main.PreCodegen.32bit.diff @@ -13,11 +13,13 @@ let mut _11: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _12: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _13: i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let mut _15: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let _16: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let mut _17: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let _18: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let mut _19: std::option::Option; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let mut _14: &core::panic::assert_info::BinaryAssertionStaticData; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let _15: &core::panic::assert_info::BinaryAssertionStaticData; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let mut _16: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let _17: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let mut _18: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let _19: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let mut _20: std::option::Option; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL scope 1 { debug split => _1; // in scope 1 at $DIR/issue-73223.rs:2:9: 2:14 let _4: std::option::Option; // in scope 1 at $DIR/issue-73223.rs:7:9: 7:14 @@ -25,14 +27,11 @@ debug _prev => _4; // in scope 3 at $DIR/issue-73223.rs:7:9: 7:14 let _9: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let _10: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let mut _20: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let mut _22: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL scope 4 { debug left_val => _9; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL debug right_val => _10; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let _14: core::panicking::AssertKind; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - scope 5 { - debug kind => _14; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - } + let mut _21: &core::panic::assert_info::BinaryAssertionStaticData; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL } } } @@ -60,14 +59,14 @@ StorageLive(_7); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _7 = &_1; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageLive(_8); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _20 = const main::promoted[0]; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _22 = const main::promoted[1]; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL // ty::Const // + ty: &i32 - // + val: Unevaluated(main, [], Some(promoted[0])) + // + val: Unevaluated(main, [], Some(promoted[1])) // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ issue_73223[2d0f]::main), const_param_did: None }, substs_: Some([]), promoted: Some(promoted[0]) }) } - _8 = _20; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + // + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ issue_73223[2d0f]::main), const_param_did: None }, substs_: Some([]), promoted: Some(promoted[1]) }) } + _8 = _22; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL (_6.0: &i32) = move _7; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL (_6.1: &i32) = move _8; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageDead(_8); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL @@ -89,27 +88,30 @@ bb1: { StorageLive(_14); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - discriminant(_14) = 0; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - StorageLive(_15); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - StorageLive(_16); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _16 = _9; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _15 = _16; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - StorageLive(_17); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - StorageLive(_18); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _18 = _10; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _17 = _18; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - StorageLive(_19); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - discriminant(_19) = 0; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - core::panicking::assert_failed::(const core::panicking::AssertKind::Eq, move _15, move _17, move _19); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + StorageLive(_15); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _21 = const main::promoted[0]; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + // ty::Const + // + ty: &core::panic::assert_info::BinaryAssertionStaticData + // + val: Unevaluated(main, [], Some(promoted[0])) // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: for<'r, 's, 't0> fn(core::panicking::AssertKind, &'r i32, &'s i32, std::option::Option>) -> ! {core::panicking::assert_failed::}, val: Value(Scalar()) } - // ty::Const - // + ty: core::panicking::AssertKind - // + val: Value(Scalar(0x00)) + // + literal: Const { ty: &core::panic::assert_info::BinaryAssertionStaticData, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ issue_73223[2d0f]::main), const_param_did: None }, substs_: Some([]), promoted: Some(promoted[0]) }) } + _15 = _21; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _14 = _15; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + StorageLive(_16); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + StorageLive(_17); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _17 = _9; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _16 = _17; // 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 + StorageLive(_19); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _19 = _10; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _18 = _19; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + StorageLive(_20); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + discriminant(_20) = 0; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + core::panicking::assert_failed::(move _14, move _16, move _18, move _20); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: core::panicking::AssertKind, val: Value(Scalar(0x00)) } + // + literal: Const { ty: for<'r, 's, 't0> fn(&'static core::panic::assert_info::BinaryAssertionStaticData, &'r i32, &'s i32, std::option::Option>) -> ! {core::panicking::assert_failed::}, val: Value(Scalar()) } } bb2: { diff --git a/src/test/mir-opt/issue_73223.main.PreCodegen.64bit.diff b/src/test/mir-opt/issue_73223.main.PreCodegen.64bit.diff index 95632293d9991..ff9d6a6a6d0a6 100644 --- a/src/test/mir-opt/issue_73223.main.PreCodegen.64bit.diff +++ b/src/test/mir-opt/issue_73223.main.PreCodegen.64bit.diff @@ -13,11 +13,13 @@ let mut _11: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _12: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _13: i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let mut _15: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let _16: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let mut _17: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let _18: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let mut _19: std::option::Option; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let mut _14: &core::panic::assert_info::BinaryAssertionStaticData; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let _15: &core::panic::assert_info::BinaryAssertionStaticData; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let mut _16: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let _17: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let mut _18: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let _19: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let mut _20: std::option::Option; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL scope 1 { debug split => _1; // in scope 1 at $DIR/issue-73223.rs:2:9: 2:14 let _4: std::option::Option; // in scope 1 at $DIR/issue-73223.rs:7:9: 7:14 @@ -25,14 +27,11 @@ debug _prev => _4; // in scope 3 at $DIR/issue-73223.rs:7:9: 7:14 let _9: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let _10: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let mut _20: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let mut _22: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL scope 4 { debug left_val => _9; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL debug right_val => _10; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let _14: core::panicking::AssertKind; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - scope 5 { - debug kind => _14; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - } + let mut _21: &core::panic::assert_info::BinaryAssertionStaticData; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL } } } @@ -60,14 +59,14 @@ StorageLive(_7); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _7 = &_1; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageLive(_8); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _20 = const main::promoted[0]; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _22 = const main::promoted[1]; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL // ty::Const // + ty: &i32 - // + val: Unevaluated(main, [], Some(promoted[0])) + // + val: Unevaluated(main, [], Some(promoted[1])) // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ issue_73223[2d0f]::main), const_param_did: None }, substs_: Some([]), promoted: Some(promoted[0]) }) } - _8 = _20; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + // + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ issue_73223[2d0f]::main), const_param_did: None }, substs_: Some([]), promoted: Some(promoted[1]) }) } + _8 = _22; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL (_6.0: &i32) = move _7; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL (_6.1: &i32) = move _8; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageDead(_8); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL @@ -89,27 +88,30 @@ bb1: { StorageLive(_14); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - discriminant(_14) = 0; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - StorageLive(_15); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - StorageLive(_16); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _16 = _9; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _15 = _16; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - StorageLive(_17); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - StorageLive(_18); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _18 = _10; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _17 = _18; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - StorageLive(_19); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - discriminant(_19) = 0; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - core::panicking::assert_failed::(const core::panicking::AssertKind::Eq, move _15, move _17, move _19); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + StorageLive(_15); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _21 = const main::promoted[0]; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + // ty::Const + // + ty: &core::panic::assert_info::BinaryAssertionStaticData + // + val: Unevaluated(main, [], Some(promoted[0])) // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: for<'r, 's, 't0> fn(core::panicking::AssertKind, &'r i32, &'s i32, std::option::Option>) -> ! {core::panicking::assert_failed::}, val: Value(Scalar()) } - // ty::Const - // + ty: core::panicking::AssertKind - // + val: Value(Scalar(0x00)) + // + literal: Const { ty: &core::panic::assert_info::BinaryAssertionStaticData, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ issue_73223[2d0f]::main), const_param_did: None }, substs_: Some([]), promoted: Some(promoted[0]) }) } + _15 = _21; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _14 = _15; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + StorageLive(_16); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + StorageLive(_17); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _17 = _9; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _16 = _17; // 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 + StorageLive(_19); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _19 = _10; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _18 = _19; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + StorageLive(_20); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + discriminant(_20) = 0; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + core::panicking::assert_failed::(move _14, move _16, move _18, move _20); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: core::panicking::AssertKind, val: Value(Scalar(0x00)) } + // + literal: Const { ty: for<'r, 's, 't0> fn(&'static core::panic::assert_info::BinaryAssertionStaticData, &'r i32, &'s i32, std::option::Option>) -> ! {core::panicking::assert_failed::}, val: Value(Scalar()) } } bb2: { diff --git a/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.32bit.diff b/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.32bit.diff index 946aab9c6e898..8abfbc6d307ef 100644 --- a/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.32bit.diff +++ b/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.32bit.diff @@ -19,13 +19,16 @@ let mut _17: i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _18: i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _19: !; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let _21: !; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let mut _22: core::panicking::AssertKind; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let mut _23: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let _24: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let _20: !; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let mut _21: &core::panic::assert_info::BinaryAssertionStaticData; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let _22: &core::panic::assert_info::BinaryAssertionStaticData; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let _23: core::panic::assert_info::BinaryAssertionStaticData; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let mut _24: core::panic::assert_info::BinaryAssertKind; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _25: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let _26: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let mut _27: std::option::Option; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let mut _27: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let _28: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let mut _29: std::option::Option; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL scope 1 { debug split => _1; // in scope 1 at $DIR/issue-73223.rs:2:9: 2:14 let _6: std::option::Option; // in scope 1 at $DIR/issue-73223.rs:7:9: 7:14 @@ -33,14 +36,11 @@ debug _prev => _6; // in scope 3 at $DIR/issue-73223.rs:7:9: 7:14 let _13: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let _14: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let mut _28: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let mut _31: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL scope 4 { debug left_val => _13; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL debug right_val => _14; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let _20: core::panicking::AssertKind; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - scope 5 { - debug kind => _20; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - } + let mut _30: &core::panic::assert_info::BinaryAssertionStaticData; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL } } } @@ -81,14 +81,14 @@ StorageLive(_10); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _10 = &_1; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageLive(_11); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _28 = const main::promoted[0]; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _31 = const main::promoted[1]; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL // ty::Const // + ty: &i32 - // + val: Unevaluated(main, [], Some(promoted[0])) + // + val: Unevaluated(main, [], Some(promoted[1])) // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ issue_73223[2d0f]::main), const_param_did: None }, substs_: Some([]), promoted: Some(promoted[0]) }) } - _11 = _28; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + // + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ issue_73223[2d0f]::main), const_param_did: None }, substs_: Some([]), promoted: Some(promoted[1]) }) } + _11 = _31; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL (_9.0: &i32) = move _10; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL (_9.1: &i32) = move _11; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageDead(_11); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL @@ -113,36 +113,31 @@ bb3: { StorageLive(_20); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - discriminant(_20) = 0; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - StorageLive(_21); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - StorageLive(_22); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _22 = const core::panicking::AssertKind::Eq; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + StorageLive(_21); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + StorageLive(_22); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _30 = const main::promoted[0]; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL // ty::Const - // + ty: core::panicking::AssertKind - // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: core::panicking::AssertKind, val: Value(Scalar(0x00)) } - StorageLive(_23); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - StorageLive(_24); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _24 = _13; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _23 = _24; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - StorageLive(_25); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - StorageLive(_26); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _26 = _14; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _25 = _26; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - StorageLive(_27); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - discriminant(_27) = 0; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - core::panicking::assert_failed::(const core::panicking::AssertKind::Eq, move _23, move _25, move _27); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + // + ty: &core::panic::assert_info::BinaryAssertionStaticData + // + val: Unevaluated(main, [], Some(promoted[0])) // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: for<'r, 's, 't0> fn(core::panicking::AssertKind, &'r i32, &'s i32, std::option::Option>) -> ! {core::panicking::assert_failed::}, val: Value(Scalar()) } - // ty::Const - // + ty: core::panicking::AssertKind - // + val: Value(Scalar(0x00)) + // + literal: Const { ty: &core::panic::assert_info::BinaryAssertionStaticData, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ issue_73223[2d0f]::main), const_param_did: None }, substs_: Some([]), promoted: Some(promoted[0]) }) } + _22 = _30; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _21 = _22; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + StorageLive(_25); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + StorageLive(_26); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _26 = _13; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _25 = _26; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + StorageLive(_27); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + StorageLive(_28); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _28 = _14; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _27 = _28; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + StorageLive(_29); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + discriminant(_29) = 0; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + core::panicking::assert_failed::(move _21, move _25, move _27, move _29); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: core::panicking::AssertKind, val: Value(Scalar(0x00)) } + // + literal: Const { ty: for<'r, 's, 't0> fn(&'static core::panic::assert_info::BinaryAssertionStaticData, &'r i32, &'s i32, std::option::Option>) -> ! {core::panicking::assert_failed::}, val: Value(Scalar()) } } bb4: { diff --git a/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.64bit.diff b/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.64bit.diff index 946aab9c6e898..8abfbc6d307ef 100644 --- a/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.64bit.diff +++ b/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.64bit.diff @@ -19,13 +19,16 @@ let mut _17: i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _18: i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _19: !; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let _21: !; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let mut _22: core::panicking::AssertKind; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let mut _23: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let _24: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let _20: !; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let mut _21: &core::panic::assert_info::BinaryAssertionStaticData; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let _22: &core::panic::assert_info::BinaryAssertionStaticData; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let _23: core::panic::assert_info::BinaryAssertionStaticData; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let mut _24: core::panic::assert_info::BinaryAssertKind; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _25: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let _26: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let mut _27: std::option::Option; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let mut _27: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let _28: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let mut _29: std::option::Option; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL scope 1 { debug split => _1; // in scope 1 at $DIR/issue-73223.rs:2:9: 2:14 let _6: std::option::Option; // in scope 1 at $DIR/issue-73223.rs:7:9: 7:14 @@ -33,14 +36,11 @@ debug _prev => _6; // in scope 3 at $DIR/issue-73223.rs:7:9: 7:14 let _13: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let _14: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let mut _28: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let mut _31: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL scope 4 { debug left_val => _13; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL debug right_val => _14; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let _20: core::panicking::AssertKind; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - scope 5 { - debug kind => _20; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - } + let mut _30: &core::panic::assert_info::BinaryAssertionStaticData; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL } } } @@ -81,14 +81,14 @@ StorageLive(_10); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _10 = &_1; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageLive(_11); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _28 = const main::promoted[0]; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _31 = const main::promoted[1]; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL // ty::Const // + ty: &i32 - // + val: Unevaluated(main, [], Some(promoted[0])) + // + val: Unevaluated(main, [], Some(promoted[1])) // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ issue_73223[2d0f]::main), const_param_did: None }, substs_: Some([]), promoted: Some(promoted[0]) }) } - _11 = _28; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + // + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ issue_73223[2d0f]::main), const_param_did: None }, substs_: Some([]), promoted: Some(promoted[1]) }) } + _11 = _31; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL (_9.0: &i32) = move _10; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL (_9.1: &i32) = move _11; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageDead(_11); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL @@ -113,36 +113,31 @@ bb3: { StorageLive(_20); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - discriminant(_20) = 0; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - StorageLive(_21); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - StorageLive(_22); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _22 = const core::panicking::AssertKind::Eq; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + StorageLive(_21); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + StorageLive(_22); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _30 = const main::promoted[0]; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL // ty::Const - // + ty: core::panicking::AssertKind - // + val: Value(Scalar(0x00)) - // mir::Constant - // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: core::panicking::AssertKind, val: Value(Scalar(0x00)) } - StorageLive(_23); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - StorageLive(_24); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _24 = _13; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _23 = _24; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - StorageLive(_25); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - StorageLive(_26); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _26 = _14; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _25 = _26; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - StorageLive(_27); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - discriminant(_27) = 0; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - core::panicking::assert_failed::(const core::panicking::AssertKind::Eq, move _23, move _25, move _27); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + // + ty: &core::panic::assert_info::BinaryAssertionStaticData + // + val: Unevaluated(main, [], Some(promoted[0])) // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: for<'r, 's, 't0> fn(core::panicking::AssertKind, &'r i32, &'s i32, std::option::Option>) -> ! {core::panicking::assert_failed::}, val: Value(Scalar()) } - // ty::Const - // + ty: core::panicking::AssertKind - // + val: Value(Scalar(0x00)) + // + literal: Const { ty: &core::panic::assert_info::BinaryAssertionStaticData, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:3 ~ issue_73223[2d0f]::main), const_param_did: None }, substs_: Some([]), promoted: Some(promoted[0]) }) } + _22 = _30; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _21 = _22; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + StorageLive(_25); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + StorageLive(_26); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _26 = _13; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _25 = _26; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + StorageLive(_27); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + StorageLive(_28); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _28 = _14; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _27 = _28; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + StorageLive(_29); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + discriminant(_29) = 0; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + core::panicking::assert_failed::(move _21, move _25, move _27, move _29); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: core::panicking::AssertKind, val: Value(Scalar(0x00)) } + // + literal: Const { ty: for<'r, 's, 't0> fn(&'static core::panic::assert_info::BinaryAssertionStaticData, &'r i32, &'s i32, std::option::Option>) -> ! {core::panicking::assert_failed::}, val: Value(Scalar()) } } bb4: { diff --git a/src/test/mir-opt/retag.array_casts.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/retag.array_casts.SimplifyCfg-elaborate-drops.after.mir index ee99d033af320..146955b134754 100644 --- a/src/test/mir-opt/retag.array_casts.SimplifyCfg-elaborate-drops.after.mir +++ b/src/test/mir-opt/retag.array_casts.SimplifyCfg-elaborate-drops.after.mir @@ -23,13 +23,16 @@ fn array_casts() -> () { let mut _24: usize; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _25: usize; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _26: !; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let _28: !; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let mut _29: core::panicking::AssertKind; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let mut _30: &usize; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let _31: &usize; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let _27: !; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let mut _28: &core::panic::assert_info::BinaryAssertionStaticData; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let _29: &core::panic::assert_info::BinaryAssertionStaticData; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let _30: core::panic::assert_info::BinaryAssertionStaticData; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let mut _31: core::panic::assert_info::BinaryAssertKind; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let mut _32: &usize; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let _33: &usize; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let mut _34: std::option::Option; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let mut _34: &usize; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let _35: &usize; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let mut _36: std::option::Option; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL scope 1 { debug x => _1; // in scope 1 at $DIR/retag.rs:58:9: 58:14 let _2: *mut usize; // in scope 1 at $DIR/retag.rs:59:9: 59:10 @@ -45,16 +48,13 @@ fn array_casts() -> () { debug p => _9; // in scope 5 at $DIR/retag.rs:63:9: 63:10 let _20: &usize; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL let _21: &usize; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let mut _35: &usize; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + let mut _38: &usize; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL scope 6 { } scope 7 { debug left_val => _20; // in scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL debug right_val => _21; // in scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - let _27: core::panicking::AssertKind; // in scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - scope 8 { - debug kind => _27; // in scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - } + let mut _37: &core::panic::assert_info::BinaryAssertionStaticData; // in scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL } } } @@ -121,15 +121,15 @@ fn array_casts() -> () { _14 = &_15; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL Retag(_14); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageLive(_18); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _35 = const array_casts::promoted[0]; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _38 = const array_casts::promoted[1]; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL // ty::Const // + ty: &usize - // + val: Unevaluated(array_casts, [], Some(promoted[0])) + // + val: Unevaluated(array_casts, [], Some(promoted[1])) // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: &usize, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:15 ~ retag[13e7]::array_casts), const_param_did: None }, substs_: Some([]), promoted: Some(promoted[0]) }) } - Retag(_35); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _18 = &(*_35); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + // + literal: Const { ty: &usize, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:15 ~ retag[13e7]::array_casts), const_param_did: None }, substs_: Some([]), promoted: Some(promoted[1]) }) } + Retag(_38); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _18 = &(*_38); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL Retag(_18); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL _13 = (move _14, move _18); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL StorageDead(_18); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL @@ -156,28 +156,38 @@ fn array_casts() -> () { bb3: { StorageLive(_27); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _27 = core::panicking::AssertKind::Eq; // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - StorageLive(_28); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - StorageLive(_29); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _29 = move _27; // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - StorageLive(_30); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - StorageLive(_31); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _31 = &(*_20); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - Retag(_31); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _30 = &(*_31); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - Retag(_30); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - StorageLive(_32); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - StorageLive(_33); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _33 = &(*_21); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - Retag(_33); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _32 = &(*_33); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - Retag(_32); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - StorageLive(_34); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - _34 = Option::::None; // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL - core::panicking::assert_failed::(move _29, move _30, move _32, move _34); // scope 8 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + StorageLive(_28); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + StorageLive(_29); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _37 = const array_casts::promoted[0]; // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + // ty::Const + // + ty: &core::panic::assert_info::BinaryAssertionStaticData + // + val: Unevaluated(array_casts, [], Some(promoted[0])) + // mir::Constant + // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL + // + literal: Const { ty: &core::panic::assert_info::BinaryAssertionStaticData, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:15 ~ retag[13e7]::array_casts), const_param_did: None }, substs_: Some([]), promoted: Some(promoted[0]) }) } + Retag(_37); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _29 = &(*_37); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + Retag(_29); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _28 = &(*_29); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + Retag(_28); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + StorageLive(_32); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + StorageLive(_33); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _33 = &(*_20); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + Retag(_33); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _32 = &(*_33); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + Retag(_32); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + StorageLive(_34); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + StorageLive(_35); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _35 = &(*_21); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + Retag(_35); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _34 = &(*_35); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + Retag(_34); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + StorageLive(_36); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + _36 = Option::::None; // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + core::panicking::assert_failed::(move _28, move _32, move _34, move _36); // scope 7 at $SRC_DIR/core/src/macros/mod.rs:LL:COL // mir::Constant // + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL - // + literal: Const { ty: for<'r, 's, 't0> fn(core::panicking::AssertKind, &'r usize, &'s usize, std::option::Option>) -> ! {core::panicking::assert_failed::}, val: Value(Scalar()) } + // + literal: Const { ty: for<'r, 's, 't0> fn(&'static core::panic::assert_info::BinaryAssertionStaticData, &'r usize, &'s usize, std::option::Option>) -> ! {core::panicking::assert_failed::}, val: Value(Scalar()) } } bb4: { diff --git a/src/test/ui/associated-consts/defaults-cyclic-fail.stderr b/src/test/ui/associated-consts/defaults-cyclic-fail.stderr index 3fb4ab72fe6d6..616ac9053fd53 100644 --- a/src/test/ui/associated-consts/defaults-cyclic-fail.stderr +++ b/src/test/ui/associated-consts/defaults-cyclic-fail.stderr @@ -32,7 +32,7 @@ note: ...which requires const-evaluating + checking `Tr::B`... LL | const B: u8 = Self::A; | ^^^^^^^^^^^^^^^^^^^^^^ = note: ...which again requires normalizing `<() as Tr>::A`, completing the cycle -note: cycle used when const-evaluating + checking `main::promoted[1]` +note: cycle used when const-evaluating + checking `main::promoted[2]` --> $DIR/defaults-cyclic-fail.rs:14:1 | LL | fn main() {