mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
[mir-opt] Introduce a new flag to enable experimental/unsound mir opts
This commit is contained in:
parent
7f7a1cbfd3
commit
b9d0ea95c8
@ -31,9 +31,11 @@ pub struct CopyPropagation;
|
||||
|
||||
impl<'tcx> MirPass<'tcx> for CopyPropagation {
|
||||
fn run_pass(&self, tcx: TyCtxt<'tcx>, _source: MirSource<'tcx>, body: &mut Body<'tcx>) {
|
||||
let opts = &tcx.sess.opts.debugging_opts;
|
||||
// We only run when the MIR optimization level is > 1.
|
||||
// This avoids a slow pass, and messing up debug info.
|
||||
if tcx.sess.opts.debugging_opts.mir_opt_level <= 1 {
|
||||
// FIXME(76740): This optimization is buggy and can cause unsoundness.
|
||||
if opts.mir_opt_level <= 1 || !opts.unsound_mir_opts {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1115,6 +1115,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
|
||||
`hir,typed` (HIR with types for each node),
|
||||
`hir-tree` (dump the raw HIR),
|
||||
`mir` (the MIR), or `mir-cfg` (graphviz formatted MIR)"),
|
||||
unsound_mir_opts: bool = (false, parse_bool, [TRACKED],
|
||||
"enable unsound and buggy MIR optimizations (default: no)"),
|
||||
unstable_options: bool = (false, parse_bool, [UNTRACKED],
|
||||
"adds unstable command line options to rustc interface (default: no)"),
|
||||
use_ctors_section: Option<bool> = (None, parse_opt_bool, [TRACKED],
|
||||
|
@ -1,3 +1,4 @@
|
||||
// compile-flags: -Zunsound-mir-opts
|
||||
// EMIT_MIR copy_propagation.test.CopyPropagation.diff
|
||||
|
||||
fn test(x: u32) -> u32 {
|
||||
|
@ -2,19 +2,19 @@
|
||||
+ // MIR for `test` after CopyPropagation
|
||||
|
||||
fn test(_1: u32) -> u32 {
|
||||
debug x => _1; // in scope 0 at $DIR/copy_propagation.rs:3:9: 3:10
|
||||
let mut _0: u32; // return place in scope 0 at $DIR/copy_propagation.rs:3:20: 3:23
|
||||
let _2: u32; // in scope 0 at $DIR/copy_propagation.rs:4:9: 4:10
|
||||
debug x => _1; // in scope 0 at $DIR/copy_propagation.rs:4:9: 4:10
|
||||
let mut _0: u32; // return place in scope 0 at $DIR/copy_propagation.rs:4:20: 4:23
|
||||
let _2: u32; // in scope 0 at $DIR/copy_propagation.rs:5:9: 5:10
|
||||
scope 1 {
|
||||
debug y => _0; // in scope 1 at $DIR/copy_propagation.rs:4:9: 4:10
|
||||
debug y => _0; // in scope 1 at $DIR/copy_propagation.rs:5:9: 5:10
|
||||
}
|
||||
|
||||
bb0: {
|
||||
nop; // scope 0 at $DIR/copy_propagation.rs:4:9: 4:10
|
||||
_0 = _1; // scope 0 at $DIR/copy_propagation.rs:4:13: 4:14
|
||||
nop; // scope 1 at $DIR/copy_propagation.rs:5:5: 5:6
|
||||
nop; // scope 0 at $DIR/copy_propagation.rs:6:1: 6:2
|
||||
return; // scope 0 at $DIR/copy_propagation.rs:6:2: 6:2
|
||||
nop; // scope 0 at $DIR/copy_propagation.rs:5:9: 5:10
|
||||
_0 = _1; // scope 0 at $DIR/copy_propagation.rs:5:13: 5:14
|
||||
nop; // scope 1 at $DIR/copy_propagation.rs:6:5: 6:6
|
||||
nop; // scope 0 at $DIR/copy_propagation.rs:7:1: 7:2
|
||||
return; // scope 0 at $DIR/copy_propagation.rs:7:2: 7:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// ignore-tidy-linelength
|
||||
// compile-flags: -Z mir-opt-level=3
|
||||
// compile-flags: -Z mir-opt-level=3 -Zunsound-mir-opts
|
||||
|
||||
// example from #68867
|
||||
type CSSFloat = f32;
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: -Z span_free_formats
|
||||
// compile-flags: -Z span_free_formats -Zunsound-mir-opts
|
||||
|
||||
// Tests that MIR inliner works for any operand
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: -Z span_free_formats
|
||||
// compile-flags: -Z span_free_formats -Zunsound-mir-opts
|
||||
|
||||
// Tests that MIR inliner can handle closure arguments,
|
||||
// even when (#45894)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: -Z span_free_formats -Z mir-opt-level=3
|
||||
// compile-flags: -Z span_free_formats -Z mir-opt-level=3 -Zunsound-mir-opts
|
||||
|
||||
// EMIT_MIR inline_trait_method_2.test2.Inline.after.mir
|
||||
fn test2(x: &dyn X) -> bool {
|
||||
|
@ -3,61 +3,65 @@
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/issue-73223.rs:1:11: 1:11
|
||||
let mut _1: std::option::Option<i32>; // in scope 0 at $DIR/issue-73223.rs:2:23: 2:30
|
||||
let _2: i32; // in scope 0 at $DIR/issue-73223.rs:3:14: 3:15
|
||||
let mut _4: (&i32, &i32); // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _7: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _8: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _9: i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _10: &std::fmt::Arguments; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let _11: std::fmt::Arguments; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _12: &[std::fmt::ArgumentV1; 2]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let _13: [std::fmt::ArgumentV1; 2]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _14: (&&i32, &&i32); // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let _15: &i32; // 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 mut _17: std::fmt::ArgumentV1; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _18: std::fmt::ArgumentV1; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let _1: i32; // in scope 0 at $DIR/issue-73223.rs:2:9: 2:14
|
||||
let mut _2: std::option::Option<i32>; // in scope 0 at $DIR/issue-73223.rs:2:23: 2:30
|
||||
let _3: i32; // in scope 0 at $DIR/issue-73223.rs:3:14: 3:15
|
||||
let mut _5: (&i32, &i32); // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _6: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _9: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _10: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _11: i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _12: &std::fmt::Arguments; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let _13: std::fmt::Arguments; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _14: &[&str; 3]; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _15: &[std::fmt::ArgumentV1; 2]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let _16: [std::fmt::ArgumentV1; 2]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _17: (&&i32, &&i32); // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let _18: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _19: &&i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let _20: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _21: std::fmt::ArgumentV1; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _22: std::fmt::ArgumentV1; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
scope 1 {
|
||||
debug split => _2; // in scope 1 at $DIR/issue-73223.rs:2:9: 2:14
|
||||
let _3: std::option::Option<i32>; // in scope 1 at $DIR/issue-73223.rs:7:9: 7:14
|
||||
debug split => _1; // in scope 1 at $DIR/issue-73223.rs:2:9: 2:14
|
||||
let _4: std::option::Option<i32>; // in scope 1 at $DIR/issue-73223.rs:7:9: 7:14
|
||||
scope 3 {
|
||||
debug _prev => _3; // in scope 3 at $DIR/issue-73223.rs:7:9: 7:14
|
||||
let _5: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let _6: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
debug _prev => _4; // in scope 3 at $DIR/issue-73223.rs:7:9: 7:14
|
||||
let _7: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let _8: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
scope 4 {
|
||||
debug left_val => _5; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
debug right_val => _6; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
debug left_val => _7; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
debug right_val => _8; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
scope 5 {
|
||||
debug arg0 => _21; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
debug arg1 => _24; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
debug arg0 => _25; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
debug arg1 => _28; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
scope 6 {
|
||||
debug x => _21; // in scope 6 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
debug f => _20; // in scope 6 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
let mut _19: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _20: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _21: &&i32; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
debug x => _25; // in scope 6 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
debug f => _24; // in scope 6 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
let mut _23: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _24: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _25: &&i32; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
}
|
||||
scope 8 {
|
||||
debug x => _24; // in scope 8 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
debug f => _23; // in scope 8 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
let mut _22: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _23: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _24: &&i32; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
debug x => _28; // in scope 8 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
debug f => _27; // in scope 8 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
let mut _26: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _27: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _28: &&i32; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
}
|
||||
}
|
||||
scope 10 {
|
||||
debug pieces => _25; // in scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
debug args => _27; // in scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
let mut _25: &[&str]; // in scope 10 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _26: std::option::Option<&[std::fmt::rt::v1::Argument]>; // in scope 10 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _27: &[std::fmt::ArgumentV1]; // in scope 10 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
debug pieces => _29; // in scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
debug args => _31; // in scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
let mut _29: &[&str]; // in scope 10 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _30: std::option::Option<&[std::fmt::rt::v1::Argument]>; // in scope 10 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _31: &[std::fmt::ArgumentV1]; // in scope 10 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
scope 2 {
|
||||
debug v => _2; // in scope 2 at $DIR/issue-73223.rs:3:14: 3:15
|
||||
debug v => _3; // in scope 2 at $DIR/issue-73223.rs:3:14: 3:15
|
||||
}
|
||||
scope 7 {
|
||||
}
|
||||
@ -65,114 +69,125 @@
|
||||
}
|
||||
|
||||
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
|
||||
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
|
||||
((_3 as Some).0: i32) = _2; // scope 1 at $DIR/issue-73223.rs:7:22: 7:27
|
||||
discriminant(_3) = 1; // scope 1 at $DIR/issue-73223.rs:7:17: 7:28
|
||||
(_4.0: &i32) = &_2; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
(_4.1: &i32) = const main::promoted[1]; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
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
|
||||
discriminant(_2) = 1; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
|
||||
StorageLive(_3); // scope 0 at $DIR/issue-73223.rs:3:14: 3:15
|
||||
_3 = ((_2 as Some).0: i32); // scope 0 at $DIR/issue-73223.rs:3:14: 3:15
|
||||
_1 = _3; // scope 2 at $DIR/issue-73223.rs:3:20: 3:21
|
||||
StorageDead(_3); // scope 0 at $DIR/issue-73223.rs:3:20: 3:21
|
||||
StorageDead(_2); // scope 0 at $DIR/issue-73223.rs:5:6: 5:7
|
||||
((_4 as Some).0: i32) = _1; // scope 1 at $DIR/issue-73223.rs:7:22: 7:27
|
||||
discriminant(_4) = 1; // scope 1 at $DIR/issue-73223.rs:7:17: 7:28
|
||||
(_5.0: &i32) = &_1; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_6 = const main::promoted[1]; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// ty::Const
|
||||
// + ty: &i32
|
||||
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[1]))
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[1])) }
|
||||
StorageLive(_5); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_5 = (_4.0: &i32); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_6 = (_4.1: &i32); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_7); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_8); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
(_5.1: &i32) = move _6; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_7); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_7 = (_5.0: &i32); // 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
|
||||
_8 = (_5.1: &i32); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_9); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_9 = (*_5); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_8 = Eq(move _9, const 1_i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageDead(_9); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_7 = Not(move _8); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageDead(_8); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
switchInt(_7) -> [false: bb1, otherwise: bb2]; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_10); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
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
|
||||
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
|
||||
switchInt(_9) -> [false: bb1, otherwise: bb2]; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageDead(_7); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageDead(_5); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageDead(_9); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageDead(_8); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageDead(_7); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_0 = const (); // scope 0 at $DIR/issue-73223.rs:1:11: 9:2
|
||||
StorageDead(_1); // scope 0 at $DIR/issue-73223.rs:9:1: 9:2
|
||||
return; // scope 0 at $DIR/issue-73223.rs:9:2: 9:2
|
||||
}
|
||||
|
||||
bb2: {
|
||||
StorageLive(_11); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_25 = const main::promoted[0] as &[&str] (Pointer(Unsize)); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_13); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_14 = const main::promoted[0]; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// ty::Const
|
||||
// + ty: &[&str; 3]
|
||||
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[0]))
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// + literal: Const { ty: &[&str; 3], val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[0])) }
|
||||
StorageLive(_13); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageLive(_15); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_15 = _5; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
(_14.0: &&i32) = &_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
|
||||
_16 = &_6; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
(_14.1: &&i32) = move _16; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageDead(_16); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_21 = (_14.0: &&i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_24 = (_14.1: &&i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_20 = <&i32 as Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_29 = move _14 as &[&str] (Pointer(Unsize)); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_16); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageLive(_18); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_18 = _7; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
(_17.0: &&i32) = &_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
|
||||
StorageLive(_20); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_20 = _8; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_19 = &_20; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
(_17.1: &&i32) = move _19; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageDead(_19); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_25 = (_17.0: &&i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_28 = (_17.1: &&i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_24 = <&i32 as Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 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(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<&i32 as std::fmt::Debug>::fmt}, val: Value(Scalar(<ZST>)) }
|
||||
StorageLive(_19); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_19 = transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _20) -> bb3; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageLive(_23); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_23 = transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _24) -> bb3; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
// + literal: Const { ty: unsafe extern "rust-intrinsic" fn(for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {std::intrinsics::transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>}, val: Value(Scalar(<ZST>)) }
|
||||
}
|
||||
|
||||
bb3: {
|
||||
(_17.0: &core::fmt::Opaque) = transmute::<&&i32, &core::fmt::Opaque>(move _21) -> bb4; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_21.0: &core::fmt::Opaque) = transmute::<&&i32, &core::fmt::Opaque>(move _25) -> bb4; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
// + literal: Const { ty: unsafe extern "rust-intrinsic" fn(&&i32) -> &core::fmt::Opaque {std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>}, val: Value(Scalar(<ZST>)) }
|
||||
}
|
||||
|
||||
bb4: {
|
||||
(_17.1: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) = move _19; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_19); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_23 = <&i32 as Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
(_21.1: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) = move _23; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_23); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_27 = <&i32 as Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 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(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<&i32 as std::fmt::Debug>::fmt}, val: Value(Scalar(<ZST>)) }
|
||||
StorageLive(_22); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_22 = transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _23) -> bb5; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageLive(_26); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_26 = transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _27) -> bb5; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
// + literal: Const { ty: unsafe extern "rust-intrinsic" fn(for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {std::intrinsics::transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>}, val: Value(Scalar(<ZST>)) }
|
||||
}
|
||||
|
||||
bb5: {
|
||||
(_18.0: &core::fmt::Opaque) = transmute::<&&i32, &core::fmt::Opaque>(move _24) -> bb6; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_22.0: &core::fmt::Opaque) = transmute::<&&i32, &core::fmt::Opaque>(move _28) -> bb6; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
// + literal: Const { ty: unsafe extern "rust-intrinsic" fn(&&i32) -> &core::fmt::Opaque {std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>}, val: Value(Scalar(<ZST>)) }
|
||||
}
|
||||
|
||||
bb6: {
|
||||
(_18.1: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) = move _22; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_22); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_13 = [move _17, move _18]; // scope 5 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
(_22.1: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) = move _26; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_26); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_16 = [move _21, move _22]; // scope 5 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_15 = &_16; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_31 = move _15 as &[std::fmt::ArgumentV1] (Pointer(Unsize)); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageLive(_30); // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
discriminant(_30) = 0; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_13.0: &[&str]) = move _29; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_13.1: std::option::Option<&[std::fmt::rt::v1::Argument]>) = move _30; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_13.2: &[std::fmt::ArgumentV1]) = move _31; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_30); // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_12 = &_13; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_27 = move _12 as &[std::fmt::ArgumentV1] (Pointer(Unsize)); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageLive(_26); // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
discriminant(_26) = 0; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_11.0: &[&str]) = move _25; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_11.1: std::option::Option<&[std::fmt::rt::v1::Argument]>) = move _26; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_11.2: &[std::fmt::ArgumentV1]) = move _27; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_26); // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_10 = &_11; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
begin_panic_fmt(move _10); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
begin_panic_fmt(move _12); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
// + literal: Const { ty: for<'r, 's> fn(&'r std::fmt::Arguments<'s>) -> ! {std::rt::begin_panic_fmt}, val: Value(Scalar(<ZST>)) }
|
||||
|
@ -3,61 +3,65 @@
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/issue-73223.rs:1:11: 1:11
|
||||
let mut _1: std::option::Option<i32>; // in scope 0 at $DIR/issue-73223.rs:2:23: 2:30
|
||||
let _2: i32; // in scope 0 at $DIR/issue-73223.rs:3:14: 3:15
|
||||
let mut _4: (&i32, &i32); // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _7: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _8: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _9: i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _10: &std::fmt::Arguments; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let _11: std::fmt::Arguments; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _12: &[std::fmt::ArgumentV1; 2]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let _13: [std::fmt::ArgumentV1; 2]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _14: (&&i32, &&i32); // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let _15: &i32; // 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 mut _17: std::fmt::ArgumentV1; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _18: std::fmt::ArgumentV1; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let _1: i32; // in scope 0 at $DIR/issue-73223.rs:2:9: 2:14
|
||||
let mut _2: std::option::Option<i32>; // in scope 0 at $DIR/issue-73223.rs:2:23: 2:30
|
||||
let _3: i32; // in scope 0 at $DIR/issue-73223.rs:3:14: 3:15
|
||||
let mut _5: (&i32, &i32); // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _6: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _9: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _10: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _11: i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _12: &std::fmt::Arguments; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let _13: std::fmt::Arguments; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _14: &[&str; 3]; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _15: &[std::fmt::ArgumentV1; 2]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let _16: [std::fmt::ArgumentV1; 2]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _17: (&&i32, &&i32); // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let _18: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _19: &&i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let _20: &i32; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let mut _21: std::fmt::ArgumentV1; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _22: std::fmt::ArgumentV1; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
scope 1 {
|
||||
debug split => _2; // in scope 1 at $DIR/issue-73223.rs:2:9: 2:14
|
||||
let _3: std::option::Option<i32>; // in scope 1 at $DIR/issue-73223.rs:7:9: 7:14
|
||||
debug split => _1; // in scope 1 at $DIR/issue-73223.rs:2:9: 2:14
|
||||
let _4: std::option::Option<i32>; // in scope 1 at $DIR/issue-73223.rs:7:9: 7:14
|
||||
scope 3 {
|
||||
debug _prev => _3; // in scope 3 at $DIR/issue-73223.rs:7:9: 7:14
|
||||
let _5: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let _6: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
debug _prev => _4; // in scope 3 at $DIR/issue-73223.rs:7:9: 7:14
|
||||
let _7: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
let _8: &i32; // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
scope 4 {
|
||||
debug left_val => _5; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
debug right_val => _6; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
debug left_val => _7; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
debug right_val => _8; // in scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
scope 5 {
|
||||
debug arg0 => _21; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
debug arg1 => _24; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
debug arg0 => _25; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
debug arg1 => _28; // in scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
scope 6 {
|
||||
debug x => _21; // in scope 6 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
debug f => _20; // in scope 6 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
let mut _19: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _20: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _21: &&i32; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
debug x => _25; // in scope 6 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
debug f => _24; // in scope 6 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
let mut _23: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _24: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _25: &&i32; // in scope 6 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
}
|
||||
scope 8 {
|
||||
debug x => _24; // in scope 8 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
debug f => _23; // in scope 8 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
let mut _22: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _23: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _24: &&i32; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
debug x => _28; // in scope 8 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
debug f => _27; // in scope 8 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
let mut _26: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _27: for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _28: &&i32; // in scope 8 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
}
|
||||
}
|
||||
scope 10 {
|
||||
debug pieces => _25; // in scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
debug args => _27; // in scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
let mut _25: &[&str]; // in scope 10 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _26: std::option::Option<&[std::fmt::rt::v1::Argument]>; // in scope 10 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _27: &[std::fmt::ArgumentV1]; // in scope 10 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
debug pieces => _29; // in scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
debug args => _31; // in scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
let mut _29: &[&str]; // in scope 10 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _30: std::option::Option<&[std::fmt::rt::v1::Argument]>; // in scope 10 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
let mut _31: &[std::fmt::ArgumentV1]; // in scope 10 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
scope 2 {
|
||||
debug v => _2; // in scope 2 at $DIR/issue-73223.rs:3:14: 3:15
|
||||
debug v => _3; // in scope 2 at $DIR/issue-73223.rs:3:14: 3:15
|
||||
}
|
||||
scope 7 {
|
||||
}
|
||||
@ -65,114 +69,125 @@
|
||||
}
|
||||
|
||||
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
|
||||
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
|
||||
((_3 as Some).0: i32) = _2; // scope 1 at $DIR/issue-73223.rs:7:22: 7:27
|
||||
discriminant(_3) = 1; // scope 1 at $DIR/issue-73223.rs:7:17: 7:28
|
||||
(_4.0: &i32) = &_2; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
(_4.1: &i32) = const main::promoted[1]; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
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
|
||||
discriminant(_2) = 1; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
|
||||
StorageLive(_3); // scope 0 at $DIR/issue-73223.rs:3:14: 3:15
|
||||
_3 = ((_2 as Some).0: i32); // scope 0 at $DIR/issue-73223.rs:3:14: 3:15
|
||||
_1 = _3; // scope 2 at $DIR/issue-73223.rs:3:20: 3:21
|
||||
StorageDead(_3); // scope 0 at $DIR/issue-73223.rs:3:20: 3:21
|
||||
StorageDead(_2); // scope 0 at $DIR/issue-73223.rs:5:6: 5:7
|
||||
((_4 as Some).0: i32) = _1; // scope 1 at $DIR/issue-73223.rs:7:22: 7:27
|
||||
discriminant(_4) = 1; // scope 1 at $DIR/issue-73223.rs:7:17: 7:28
|
||||
(_5.0: &i32) = &_1; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_6 = const main::promoted[1]; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// ty::Const
|
||||
// + ty: &i32
|
||||
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[1]))
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// + literal: Const { ty: &i32, val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[1])) }
|
||||
StorageLive(_5); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_5 = (_4.0: &i32); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_6 = (_4.1: &i32); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_7); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_8); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
(_5.1: &i32) = move _6; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_7); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_7 = (_5.0: &i32); // 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
|
||||
_8 = (_5.1: &i32); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_9); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_9 = (*_5); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_8 = Eq(move _9, const 1_i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageDead(_9); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_7 = Not(move _8); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageDead(_8); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
switchInt(_7) -> [false: bb1, otherwise: bb2]; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_10); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
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
|
||||
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
|
||||
switchInt(_9) -> [false: bb1, otherwise: bb2]; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageDead(_7); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageDead(_5); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageDead(_9); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageDead(_8); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageDead(_7); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_0 = const (); // scope 0 at $DIR/issue-73223.rs:1:11: 9:2
|
||||
StorageDead(_1); // scope 0 at $DIR/issue-73223.rs:9:1: 9:2
|
||||
return; // scope 0 at $DIR/issue-73223.rs:9:2: 9:2
|
||||
}
|
||||
|
||||
bb2: {
|
||||
StorageLive(_11); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_25 = const main::promoted[0] as &[&str] (Pointer(Unsize)); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_13); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_14 = const main::promoted[0]; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// ty::Const
|
||||
// + ty: &[&str; 3]
|
||||
// + val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[0]))
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
// + literal: Const { ty: &[&str; 3], val: Unevaluated(WithOptConstParam { did: DefId(0:3 ~ issue_73223[317d]::main), const_param_did: None }, [], Some(promoted[0])) }
|
||||
StorageLive(_13); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageLive(_15); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_15 = _5; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
(_14.0: &&i32) = &_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
|
||||
_16 = &_6; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
(_14.1: &&i32) = move _16; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageDead(_16); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_21 = (_14.0: &&i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_24 = (_14.1: &&i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_20 = <&i32 as Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_29 = move _14 as &[&str] (Pointer(Unsize)); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
StorageLive(_16); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageLive(_18); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_18 = _7; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
(_17.0: &&i32) = &_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
|
||||
StorageLive(_20); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_20 = _8; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_19 = &_20; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
(_17.1: &&i32) = move _19; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageDead(_19); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_25 = (_17.0: &&i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_28 = (_17.1: &&i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
_24 = <&i32 as Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 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(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<&i32 as std::fmt::Debug>::fmt}, val: Value(Scalar(<ZST>)) }
|
||||
StorageLive(_19); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_19 = transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _20) -> bb3; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageLive(_23); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_23 = transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _24) -> bb3; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
// + literal: Const { ty: unsafe extern "rust-intrinsic" fn(for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {std::intrinsics::transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>}, val: Value(Scalar(<ZST>)) }
|
||||
}
|
||||
|
||||
bb3: {
|
||||
(_17.0: &core::fmt::Opaque) = transmute::<&&i32, &core::fmt::Opaque>(move _21) -> bb4; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_21.0: &core::fmt::Opaque) = transmute::<&&i32, &core::fmt::Opaque>(move _25) -> bb4; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
// + literal: Const { ty: unsafe extern "rust-intrinsic" fn(&&i32) -> &core::fmt::Opaque {std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>}, val: Value(Scalar(<ZST>)) }
|
||||
}
|
||||
|
||||
bb4: {
|
||||
(_17.1: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) = move _19; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_19); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_23 = <&i32 as Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
(_21.1: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) = move _23; // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_23); // scope 7 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_27 = <&i32 as Debug>::fmt as for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)); // scope 5 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(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<&i32 as std::fmt::Debug>::fmt}, val: Value(Scalar(<ZST>)) }
|
||||
StorageLive(_22); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_22 = transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _23) -> bb5; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageLive(_26); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_26 = transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>(move _27) -> bb5; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
// + literal: Const { ty: unsafe extern "rust-intrinsic" fn(for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {std::intrinsics::transmute::<for<'r, 's, 't0> fn(&'r &i32, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>>}, val: Value(Scalar(<ZST>)) }
|
||||
}
|
||||
|
||||
bb5: {
|
||||
(_18.0: &core::fmt::Opaque) = transmute::<&&i32, &core::fmt::Opaque>(move _24) -> bb6; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_22.0: &core::fmt::Opaque) = transmute::<&&i32, &core::fmt::Opaque>(move _28) -> bb6; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
// + literal: Const { ty: unsafe extern "rust-intrinsic" fn(&&i32) -> &core::fmt::Opaque {std::intrinsics::transmute::<&&i32, &core::fmt::Opaque>}, val: Value(Scalar(<ZST>)) }
|
||||
}
|
||||
|
||||
bb6: {
|
||||
(_18.1: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) = move _22; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_22); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_13 = [move _17, move _18]; // scope 5 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
(_22.1: for<'r, 's, 't0> fn(&'r core::fmt::Opaque, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) = move _26; // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_26); // scope 9 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_16 = [move _21, move _22]; // scope 5 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_15 = &_16; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_31 = move _15 as &[std::fmt::ArgumentV1] (Pointer(Unsize)); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageLive(_30); // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
discriminant(_30) = 0; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_13.0: &[&str]) = move _29; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_13.1: std::option::Option<&[std::fmt::rt::v1::Argument]>) = move _30; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_13.2: &[std::fmt::ArgumentV1]) = move _31; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_30); // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_12 = &_13; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
_27 = move _12 as &[std::fmt::ArgumentV1] (Pointer(Unsize)); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
StorageLive(_26); // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
discriminant(_26) = 0; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_11.0: &[&str]) = move _25; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_11.1: std::option::Option<&[std::fmt::rt::v1::Argument]>) = move _26; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
(_11.2: &[std::fmt::ArgumentV1]) = move _27; // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
StorageDead(_26); // scope 10 at $SRC_DIR/core/src/fmt/mod.rs:LL:COL
|
||||
_10 = &_11; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
begin_panic_fmt(move _10); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
begin_panic_fmt(move _12); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
// mir::Constant
|
||||
// + span: $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
// + literal: Const { ty: for<'r, 's> fn(&'r std::fmt::Arguments<'s>) -> ! {std::rt::begin_panic_fmt}, val: Value(Scalar(<ZST>)) }
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: -Zmir-opt-level=1
|
||||
// compile-flags: -Zmir-opt-level=1 -Zunsound-mir-opts
|
||||
|
||||
// EMIT_MIR nrvo_simple.nrvo.RenameReturnPlace.diff
|
||||
fn nrvo(init: fn(&mut [u8; 1024])) -> [u8; 1024] {
|
||||
|
@ -1,3 +1,5 @@
|
||||
// compile-flags: -Zunsound-mir-opts
|
||||
|
||||
fn map(x: Option<Box<()>>) -> Option<Box<()>> {
|
||||
match x {
|
||||
None => None,
|
||||
|
@ -2,25 +2,25 @@
|
||||
+ // MIR for `map` after SimplifyLocals
|
||||
|
||||
fn map(_1: Option<Box<()>>) -> Option<Box<()>> {
|
||||
debug x => _1; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:1:8: 1:9
|
||||
let mut _0: std::option::Option<std::boxed::Box<()>>; // return place in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:1:31: 1:46
|
||||
- let mut _2: isize; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13
|
||||
- let _3: std::boxed::Box<()>; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:4:14: 4:15
|
||||
- let mut _4: std::boxed::Box<()>; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:4:25: 4:26
|
||||
- let mut _5: bool; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:1: 6:2
|
||||
- let mut _6: isize; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:1: 6:2
|
||||
- let mut _7: isize; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:1: 6:2
|
||||
debug x => _1; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:8: 3:9
|
||||
let mut _0: std::option::Option<std::boxed::Box<()>>; // return place in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:31: 3:46
|
||||
- let mut _2: isize; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:5:9: 5:13
|
||||
- let _3: std::boxed::Box<()>; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:14: 6:15
|
||||
- let mut _4: std::boxed::Box<()>; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:25: 6:26
|
||||
- let mut _5: bool; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:8:1: 8:2
|
||||
- let mut _6: isize; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:8:1: 8:2
|
||||
- let mut _7: isize; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:8:1: 8:2
|
||||
scope 1 {
|
||||
debug x => ((_0 as Some).0: std::boxed::Box<()>); // in scope 1 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:4:14: 4:15
|
||||
debug x => ((_0 as Some).0: std::boxed::Box<()>); // in scope 1 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:14: 6:15
|
||||
}
|
||||
|
||||
bb0: {
|
||||
- _5 = const false; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13
|
||||
- _5 = const true; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13
|
||||
- _2 = discriminant(_1); // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13
|
||||
_0 = move _1; // scope 1 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:4:20: 4:27
|
||||
- _6 = discriminant(_1); // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:1: 6:2
|
||||
return; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:2: 6:2
|
||||
- _5 = const false; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:5:9: 5:13
|
||||
- _5 = const true; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:5:9: 5:13
|
||||
- _2 = discriminant(_1); // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:5:9: 5:13
|
||||
_0 = move _1; // scope 1 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:20: 6:27
|
||||
- _6 = discriminant(_1); // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:8:1: 8:2
|
||||
return; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:8:2: 8:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,25 +2,25 @@
|
||||
+ // MIR for `map` after SimplifyLocals
|
||||
|
||||
fn map(_1: Option<Box<()>>) -> Option<Box<()>> {
|
||||
debug x => _1; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:1:8: 1:9
|
||||
let mut _0: std::option::Option<std::boxed::Box<()>>; // return place in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:1:31: 1:46
|
||||
- let mut _2: isize; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13
|
||||
- let _3: std::boxed::Box<()>; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:4:14: 4:15
|
||||
- let mut _4: std::boxed::Box<()>; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:4:25: 4:26
|
||||
- let mut _5: bool; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:1: 6:2
|
||||
- let mut _6: isize; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:1: 6:2
|
||||
- let mut _7: isize; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:1: 6:2
|
||||
debug x => _1; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:8: 3:9
|
||||
let mut _0: std::option::Option<std::boxed::Box<()>>; // return place in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:31: 3:46
|
||||
- let mut _2: isize; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:5:9: 5:13
|
||||
- let _3: std::boxed::Box<()>; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:14: 6:15
|
||||
- let mut _4: std::boxed::Box<()>; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:25: 6:26
|
||||
- let mut _5: bool; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:8:1: 8:2
|
||||
- let mut _6: isize; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:8:1: 8:2
|
||||
- let mut _7: isize; // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:8:1: 8:2
|
||||
scope 1 {
|
||||
debug x => ((_0 as Some).0: std::boxed::Box<()>); // in scope 1 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:4:14: 4:15
|
||||
debug x => ((_0 as Some).0: std::boxed::Box<()>); // in scope 1 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:14: 6:15
|
||||
}
|
||||
|
||||
bb0: {
|
||||
- _5 = const false; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13
|
||||
- _5 = const true; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13
|
||||
- _2 = discriminant(_1); // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:3:9: 3:13
|
||||
_0 = move _1; // scope 1 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:4:20: 4:27
|
||||
- _6 = discriminant(_1); // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:1: 6:2
|
||||
return; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:2: 6:2
|
||||
- _5 = const false; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:5:9: 5:13
|
||||
- _5 = const true; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:5:9: 5:13
|
||||
- _2 = discriminant(_1); // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:5:9: 5:13
|
||||
_0 = move _1; // scope 1 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:6:20: 6:27
|
||||
- _6 = discriminant(_1); // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:8:1: 8:2
|
||||
return; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:8:2: 8:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// compile-flags: -Zunsound-mir-opts
|
||||
// EMIT_MIR simplify_try.try_identity.SimplifyArmIdentity.diff
|
||||
// EMIT_MIR simplify_try.try_identity.SimplifyBranchSame.after.mir
|
||||
// EMIT_MIR simplify_try.try_identity.SimplifyLocals.after.mir
|
||||
|
@ -2,35 +2,35 @@
|
||||
+ // MIR for `try_identity` after DestinationPropagation
|
||||
|
||||
fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i32> {
|
||||
debug x => _1; // in scope 0 at $DIR/simplify_try.rs:6:17: 6:18
|
||||
let mut _0: std::result::Result<u32, i32>; // return place in scope 0 at $DIR/simplify_try.rs:6:41: 6:57
|
||||
let _2: u32; // in scope 0 at $DIR/simplify_try.rs:7:9: 7:10
|
||||
let mut _3: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:7:13: 7:15
|
||||
let mut _4: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:7:13: 7:14
|
||||
let mut _5: isize; // in scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
let _6: i32; // in scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
let mut _7: !; // in scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
let mut _8: i32; // in scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
let mut _9: i32; // in scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
let _10: u32; // in scope 0 at $DIR/simplify_try.rs:7:13: 7:15
|
||||
let mut _11: u32; // in scope 0 at $DIR/simplify_try.rs:8:8: 8:9
|
||||
debug x => _1; // in scope 0 at $DIR/simplify_try.rs:7:17: 7:18
|
||||
let mut _0: std::result::Result<u32, i32>; // return place in scope 0 at $DIR/simplify_try.rs:7:41: 7:57
|
||||
let _2: u32; // in scope 0 at $DIR/simplify_try.rs:8:9: 8:10
|
||||
let mut _3: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:8:13: 8:15
|
||||
let mut _4: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:8:13: 8:14
|
||||
let mut _5: isize; // in scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
let _6: i32; // in scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
let mut _7: !; // in scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
let mut _8: i32; // in scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
let mut _9: i32; // in scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
let _10: u32; // in scope 0 at $DIR/simplify_try.rs:8:13: 8:15
|
||||
let mut _11: u32; // in scope 0 at $DIR/simplify_try.rs:9:8: 9:9
|
||||
scope 1 {
|
||||
debug y => ((_0 as Ok).0: u32); // in scope 1 at $DIR/simplify_try.rs:7:9: 7:10
|
||||
debug y => ((_0 as Ok).0: u32); // in scope 1 at $DIR/simplify_try.rs:8:9: 8:10
|
||||
}
|
||||
scope 2 {
|
||||
debug err => ((_0 as Err).0: i32); // in scope 2 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
debug err => ((_0 as Err).0: i32); // in scope 2 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
scope 3 {
|
||||
scope 7 {
|
||||
debug t => ((_0 as Err).0: i32); // in scope 7 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
|
||||
}
|
||||
scope 8 {
|
||||
debug v => ((_0 as Err).0: i32); // in scope 8 at $SRC_DIR/core/src/result.rs:LL:COL
|
||||
let mut _12: i32; // in scope 8 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
let mut _12: i32; // in scope 8 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
}
|
||||
}
|
||||
}
|
||||
scope 4 {
|
||||
debug val => ((_0 as Ok).0: u32); // in scope 4 at $DIR/simplify_try.rs:7:13: 7:15
|
||||
debug val => ((_0 as Ok).0: u32); // in scope 4 at $DIR/simplify_try.rs:8:13: 8:15
|
||||
scope 5 {
|
||||
}
|
||||
}
|
||||
@ -40,33 +40,33 @@
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_2); // scope 0 at $DIR/simplify_try.rs:7:9: 7:10
|
||||
- StorageLive(_3); // scope 0 at $DIR/simplify_try.rs:7:13: 7:15
|
||||
- StorageLive(_4); // scope 0 at $DIR/simplify_try.rs:7:13: 7:14
|
||||
- _4 = _1; // scope 0 at $DIR/simplify_try.rs:7:13: 7:14
|
||||
StorageLive(_2); // scope 0 at $DIR/simplify_try.rs:8:9: 8:10
|
||||
- StorageLive(_3); // scope 0 at $DIR/simplify_try.rs:8:13: 8:15
|
||||
- StorageLive(_4); // scope 0 at $DIR/simplify_try.rs:8:13: 8:14
|
||||
- _4 = _1; // scope 0 at $DIR/simplify_try.rs:8:13: 8:14
|
||||
- _3 = move _4; // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL
|
||||
- StorageDead(_4); // scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
- _5 = discriminant(_3); // scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
+ nop; // scope 0 at $DIR/simplify_try.rs:7:13: 7:15
|
||||
+ nop; // scope 0 at $DIR/simplify_try.rs:7:13: 7:14
|
||||
+ _0 = _1; // scope 0 at $DIR/simplify_try.rs:7:13: 7:14
|
||||
- StorageDead(_4); // scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
- _5 = discriminant(_3); // scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
+ nop; // scope 0 at $DIR/simplify_try.rs:8:13: 8:15
|
||||
+ nop; // scope 0 at $DIR/simplify_try.rs:8:13: 8:14
|
||||
+ _0 = _1; // scope 0 at $DIR/simplify_try.rs:8:13: 8:14
|
||||
+ nop; // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL
|
||||
+ nop; // scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
+ _5 = discriminant(_0); // scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
goto -> bb1; // scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
+ nop; // scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
+ _5 = discriminant(_0); // scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
goto -> bb1; // scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
}
|
||||
|
||||
bb1: {
|
||||
- _0 = move _3; // scope 1 at $DIR/simplify_try.rs:8:5: 8:10
|
||||
- StorageDead(_3); // scope 0 at $DIR/simplify_try.rs:7:15: 7:16
|
||||
+ nop; // scope 1 at $DIR/simplify_try.rs:8:5: 8:10
|
||||
+ nop; // scope 0 at $DIR/simplify_try.rs:7:15: 7:16
|
||||
StorageDead(_2); // scope 0 at $DIR/simplify_try.rs:9:1: 9:2
|
||||
goto -> bb2; // scope 0 at $DIR/simplify_try.rs:9:2: 9:2
|
||||
- _0 = move _3; // scope 1 at $DIR/simplify_try.rs:9:5: 9:10
|
||||
- StorageDead(_3); // scope 0 at $DIR/simplify_try.rs:8:15: 8:16
|
||||
+ nop; // scope 1 at $DIR/simplify_try.rs:9:5: 9:10
|
||||
+ nop; // scope 0 at $DIR/simplify_try.rs:8:15: 8:16
|
||||
StorageDead(_2); // scope 0 at $DIR/simplify_try.rs:10:1: 10:2
|
||||
goto -> bb2; // scope 0 at $DIR/simplify_try.rs:10:2: 10:2
|
||||
}
|
||||
|
||||
bb2: {
|
||||
return; // scope 0 at $DIR/simplify_try.rs:9:2: 9:2
|
||||
return; // scope 0 at $DIR/simplify_try.rs:10:2: 10:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,25 +2,25 @@
|
||||
+ // MIR for `try_identity` after SimplifyArmIdentity
|
||||
|
||||
fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i32> {
|
||||
debug x => _1; // in scope 0 at $DIR/simplify_try.rs:6:17: 6:18
|
||||
let mut _0: std::result::Result<u32, i32>; // return place in scope 0 at $DIR/simplify_try.rs:6:41: 6:57
|
||||
let _2: u32; // in scope 0 at $DIR/simplify_try.rs:7:9: 7:10
|
||||
let mut _3: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:7:13: 7:15
|
||||
let mut _4: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:7:13: 7:14
|
||||
let mut _5: isize; // in scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
let _6: i32; // in scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
let mut _7: !; // in scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
let mut _8: i32; // in scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
let mut _9: i32; // in scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
let _10: u32; // in scope 0 at $DIR/simplify_try.rs:7:13: 7:15
|
||||
let mut _11: u32; // in scope 0 at $DIR/simplify_try.rs:8:8: 8:9
|
||||
debug x => _1; // in scope 0 at $DIR/simplify_try.rs:7:17: 7:18
|
||||
let mut _0: std::result::Result<u32, i32>; // return place in scope 0 at $DIR/simplify_try.rs:7:41: 7:57
|
||||
let _2: u32; // in scope 0 at $DIR/simplify_try.rs:8:9: 8:10
|
||||
let mut _3: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:8:13: 8:15
|
||||
let mut _4: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:8:13: 8:14
|
||||
let mut _5: isize; // in scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
let _6: i32; // in scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
let mut _7: !; // in scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
let mut _8: i32; // in scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
let mut _9: i32; // in scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
let _10: u32; // in scope 0 at $DIR/simplify_try.rs:8:13: 8:15
|
||||
let mut _11: u32; // in scope 0 at $DIR/simplify_try.rs:9:8: 9:9
|
||||
scope 1 {
|
||||
- debug y => _2; // in scope 1 at $DIR/simplify_try.rs:7:9: 7:10
|
||||
+ debug y => ((_0 as Ok).0: u32); // in scope 1 at $DIR/simplify_try.rs:7:9: 7:10
|
||||
- debug y => _2; // in scope 1 at $DIR/simplify_try.rs:8:9: 8:10
|
||||
+ debug y => ((_0 as Ok).0: u32); // in scope 1 at $DIR/simplify_try.rs:8:9: 8:10
|
||||
}
|
||||
scope 2 {
|
||||
- debug err => _6; // in scope 2 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
+ debug err => ((_0 as Err).0: i32); // in scope 2 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
- debug err => _6; // in scope 2 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
+ debug err => ((_0 as Err).0: i32); // in scope 2 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
scope 3 {
|
||||
scope 7 {
|
||||
- debug t => _9; // in scope 7 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
|
||||
@ -29,13 +29,13 @@
|
||||
scope 8 {
|
||||
- debug v => _8; // in scope 8 at $SRC_DIR/core/src/result.rs:LL:COL
|
||||
+ debug v => ((_0 as Err).0: i32); // in scope 8 at $SRC_DIR/core/src/result.rs:LL:COL
|
||||
let mut _12: i32; // in scope 8 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
let mut _12: i32; // in scope 8 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
}
|
||||
}
|
||||
}
|
||||
scope 4 {
|
||||
- debug val => _10; // in scope 4 at $DIR/simplify_try.rs:7:13: 7:15
|
||||
+ debug val => ((_0 as Ok).0: u32); // in scope 4 at $DIR/simplify_try.rs:7:13: 7:15
|
||||
- debug val => _10; // in scope 4 at $DIR/simplify_try.rs:8:13: 8:15
|
||||
+ debug val => ((_0 as Ok).0: u32); // in scope 4 at $DIR/simplify_try.rs:8:13: 8:15
|
||||
scope 5 {
|
||||
}
|
||||
}
|
||||
@ -44,55 +44,55 @@
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_2); // scope 0 at $DIR/simplify_try.rs:7:9: 7:10
|
||||
StorageLive(_3); // scope 0 at $DIR/simplify_try.rs:7:13: 7:15
|
||||
StorageLive(_4); // scope 0 at $DIR/simplify_try.rs:7:13: 7:14
|
||||
_4 = _1; // scope 0 at $DIR/simplify_try.rs:7:13: 7:14
|
||||
StorageLive(_2); // scope 0 at $DIR/simplify_try.rs:8:9: 8:10
|
||||
StorageLive(_3); // scope 0 at $DIR/simplify_try.rs:8:13: 8:15
|
||||
StorageLive(_4); // scope 0 at $DIR/simplify_try.rs:8:13: 8:14
|
||||
_4 = _1; // scope 0 at $DIR/simplify_try.rs:8:13: 8:14
|
||||
_3 = move _4; // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL
|
||||
StorageDead(_4); // scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
_5 = discriminant(_3); // scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
switchInt(move _5) -> [0_isize: bb1, otherwise: bb2]; // scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
StorageDead(_4); // scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
_5 = discriminant(_3); // scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
switchInt(move _5) -> [0_isize: bb1, otherwise: bb2]; // scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
}
|
||||
|
||||
bb1: {
|
||||
- StorageLive(_10); // scope 0 at $DIR/simplify_try.rs:7:13: 7:15
|
||||
- _10 = ((_3 as Ok).0: u32); // scope 0 at $DIR/simplify_try.rs:7:13: 7:15
|
||||
- _2 = _10; // scope 5 at $DIR/simplify_try.rs:7:13: 7:15
|
||||
- StorageDead(_10); // scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
+ _0 = move _3; // scope 1 at $DIR/simplify_try.rs:8:5: 8:10
|
||||
StorageDead(_3); // scope 0 at $DIR/simplify_try.rs:7:15: 7:16
|
||||
- StorageLive(_11); // scope 1 at $DIR/simplify_try.rs:8:8: 8:9
|
||||
- _11 = _2; // scope 1 at $DIR/simplify_try.rs:8:8: 8:9
|
||||
- ((_0 as Ok).0: u32) = move _11; // scope 1 at $DIR/simplify_try.rs:8:5: 8:10
|
||||
- discriminant(_0) = 0; // scope 1 at $DIR/simplify_try.rs:8:5: 8:10
|
||||
- StorageDead(_11); // scope 1 at $DIR/simplify_try.rs:8:9: 8:10
|
||||
StorageDead(_2); // scope 0 at $DIR/simplify_try.rs:9:1: 9:2
|
||||
goto -> bb3; // scope 0 at $DIR/simplify_try.rs:9:2: 9:2
|
||||
- StorageLive(_10); // scope 0 at $DIR/simplify_try.rs:8:13: 8:15
|
||||
- _10 = ((_3 as Ok).0: u32); // scope 0 at $DIR/simplify_try.rs:8:13: 8:15
|
||||
- _2 = _10; // scope 5 at $DIR/simplify_try.rs:8:13: 8:15
|
||||
- StorageDead(_10); // scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
+ _0 = move _3; // scope 1 at $DIR/simplify_try.rs:9:5: 9:10
|
||||
StorageDead(_3); // scope 0 at $DIR/simplify_try.rs:8:15: 8:16
|
||||
- StorageLive(_11); // scope 1 at $DIR/simplify_try.rs:9:8: 9:9
|
||||
- _11 = _2; // scope 1 at $DIR/simplify_try.rs:9:8: 9:9
|
||||
- ((_0 as Ok).0: u32) = move _11; // scope 1 at $DIR/simplify_try.rs:9:5: 9:10
|
||||
- discriminant(_0) = 0; // scope 1 at $DIR/simplify_try.rs:9:5: 9:10
|
||||
- StorageDead(_11); // scope 1 at $DIR/simplify_try.rs:9:9: 9:10
|
||||
StorageDead(_2); // scope 0 at $DIR/simplify_try.rs:10:1: 10:2
|
||||
goto -> bb3; // scope 0 at $DIR/simplify_try.rs:10:2: 10:2
|
||||
}
|
||||
|
||||
bb2: {
|
||||
- StorageLive(_6); // scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
- _6 = ((_3 as Err).0: i32); // scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
- StorageLive(_8); // scope 3 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
- StorageLive(_9); // scope 3 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
- _9 = _6; // scope 3 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
- StorageLive(_6); // scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
- _6 = ((_3 as Err).0: i32); // scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
- StorageLive(_8); // scope 3 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
- StorageLive(_9); // scope 3 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
- _9 = _6; // scope 3 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
- _8 = move _9; // scope 7 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
|
||||
- StorageDead(_9); // scope 3 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
- StorageDead(_9); // scope 3 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
- StorageLive(_12); // scope 8 at $SRC_DIR/core/src/result.rs:LL:COL
|
||||
- _12 = move _8; // scope 8 at $SRC_DIR/core/src/result.rs:LL:COL
|
||||
- ((_0 as Err).0: i32) = move _12; // scope 8 at $SRC_DIR/core/src/result.rs:LL:COL
|
||||
- discriminant(_0) = 1; // scope 8 at $SRC_DIR/core/src/result.rs:LL:COL
|
||||
- StorageDead(_12); // scope 8 at $SRC_DIR/core/src/result.rs:LL:COL
|
||||
- StorageDead(_8); // scope 3 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
- StorageDead(_6); // scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
- StorageDead(_8); // scope 3 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
- StorageDead(_6); // scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
+ _0 = move _3; // scope 8 at $SRC_DIR/core/src/result.rs:LL:COL
|
||||
StorageDead(_3); // scope 0 at $DIR/simplify_try.rs:7:15: 7:16
|
||||
StorageDead(_2); // scope 0 at $DIR/simplify_try.rs:9:1: 9:2
|
||||
goto -> bb3; // scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
StorageDead(_3); // scope 0 at $DIR/simplify_try.rs:8:15: 8:16
|
||||
StorageDead(_2); // scope 0 at $DIR/simplify_try.rs:10:1: 10:2
|
||||
goto -> bb3; // scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
}
|
||||
|
||||
bb3: {
|
||||
return; // scope 0 at $DIR/simplify_try.rs:9:2: 9:2
|
||||
return; // scope 0 at $DIR/simplify_try.rs:10:2: 10:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,35 +1,35 @@
|
||||
// MIR for `try_identity` after SimplifyBranchSame
|
||||
|
||||
fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i32> {
|
||||
debug x => _1; // in scope 0 at $DIR/simplify_try.rs:6:17: 6:18
|
||||
let mut _0: std::result::Result<u32, i32>; // return place in scope 0 at $DIR/simplify_try.rs:6:41: 6:57
|
||||
let _2: u32; // in scope 0 at $DIR/simplify_try.rs:7:9: 7:10
|
||||
let mut _3: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:7:13: 7:15
|
||||
let mut _4: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:7:13: 7:14
|
||||
let mut _5: isize; // in scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
let _6: i32; // in scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
let mut _7: !; // in scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
let mut _8: i32; // in scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
let mut _9: i32; // in scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
let _10: u32; // in scope 0 at $DIR/simplify_try.rs:7:13: 7:15
|
||||
let mut _11: u32; // in scope 0 at $DIR/simplify_try.rs:8:8: 8:9
|
||||
debug x => _1; // in scope 0 at $DIR/simplify_try.rs:7:17: 7:18
|
||||
let mut _0: std::result::Result<u32, i32>; // return place in scope 0 at $DIR/simplify_try.rs:7:41: 7:57
|
||||
let _2: u32; // in scope 0 at $DIR/simplify_try.rs:8:9: 8:10
|
||||
let mut _3: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:8:13: 8:15
|
||||
let mut _4: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:8:13: 8:14
|
||||
let mut _5: isize; // in scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
let _6: i32; // in scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
let mut _7: !; // in scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
let mut _8: i32; // in scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
let mut _9: i32; // in scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
let _10: u32; // in scope 0 at $DIR/simplify_try.rs:8:13: 8:15
|
||||
let mut _11: u32; // in scope 0 at $DIR/simplify_try.rs:9:8: 9:9
|
||||
scope 1 {
|
||||
debug y => ((_0 as Ok).0: u32); // in scope 1 at $DIR/simplify_try.rs:7:9: 7:10
|
||||
debug y => ((_0 as Ok).0: u32); // in scope 1 at $DIR/simplify_try.rs:8:9: 8:10
|
||||
}
|
||||
scope 2 {
|
||||
debug err => ((_0 as Err).0: i32); // in scope 2 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
debug err => ((_0 as Err).0: i32); // in scope 2 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
scope 3 {
|
||||
scope 7 {
|
||||
debug t => ((_0 as Err).0: i32); // in scope 7 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
|
||||
}
|
||||
scope 8 {
|
||||
debug v => ((_0 as Err).0: i32); // in scope 8 at $SRC_DIR/core/src/result.rs:LL:COL
|
||||
let mut _12: i32; // in scope 8 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
let mut _12: i32; // in scope 8 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
}
|
||||
}
|
||||
}
|
||||
scope 4 {
|
||||
debug val => ((_0 as Ok).0: u32); // in scope 4 at $DIR/simplify_try.rs:7:13: 7:15
|
||||
debug val => ((_0 as Ok).0: u32); // in scope 4 at $DIR/simplify_try.rs:8:13: 8:15
|
||||
scope 5 {
|
||||
}
|
||||
}
|
||||
@ -38,24 +38,24 @@ fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_2); // scope 0 at $DIR/simplify_try.rs:7:9: 7:10
|
||||
StorageLive(_3); // scope 0 at $DIR/simplify_try.rs:7:13: 7:15
|
||||
StorageLive(_4); // scope 0 at $DIR/simplify_try.rs:7:13: 7:14
|
||||
_4 = _1; // scope 0 at $DIR/simplify_try.rs:7:13: 7:14
|
||||
StorageLive(_2); // scope 0 at $DIR/simplify_try.rs:8:9: 8:10
|
||||
StorageLive(_3); // scope 0 at $DIR/simplify_try.rs:8:13: 8:15
|
||||
StorageLive(_4); // scope 0 at $DIR/simplify_try.rs:8:13: 8:14
|
||||
_4 = _1; // scope 0 at $DIR/simplify_try.rs:8:13: 8:14
|
||||
_3 = move _4; // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL
|
||||
StorageDead(_4); // scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
_5 = discriminant(_3); // scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
goto -> bb1; // scope 0 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
StorageDead(_4); // scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
_5 = discriminant(_3); // scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
goto -> bb1; // scope 0 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
}
|
||||
|
||||
bb1: {
|
||||
_0 = move _3; // scope 1 at $DIR/simplify_try.rs:8:5: 8:10
|
||||
StorageDead(_3); // scope 0 at $DIR/simplify_try.rs:7:15: 7:16
|
||||
StorageDead(_2); // scope 0 at $DIR/simplify_try.rs:9:1: 9:2
|
||||
goto -> bb2; // scope 0 at $DIR/simplify_try.rs:9:2: 9:2
|
||||
_0 = move _3; // scope 1 at $DIR/simplify_try.rs:9:5: 9:10
|
||||
StorageDead(_3); // scope 0 at $DIR/simplify_try.rs:8:15: 8:16
|
||||
StorageDead(_2); // scope 0 at $DIR/simplify_try.rs:10:1: 10:2
|
||||
goto -> bb2; // scope 0 at $DIR/simplify_try.rs:10:2: 10:2
|
||||
}
|
||||
|
||||
bb2: {
|
||||
return; // scope 0 at $DIR/simplify_try.rs:9:2: 9:2
|
||||
return; // scope 0 at $DIR/simplify_try.rs:10:2: 10:2
|
||||
}
|
||||
}
|
||||
|
@ -1,13 +1,13 @@
|
||||
// MIR for `try_identity` after SimplifyLocals
|
||||
|
||||
fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i32> {
|
||||
debug x => _1; // in scope 0 at $DIR/simplify_try.rs:6:17: 6:18
|
||||
let mut _0: std::result::Result<u32, i32>; // return place in scope 0 at $DIR/simplify_try.rs:6:41: 6:57
|
||||
debug x => _1; // in scope 0 at $DIR/simplify_try.rs:7:17: 7:18
|
||||
let mut _0: std::result::Result<u32, i32>; // return place in scope 0 at $DIR/simplify_try.rs:7:41: 7:57
|
||||
scope 1 {
|
||||
debug y => ((_0 as Ok).0: u32); // in scope 1 at $DIR/simplify_try.rs:7:9: 7:10
|
||||
debug y => ((_0 as Ok).0: u32); // in scope 1 at $DIR/simplify_try.rs:8:9: 8:10
|
||||
}
|
||||
scope 2 {
|
||||
debug err => ((_0 as Err).0: i32); // in scope 2 at $DIR/simplify_try.rs:7:14: 7:15
|
||||
debug err => ((_0 as Err).0: i32); // in scope 2 at $DIR/simplify_try.rs:8:14: 8:15
|
||||
scope 3 {
|
||||
scope 7 {
|
||||
debug t => ((_0 as Err).0: i32); // in scope 7 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
|
||||
@ -18,7 +18,7 @@ fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i
|
||||
}
|
||||
}
|
||||
scope 4 {
|
||||
debug val => ((_0 as Ok).0: u32); // in scope 4 at $DIR/simplify_try.rs:7:13: 7:15
|
||||
debug val => ((_0 as Ok).0: u32); // in scope 4 at $DIR/simplify_try.rs:8:13: 8:15
|
||||
scope 5 {
|
||||
}
|
||||
}
|
||||
@ -27,7 +27,7 @@ fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i
|
||||
}
|
||||
|
||||
bb0: {
|
||||
_0 = _1; // scope 0 at $DIR/simplify_try.rs:7:13: 7:14
|
||||
return; // scope 0 at $DIR/simplify_try.rs:9:2: 9:2
|
||||
_0 = _1; // scope 0 at $DIR/simplify_try.rs:8:13: 8:14
|
||||
return; // scope 0 at $DIR/simplify_try.rs:10:2: 10:2
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Regression test for issue #76740.
|
||||
// run-fail FIXME: change to run-pass once #76899 lands
|
||||
// run-pass
|
||||
// compile-flags: -Zmir-opt-level=3
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
|
Loading…
Reference in New Issue
Block a user