Remove comments from mir-opt MIR dumps

This commit is contained in:
Ben Kimock 2023-06-06 09:47:00 -04:00
parent 331249a949
commit 0a1fa411ed
701 changed files with 21882 additions and 24151 deletions

View File

@ -685,7 +685,7 @@ fn test_unstable_options_tracking_hash() {
untracked!(ls, true);
untracked!(macro_backtrace, true);
untracked!(meta_stats, true);
untracked!(mir_pretty_relative_line_numbers, true);
untracked!(mir_include_spans, true);
untracked!(nll_facts, true);
untracked!(no_analysis, true);
untracked!(no_leak_check, true);

View File

@ -353,14 +353,22 @@ where
for statement in &data.statements {
extra_data(PassWhere::BeforeLocation(current_location), w)?;
let indented_body = format!("{0}{0}{1:?};", INDENT, statement);
writeln!(
w,
"{:A$} // {}{}",
indented_body,
if tcx.sess.verbose() { format!("{:?}: ", current_location) } else { String::new() },
comment(tcx, statement.source_info, body.span),
A = ALIGN,
)?;
if tcx.sess.opts.unstable_opts.mir_include_spans {
writeln!(
w,
"{:A$} // {}{}",
indented_body,
if tcx.sess.verbose() {
format!("{:?}: ", current_location)
} else {
String::new()
},
comment(tcx, statement.source_info),
A = ALIGN,
)?;
} else {
writeln!(w, "{}", indented_body)?;
}
write_extra(tcx, w, |visitor| {
visitor.visit_statement(statement, current_location);
@ -374,14 +382,18 @@ where
// Terminator at the bottom.
extra_data(PassWhere::BeforeLocation(current_location), w)?;
let indented_terminator = format!("{0}{0}{1:?};", INDENT, data.terminator().kind);
writeln!(
w,
"{:A$} // {}{}",
indented_terminator,
if tcx.sess.verbose() { format!("{:?}: ", current_location) } else { String::new() },
comment(tcx, data.terminator().source_info, body.span),
A = ALIGN,
)?;
if tcx.sess.opts.unstable_opts.mir_include_spans {
writeln!(
w,
"{:A$} // {}{}",
indented_terminator,
if tcx.sess.verbose() { format!("{:?}: ", current_location) } else { String::new() },
comment(tcx, data.terminator().source_info),
A = ALIGN,
)?;
} else {
writeln!(w, "{}", indented_terminator)?;
}
write_extra(tcx, w, |visitor| {
visitor.visit_terminator(data.terminator(), current_location);
@ -400,10 +412,12 @@ fn write_extra<'tcx, F>(tcx: TyCtxt<'tcx>, write: &mut dyn Write, mut visit_op:
where
F: FnMut(&mut ExtraComments<'tcx>),
{
let mut extra_comments = ExtraComments { tcx, comments: vec![] };
visit_op(&mut extra_comments);
for comment in extra_comments.comments {
writeln!(write, "{:A$} // {}", "", comment, A = ALIGN)?;
if tcx.sess.opts.unstable_opts.mir_include_spans {
let mut extra_comments = ExtraComments { tcx, comments: vec![] };
visit_op(&mut extra_comments);
for comment in extra_comments.comments {
writeln!(write, "{:A$} // {}", "", comment, A = ALIGN)?;
}
}
Ok(())
}
@ -522,13 +536,8 @@ impl<'tcx> Visitor<'tcx> for ExtraComments<'tcx> {
}
}
fn comment(tcx: TyCtxt<'_>, SourceInfo { span, scope }: SourceInfo, function_span: Span) -> String {
let location = if tcx.sess.opts.unstable_opts.mir_pretty_relative_line_numbers {
tcx.sess.source_map().span_to_relative_line_string(span, function_span)
} else {
tcx.sess.source_map().span_to_embeddable_string(span)
};
fn comment(tcx: TyCtxt<'_>, SourceInfo { span, scope }: SourceInfo) -> String {
let location = tcx.sess.source_map().span_to_embeddable_string(span);
format!("scope {} at {}", scope.index(), location,)
}
@ -560,13 +569,17 @@ fn write_scope_tree(
var_debug_info.value,
);
writeln!(
w,
"{0:1$} // in {2}",
indented_debug_info,
ALIGN,
comment(tcx, var_debug_info.source_info, body.span),
)?;
if tcx.sess.opts.unstable_opts.mir_include_spans {
writeln!(
w,
"{0:1$} // in {2}",
indented_debug_info,
ALIGN,
comment(tcx, var_debug_info.source_info),
)?;
} else {
writeln!(w, "{}", indented_debug_info)?;
}
}
// Local variable types.
@ -594,14 +607,18 @@ fn write_scope_tree(
let local_name = if local == RETURN_PLACE { " return place" } else { "" };
writeln!(
w,
"{0:1$} //{2} in {3}",
indented_decl,
ALIGN,
local_name,
comment(tcx, local_decl.source_info, body.span),
)?;
if tcx.sess.opts.unstable_opts.mir_include_spans {
writeln!(
w,
"{0:1$} //{2} in {3}",
indented_decl,
ALIGN,
local_name,
comment(tcx, local_decl.source_info),
)?;
} else {
writeln!(w, "{}", indented_decl,)?;
}
}
let Some(children) = scope_tree.get(&parent) else {
@ -627,14 +644,18 @@ fn write_scope_tree(
let indented_header = format!("{0:1$}scope {2}{3} {{", "", indent, child.index(), special);
if let Some(span) = span {
writeln!(
w,
"{0:1$} // at {2}",
indented_header,
ALIGN,
tcx.sess.source_map().span_to_embeddable_string(span),
)?;
if tcx.sess.opts.unstable_opts.mir_include_spans {
if let Some(span) = span {
writeln!(
w,
"{0:1$} // at {2}",
indented_header,
ALIGN,
tcx.sess.source_map().span_to_embeddable_string(span),
)?;
} else {
writeln!(w, "{}", indented_header)?;
}
} else {
writeln!(w, "{}", indented_header)?;
}

View File

@ -1558,14 +1558,14 @@ options! {
"use like `-Zmir-enable-passes=+DestinationPropagation,-InstSimplify`. Forces the specified passes to be \
enabled, overriding all other checks. Passes that are not specified are enabled or \
disabled by other flags as usual."),
mir_include_spans: bool = (false, parse_bool, [UNTRACKED],
"use line numbers relative to the function in mir pretty printing"),
mir_keep_place_mention: bool = (false, parse_bool, [TRACKED],
"keep place mention MIR statements, interpreted e.g., by miri; implies -Zmir-opt-level=0 \
(default: no)"),
#[rustc_lint_opt_deny_field_access("use `Session::mir_opt_level` instead of this field")]
mir_opt_level: Option<usize> = (None, parse_opt_number, [TRACKED],
"MIR optimization level (0-4; default: 1 in non optimized builds and 2 in optimized builds)"),
mir_pretty_relative_line_numbers: bool = (false, parse_bool, [UNTRACKED],
"use line numbers relative to the function in mir pretty printing"),
move_size_limit: Option<usize> = (None, parse_opt_number, [TRACKED],
"the size at which the `large_assignments` lint starts to be emitted"),
mutable_noalias: bool = (true, parse_bool, [TRACKED],

View File

@ -2044,7 +2044,6 @@ impl<'test> TestCx<'test> {
&zdump_arg,
"-Zvalidate-mir",
"-Zdump-mir-exclude-pass-number",
"-Zmir-pretty-relative-line-numbers=yes",
]);
if let Some(pass) = &self.props.mir_unit_test {
rustc.args(&["-Zmir-opt-level=0", &format!("-Zmir-enable-passes=+{}", pass)]);

View File

@ -33,83 +33,83 @@
| 29: user_ty: Canonical { value: Ty(*mut [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:36:12: 36:22, inferred_ty: *mut [i32]
|
fn address_of_reborrow() -> () {
let mut _0: (); // return place in scope 0 at $DIR/address_of.rs:+0:26: +0:26
let _1: &[i32; 10]; // in scope 0 at $DIR/address_of.rs:+1:9: +1:10
let _2: [i32; 10]; // in scope 0 at $DIR/address_of.rs:+1:14: +1:21
let mut _4: [i32; 10]; // in scope 0 at $DIR/address_of.rs:+2:22: +2:29
let _5: *const [i32; 10]; // in scope 0 at $DIR/address_of.rs:+4:5: +4:18
let mut _6: *const [i32; 10]; // in scope 0 at $DIR/address_of.rs:+4:5: +4:18
let _7: *const [i32; 10]; // in scope 0 at $DIR/address_of.rs:+5:5: +5:26
let _8: *const dyn std::marker::Send; // in scope 0 at $DIR/address_of.rs:+6:5: +6:25
let mut _9: *const dyn std::marker::Send; // in scope 0 at $DIR/address_of.rs:+6:5: +6:25
let mut _10: *const [i32; 10]; // in scope 0 at $DIR/address_of.rs:+6:5: +6:6
let _11: *const [i32]; // in scope 0 at $DIR/address_of.rs:+7:5: +7:22
let mut _12: *const [i32; 10]; // in scope 0 at $DIR/address_of.rs:+7:5: +7:6
let _13: *const i32; // in scope 0 at $DIR/address_of.rs:+8:5: +8:20
let mut _14: *const [i32; 10]; // in scope 0 at $DIR/address_of.rs:+8:5: +8:6
let mut _18: *const [i32; 10]; // in scope 0 at $DIR/address_of.rs:+12:30: +12:31
let mut _20: *const [i32; 10]; // in scope 0 at $DIR/address_of.rs:+13:27: +13:28
let _21: *const [i32; 10]; // in scope 0 at $DIR/address_of.rs:+15:5: +15:18
let mut _22: *const [i32; 10]; // in scope 0 at $DIR/address_of.rs:+15:5: +15:18
let _23: *const [i32; 10]; // in scope 0 at $DIR/address_of.rs:+16:5: +16:26
let _24: *const dyn std::marker::Send; // in scope 0 at $DIR/address_of.rs:+17:5: +17:25
let mut _25: *const dyn std::marker::Send; // in scope 0 at $DIR/address_of.rs:+17:5: +17:25
let mut _26: *const [i32; 10]; // in scope 0 at $DIR/address_of.rs:+17:5: +17:6
let _27: *const [i32]; // in scope 0 at $DIR/address_of.rs:+18:5: +18:22
let mut _28: *const [i32; 10]; // in scope 0 at $DIR/address_of.rs:+18:5: +18:6
let mut _32: *const [i32; 10]; // in scope 0 at $DIR/address_of.rs:+22:30: +22:31
let mut _34: *const [i32; 10]; // in scope 0 at $DIR/address_of.rs:+23:27: +23:28
let _35: *mut [i32; 10]; // in scope 0 at $DIR/address_of.rs:+25:5: +25:16
let mut _36: *mut [i32; 10]; // in scope 0 at $DIR/address_of.rs:+25:5: +25:16
let _37: *mut [i32; 10]; // in scope 0 at $DIR/address_of.rs:+26:5: +26:24
let _38: *mut dyn std::marker::Send; // in scope 0 at $DIR/address_of.rs:+27:5: +27:23
let mut _39: *mut dyn std::marker::Send; // in scope 0 at $DIR/address_of.rs:+27:5: +27:23
let mut _40: *mut [i32; 10]; // in scope 0 at $DIR/address_of.rs:+27:5: +27:6
let _41: *mut [i32]; // in scope 0 at $DIR/address_of.rs:+28:5: +28:20
let mut _42: *mut [i32; 10]; // in scope 0 at $DIR/address_of.rs:+28:5: +28:6
let mut _46: *mut [i32; 10]; // in scope 0 at $DIR/address_of.rs:+32:28: +32:29
let mut _48: *mut [i32; 10]; // in scope 0 at $DIR/address_of.rs:+33:25: +33:26
let mut _0: ();
let _1: &[i32; 10];
let _2: [i32; 10];
let mut _4: [i32; 10];
let _5: *const [i32; 10];
let mut _6: *const [i32; 10];
let _7: *const [i32; 10];
let _8: *const dyn std::marker::Send;
let mut _9: *const dyn std::marker::Send;
let mut _10: *const [i32; 10];
let _11: *const [i32];
let mut _12: *const [i32; 10];
let _13: *const i32;
let mut _14: *const [i32; 10];
let mut _18: *const [i32; 10];
let mut _20: *const [i32; 10];
let _21: *const [i32; 10];
let mut _22: *const [i32; 10];
let _23: *const [i32; 10];
let _24: *const dyn std::marker::Send;
let mut _25: *const dyn std::marker::Send;
let mut _26: *const [i32; 10];
let _27: *const [i32];
let mut _28: *const [i32; 10];
let mut _32: *const [i32; 10];
let mut _34: *const [i32; 10];
let _35: *mut [i32; 10];
let mut _36: *mut [i32; 10];
let _37: *mut [i32; 10];
let _38: *mut dyn std::marker::Send;
let mut _39: *mut dyn std::marker::Send;
let mut _40: *mut [i32; 10];
let _41: *mut [i32];
let mut _42: *mut [i32; 10];
let mut _46: *mut [i32; 10];
let mut _48: *mut [i32; 10];
scope 1 {
debug y => _1; // in scope 1 at $DIR/address_of.rs:+1:9: +1:10
let mut _3: &mut [i32; 10]; // in scope 1 at $DIR/address_of.rs:+2:9: +2:14
debug y => _1;
let mut _3: &mut [i32; 10];
scope 2 {
debug z => _3; // in scope 2 at $DIR/address_of.rs:+2:9: +2:14
let _15: *const [i32; 10] as UserTypeProjection { base: UserType(2), projs: [] }; // in scope 2 at $DIR/address_of.rs:+10:9: +10:10
debug z => _3;
let _15: *const [i32; 10] as UserTypeProjection { base: UserType(2), projs: [] };
scope 3 {
debug p => _15; // in scope 3 at $DIR/address_of.rs:+10:9: +10:10
let _16: *const [i32; 10] as UserTypeProjection { base: UserType(4), projs: [] }; // in scope 3 at $DIR/address_of.rs:+11:9: +11:10
debug p => _15;
let _16: *const [i32; 10] as UserTypeProjection { base: UserType(4), projs: [] };
scope 4 {
debug p => _16; // in scope 4 at $DIR/address_of.rs:+11:9: +11:10
let _17: *const dyn std::marker::Send as UserTypeProjection { base: UserType(6), projs: [] }; // in scope 4 at $DIR/address_of.rs:+12:9: +12:10
debug p => _16;
let _17: *const dyn std::marker::Send as UserTypeProjection { base: UserType(6), projs: [] };
scope 5 {
debug p => _17; // in scope 5 at $DIR/address_of.rs:+12:9: +12:10
let _19: *const [i32] as UserTypeProjection { base: UserType(8), projs: [] }; // in scope 5 at $DIR/address_of.rs:+13:9: +13:10
debug p => _17;
let _19: *const [i32] as UserTypeProjection { base: UserType(8), projs: [] };
scope 6 {
debug p => _19; // in scope 6 at $DIR/address_of.rs:+13:9: +13:10
let _29: *const [i32; 10] as UserTypeProjection { base: UserType(12), projs: [] }; // in scope 6 at $DIR/address_of.rs:+20:9: +20:10
debug p => _19;
let _29: *const [i32; 10] as UserTypeProjection { base: UserType(12), projs: [] };
scope 7 {
debug p => _29; // in scope 7 at $DIR/address_of.rs:+20:9: +20:10
let _30: *const [i32; 10] as UserTypeProjection { base: UserType(14), projs: [] }; // in scope 7 at $DIR/address_of.rs:+21:9: +21:10
debug p => _29;
let _30: *const [i32; 10] as UserTypeProjection { base: UserType(14), projs: [] };
scope 8 {
debug p => _30; // in scope 8 at $DIR/address_of.rs:+21:9: +21:10
let _31: *const dyn std::marker::Send as UserTypeProjection { base: UserType(16), projs: [] }; // in scope 8 at $DIR/address_of.rs:+22:9: +22:10
debug p => _30;
let _31: *const dyn std::marker::Send as UserTypeProjection { base: UserType(16), projs: [] };
scope 9 {
debug p => _31; // in scope 9 at $DIR/address_of.rs:+22:9: +22:10
let _33: *const [i32] as UserTypeProjection { base: UserType(18), projs: [] }; // in scope 9 at $DIR/address_of.rs:+23:9: +23:10
debug p => _31;
let _33: *const [i32] as UserTypeProjection { base: UserType(18), projs: [] };
scope 10 {
debug p => _33; // in scope 10 at $DIR/address_of.rs:+23:9: +23:10
let _43: *mut [i32; 10] as UserTypeProjection { base: UserType(22), projs: [] }; // in scope 10 at $DIR/address_of.rs:+30:9: +30:10
debug p => _33;
let _43: *mut [i32; 10] as UserTypeProjection { base: UserType(22), projs: [] };
scope 11 {
debug p => _43; // in scope 11 at $DIR/address_of.rs:+30:9: +30:10
let _44: *mut [i32; 10] as UserTypeProjection { base: UserType(24), projs: [] }; // in scope 11 at $DIR/address_of.rs:+31:9: +31:10
debug p => _43;
let _44: *mut [i32; 10] as UserTypeProjection { base: UserType(24), projs: [] };
scope 12 {
debug p => _44; // in scope 12 at $DIR/address_of.rs:+31:9: +31:10
let _45: *mut dyn std::marker::Send as UserTypeProjection { base: UserType(26), projs: [] }; // in scope 12 at $DIR/address_of.rs:+32:9: +32:10
debug p => _44;
let _45: *mut dyn std::marker::Send as UserTypeProjection { base: UserType(26), projs: [] };
scope 13 {
debug p => _45; // in scope 13 at $DIR/address_of.rs:+32:9: +32:10
let _47: *mut [i32] as UserTypeProjection { base: UserType(28), projs: [] }; // in scope 13 at $DIR/address_of.rs:+33:9: +33:10
debug p => _45;
let _47: *mut [i32] as UserTypeProjection { base: UserType(28), projs: [] };
scope 14 {
debug p => _47; // in scope 14 at $DIR/address_of.rs:+33:9: +33:10
debug p => _47;
}
}
}
@ -126,183 +126,183 @@ fn address_of_reborrow() -> () {
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/address_of.rs:+1:9: +1:10
StorageLive(_2); // scope 0 at $DIR/address_of.rs:+1:14: +1:21
_2 = [const 0_i32; 10]; // scope 0 at $DIR/address_of.rs:+1:14: +1:21
_1 = &_2; // scope 0 at $DIR/address_of.rs:+1:13: +1:21
FakeRead(ForLet(None), _1); // scope 0 at $DIR/address_of.rs:+1:9: +1:10
StorageLive(_3); // scope 1 at $DIR/address_of.rs:+2:9: +2:14
StorageLive(_4); // scope 1 at $DIR/address_of.rs:+2:22: +2:29
_4 = [const 0_i32; 10]; // scope 1 at $DIR/address_of.rs:+2:22: +2:29
_3 = &mut _4; // scope 1 at $DIR/address_of.rs:+2:17: +2:29
FakeRead(ForLet(None), _3); // scope 1 at $DIR/address_of.rs:+2:9: +2:14
StorageLive(_5); // scope 2 at $DIR/address_of.rs:+4:5: +4:18
StorageLive(_6); // scope 2 at $DIR/address_of.rs:+4:5: +4:18
_6 = &raw const (*_1); // scope 2 at $DIR/address_of.rs:+4:5: +4:6
AscribeUserType(_6, o, UserTypeProjection { base: UserType(0), projs: [] }); // scope 2 at $DIR/address_of.rs:+4:5: +4:18
_5 = _6; // scope 2 at $DIR/address_of.rs:+4:5: +4:18
StorageDead(_6); // scope 2 at $DIR/address_of.rs:+4:18: +4:19
StorageDead(_5); // scope 2 at $DIR/address_of.rs:+4:18: +4:19
StorageLive(_7); // scope 2 at $DIR/address_of.rs:+5:5: +5:26
_7 = &raw const (*_1); // scope 2 at $DIR/address_of.rs:+5:5: +5:6
StorageDead(_7); // scope 2 at $DIR/address_of.rs:+5:26: +5:27
StorageLive(_8); // scope 2 at $DIR/address_of.rs:+6:5: +6:25
StorageLive(_9); // scope 2 at $DIR/address_of.rs:+6:5: +6:25
StorageLive(_10); // scope 2 at $DIR/address_of.rs:+6:5: +6:6
_10 = &raw const (*_1); // scope 2 at $DIR/address_of.rs:+6:5: +6:6
_9 = move _10 as *const dyn std::marker::Send (Pointer(Unsize)); // scope 2 at $DIR/address_of.rs:+6:5: +6:6
StorageDead(_10); // scope 2 at $DIR/address_of.rs:+6:5: +6:6
AscribeUserType(_9, o, UserTypeProjection { base: UserType(1), projs: [] }); // scope 2 at $DIR/address_of.rs:+6:5: +6:25
_8 = _9; // scope 2 at $DIR/address_of.rs:+6:5: +6:25
StorageDead(_9); // scope 2 at $DIR/address_of.rs:+6:25: +6:26
StorageDead(_8); // scope 2 at $DIR/address_of.rs:+6:25: +6:26
StorageLive(_11); // scope 2 at $DIR/address_of.rs:+7:5: +7:22
StorageLive(_12); // scope 2 at $DIR/address_of.rs:+7:5: +7:6
_12 = &raw const (*_1); // scope 2 at $DIR/address_of.rs:+7:5: +7:6
_11 = move _12 as *const [i32] (Pointer(Unsize)); // scope 2 at $DIR/address_of.rs:+7:5: +7:6
StorageDead(_12); // scope 2 at $DIR/address_of.rs:+7:5: +7:6
StorageDead(_11); // scope 2 at $DIR/address_of.rs:+7:22: +7:23
StorageLive(_13); // scope 2 at $DIR/address_of.rs:+8:5: +8:20
StorageLive(_14); // scope 2 at $DIR/address_of.rs:+8:5: +8:6
_14 = &raw const (*_1); // scope 2 at $DIR/address_of.rs:+8:5: +8:6
_13 = move _14 as *const i32 (Pointer(ArrayToPointer)); // scope 2 at $DIR/address_of.rs:+8:5: +8:20
StorageDead(_14); // scope 2 at $DIR/address_of.rs:+8:19: +8:20
StorageDead(_13); // scope 2 at $DIR/address_of.rs:+8:20: +8:21
StorageLive(_15); // scope 2 at $DIR/address_of.rs:+10:9: +10:10
_15 = &raw const (*_1); // scope 2 at $DIR/address_of.rs:+10:23: +10:24
FakeRead(ForLet(None), _15); // scope 2 at $DIR/address_of.rs:+10:9: +10:10
AscribeUserType(_15, o, UserTypeProjection { base: UserType(3), projs: [] }); // scope 2 at $DIR/address_of.rs:+10:12: +10:20
StorageLive(_16); // scope 3 at $DIR/address_of.rs:+11:9: +11:10
_16 = &raw const (*_1); // scope 3 at $DIR/address_of.rs:+11:31: +11:32
FakeRead(ForLet(None), _16); // scope 3 at $DIR/address_of.rs:+11:9: +11:10
AscribeUserType(_16, o, UserTypeProjection { base: UserType(5), projs: [] }); // scope 3 at $DIR/address_of.rs:+11:12: +11:28
StorageLive(_17); // scope 4 at $DIR/address_of.rs:+12:9: +12:10
StorageLive(_18); // scope 4 at $DIR/address_of.rs:+12:30: +12:31
_18 = &raw const (*_1); // scope 4 at $DIR/address_of.rs:+12:30: +12:31
_17 = move _18 as *const dyn std::marker::Send (Pointer(Unsize)); // scope 4 at $DIR/address_of.rs:+12:30: +12:31
StorageDead(_18); // scope 4 at $DIR/address_of.rs:+12:30: +12:31
FakeRead(ForLet(None), _17); // scope 4 at $DIR/address_of.rs:+12:9: +12:10
AscribeUserType(_17, o, UserTypeProjection { base: UserType(7), projs: [] }); // scope 4 at $DIR/address_of.rs:+12:12: +12:27
StorageLive(_19); // scope 5 at $DIR/address_of.rs:+13:9: +13:10
StorageLive(_20); // scope 5 at $DIR/address_of.rs:+13:27: +13:28
_20 = &raw const (*_1); // scope 5 at $DIR/address_of.rs:+13:27: +13:28
_19 = move _20 as *const [i32] (Pointer(Unsize)); // scope 5 at $DIR/address_of.rs:+13:27: +13:28
StorageDead(_20); // scope 5 at $DIR/address_of.rs:+13:27: +13:28
FakeRead(ForLet(None), _19); // scope 5 at $DIR/address_of.rs:+13:9: +13:10
AscribeUserType(_19, o, UserTypeProjection { base: UserType(9), projs: [] }); // scope 5 at $DIR/address_of.rs:+13:12: +13:24
StorageLive(_21); // scope 6 at $DIR/address_of.rs:+15:5: +15:18
StorageLive(_22); // scope 6 at $DIR/address_of.rs:+15:5: +15:18
_22 = &raw const (*_3); // scope 6 at $DIR/address_of.rs:+15:5: +15:6
AscribeUserType(_22, o, UserTypeProjection { base: UserType(10), projs: [] }); // scope 6 at $DIR/address_of.rs:+15:5: +15:18
_21 = _22; // scope 6 at $DIR/address_of.rs:+15:5: +15:18
StorageDead(_22); // scope 6 at $DIR/address_of.rs:+15:18: +15:19
StorageDead(_21); // scope 6 at $DIR/address_of.rs:+15:18: +15:19
StorageLive(_23); // scope 6 at $DIR/address_of.rs:+16:5: +16:26
_23 = &raw const (*_3); // scope 6 at $DIR/address_of.rs:+16:5: +16:6
StorageDead(_23); // scope 6 at $DIR/address_of.rs:+16:26: +16:27
StorageLive(_24); // scope 6 at $DIR/address_of.rs:+17:5: +17:25
StorageLive(_25); // scope 6 at $DIR/address_of.rs:+17:5: +17:25
StorageLive(_26); // scope 6 at $DIR/address_of.rs:+17:5: +17:6
_26 = &raw const (*_3); // scope 6 at $DIR/address_of.rs:+17:5: +17:6
_25 = move _26 as *const dyn std::marker::Send (Pointer(Unsize)); // scope 6 at $DIR/address_of.rs:+17:5: +17:6
StorageDead(_26); // scope 6 at $DIR/address_of.rs:+17:5: +17:6
AscribeUserType(_25, o, UserTypeProjection { base: UserType(11), projs: [] }); // scope 6 at $DIR/address_of.rs:+17:5: +17:25
_24 = _25; // scope 6 at $DIR/address_of.rs:+17:5: +17:25
StorageDead(_25); // scope 6 at $DIR/address_of.rs:+17:25: +17:26
StorageDead(_24); // scope 6 at $DIR/address_of.rs:+17:25: +17:26
StorageLive(_27); // scope 6 at $DIR/address_of.rs:+18:5: +18:22
StorageLive(_28); // scope 6 at $DIR/address_of.rs:+18:5: +18:6
_28 = &raw const (*_3); // scope 6 at $DIR/address_of.rs:+18:5: +18:6
_27 = move _28 as *const [i32] (Pointer(Unsize)); // scope 6 at $DIR/address_of.rs:+18:5: +18:6
StorageDead(_28); // scope 6 at $DIR/address_of.rs:+18:5: +18:6
StorageDead(_27); // scope 6 at $DIR/address_of.rs:+18:22: +18:23
StorageLive(_29); // scope 6 at $DIR/address_of.rs:+20:9: +20:10
_29 = &raw const (*_3); // scope 6 at $DIR/address_of.rs:+20:23: +20:24
FakeRead(ForLet(None), _29); // scope 6 at $DIR/address_of.rs:+20:9: +20:10
AscribeUserType(_29, o, UserTypeProjection { base: UserType(13), projs: [] }); // scope 6 at $DIR/address_of.rs:+20:12: +20:20
StorageLive(_30); // scope 7 at $DIR/address_of.rs:+21:9: +21:10
_30 = &raw const (*_3); // scope 7 at $DIR/address_of.rs:+21:31: +21:32
FakeRead(ForLet(None), _30); // scope 7 at $DIR/address_of.rs:+21:9: +21:10
AscribeUserType(_30, o, UserTypeProjection { base: UserType(15), projs: [] }); // scope 7 at $DIR/address_of.rs:+21:12: +21:28
StorageLive(_31); // scope 8 at $DIR/address_of.rs:+22:9: +22:10
StorageLive(_32); // scope 8 at $DIR/address_of.rs:+22:30: +22:31
_32 = &raw const (*_3); // scope 8 at $DIR/address_of.rs:+22:30: +22:31
_31 = move _32 as *const dyn std::marker::Send (Pointer(Unsize)); // scope 8 at $DIR/address_of.rs:+22:30: +22:31
StorageDead(_32); // scope 8 at $DIR/address_of.rs:+22:30: +22:31
FakeRead(ForLet(None), _31); // scope 8 at $DIR/address_of.rs:+22:9: +22:10
AscribeUserType(_31, o, UserTypeProjection { base: UserType(17), projs: [] }); // scope 8 at $DIR/address_of.rs:+22:12: +22:27
StorageLive(_33); // scope 9 at $DIR/address_of.rs:+23:9: +23:10
StorageLive(_34); // scope 9 at $DIR/address_of.rs:+23:27: +23:28
_34 = &raw const (*_3); // scope 9 at $DIR/address_of.rs:+23:27: +23:28
_33 = move _34 as *const [i32] (Pointer(Unsize)); // scope 9 at $DIR/address_of.rs:+23:27: +23:28
StorageDead(_34); // scope 9 at $DIR/address_of.rs:+23:27: +23:28
FakeRead(ForLet(None), _33); // scope 9 at $DIR/address_of.rs:+23:9: +23:10
AscribeUserType(_33, o, UserTypeProjection { base: UserType(19), projs: [] }); // scope 9 at $DIR/address_of.rs:+23:12: +23:24
StorageLive(_35); // scope 10 at $DIR/address_of.rs:+25:5: +25:16
StorageLive(_36); // scope 10 at $DIR/address_of.rs:+25:5: +25:16
_36 = &raw mut (*_3); // scope 10 at $DIR/address_of.rs:+25:5: +25:6
AscribeUserType(_36, o, UserTypeProjection { base: UserType(20), projs: [] }); // scope 10 at $DIR/address_of.rs:+25:5: +25:16
_35 = _36; // scope 10 at $DIR/address_of.rs:+25:5: +25:16
StorageDead(_36); // scope 10 at $DIR/address_of.rs:+25:16: +25:17
StorageDead(_35); // scope 10 at $DIR/address_of.rs:+25:16: +25:17
StorageLive(_37); // scope 10 at $DIR/address_of.rs:+26:5: +26:24
_37 = &raw mut (*_3); // scope 10 at $DIR/address_of.rs:+26:5: +26:6
StorageDead(_37); // scope 10 at $DIR/address_of.rs:+26:24: +26:25
StorageLive(_38); // scope 10 at $DIR/address_of.rs:+27:5: +27:23
StorageLive(_39); // scope 10 at $DIR/address_of.rs:+27:5: +27:23
StorageLive(_40); // scope 10 at $DIR/address_of.rs:+27:5: +27:6
_40 = &raw mut (*_3); // scope 10 at $DIR/address_of.rs:+27:5: +27:6
_39 = move _40 as *mut dyn std::marker::Send (Pointer(Unsize)); // scope 10 at $DIR/address_of.rs:+27:5: +27:6
StorageDead(_40); // scope 10 at $DIR/address_of.rs:+27:5: +27:6
AscribeUserType(_39, o, UserTypeProjection { base: UserType(21), projs: [] }); // scope 10 at $DIR/address_of.rs:+27:5: +27:23
_38 = _39; // scope 10 at $DIR/address_of.rs:+27:5: +27:23
StorageDead(_39); // scope 10 at $DIR/address_of.rs:+27:23: +27:24
StorageDead(_38); // scope 10 at $DIR/address_of.rs:+27:23: +27:24
StorageLive(_41); // scope 10 at $DIR/address_of.rs:+28:5: +28:20
StorageLive(_42); // scope 10 at $DIR/address_of.rs:+28:5: +28:6
_42 = &raw mut (*_3); // scope 10 at $DIR/address_of.rs:+28:5: +28:6
_41 = move _42 as *mut [i32] (Pointer(Unsize)); // scope 10 at $DIR/address_of.rs:+28:5: +28:6
StorageDead(_42); // scope 10 at $DIR/address_of.rs:+28:5: +28:6
StorageDead(_41); // scope 10 at $DIR/address_of.rs:+28:20: +28:21
StorageLive(_43); // scope 10 at $DIR/address_of.rs:+30:9: +30:10
_43 = &raw mut (*_3); // scope 10 at $DIR/address_of.rs:+30:21: +30:22
FakeRead(ForLet(None), _43); // scope 10 at $DIR/address_of.rs:+30:9: +30:10
AscribeUserType(_43, o, UserTypeProjection { base: UserType(23), projs: [] }); // scope 10 at $DIR/address_of.rs:+30:12: +30:18
StorageLive(_44); // scope 11 at $DIR/address_of.rs:+31:9: +31:10
_44 = &raw mut (*_3); // scope 11 at $DIR/address_of.rs:+31:29: +31:30
FakeRead(ForLet(None), _44); // scope 11 at $DIR/address_of.rs:+31:9: +31:10
AscribeUserType(_44, o, UserTypeProjection { base: UserType(25), projs: [] }); // scope 11 at $DIR/address_of.rs:+31:12: +31:26
StorageLive(_45); // scope 12 at $DIR/address_of.rs:+32:9: +32:10
StorageLive(_46); // scope 12 at $DIR/address_of.rs:+32:28: +32:29
_46 = &raw mut (*_3); // scope 12 at $DIR/address_of.rs:+32:28: +32:29
_45 = move _46 as *mut dyn std::marker::Send (Pointer(Unsize)); // scope 12 at $DIR/address_of.rs:+32:28: +32:29
StorageDead(_46); // scope 12 at $DIR/address_of.rs:+32:28: +32:29
FakeRead(ForLet(None), _45); // scope 12 at $DIR/address_of.rs:+32:9: +32:10
AscribeUserType(_45, o, UserTypeProjection { base: UserType(27), projs: [] }); // scope 12 at $DIR/address_of.rs:+32:12: +32:25
StorageLive(_47); // scope 13 at $DIR/address_of.rs:+33:9: +33:10
StorageLive(_48); // scope 13 at $DIR/address_of.rs:+33:25: +33:26
_48 = &raw mut (*_3); // scope 13 at $DIR/address_of.rs:+33:25: +33:26
_47 = move _48 as *mut [i32] (Pointer(Unsize)); // scope 13 at $DIR/address_of.rs:+33:25: +33:26
StorageDead(_48); // scope 13 at $DIR/address_of.rs:+33:25: +33:26
FakeRead(ForLet(None), _47); // scope 13 at $DIR/address_of.rs:+33:9: +33:10
AscribeUserType(_47, o, UserTypeProjection { base: UserType(29), projs: [] }); // scope 13 at $DIR/address_of.rs:+33:12: +33:22
_0 = const (); // scope 0 at $DIR/address_of.rs:+0:26: +34:2
StorageDead(_47); // scope 13 at $DIR/address_of.rs:+34:1: +34:2
StorageDead(_45); // scope 12 at $DIR/address_of.rs:+34:1: +34:2
StorageDead(_44); // scope 11 at $DIR/address_of.rs:+34:1: +34:2
StorageDead(_43); // scope 10 at $DIR/address_of.rs:+34:1: +34:2
StorageDead(_33); // scope 9 at $DIR/address_of.rs:+34:1: +34:2
StorageDead(_31); // scope 8 at $DIR/address_of.rs:+34:1: +34:2
StorageDead(_30); // scope 7 at $DIR/address_of.rs:+34:1: +34:2
StorageDead(_29); // scope 6 at $DIR/address_of.rs:+34:1: +34:2
StorageDead(_19); // scope 5 at $DIR/address_of.rs:+34:1: +34:2
StorageDead(_17); // scope 4 at $DIR/address_of.rs:+34:1: +34:2
StorageDead(_16); // scope 3 at $DIR/address_of.rs:+34:1: +34:2
StorageDead(_15); // scope 2 at $DIR/address_of.rs:+34:1: +34:2
StorageDead(_4); // scope 1 at $DIR/address_of.rs:+34:1: +34:2
StorageDead(_3); // scope 1 at $DIR/address_of.rs:+34:1: +34:2
StorageDead(_2); // scope 0 at $DIR/address_of.rs:+34:1: +34:2
StorageDead(_1); // scope 0 at $DIR/address_of.rs:+34:1: +34:2
return; // scope 0 at $DIR/address_of.rs:+34:2: +34:2
StorageLive(_1);
StorageLive(_2);
_2 = [const 0_i32; 10];
_1 = &_2;
FakeRead(ForLet(None), _1);
StorageLive(_3);
StorageLive(_4);
_4 = [const 0_i32; 10];
_3 = &mut _4;
FakeRead(ForLet(None), _3);
StorageLive(_5);
StorageLive(_6);
_6 = &raw const (*_1);
AscribeUserType(_6, o, UserTypeProjection { base: UserType(0), projs: [] });
_5 = _6;
StorageDead(_6);
StorageDead(_5);
StorageLive(_7);
_7 = &raw const (*_1);
StorageDead(_7);
StorageLive(_8);
StorageLive(_9);
StorageLive(_10);
_10 = &raw const (*_1);
_9 = move _10 as *const dyn std::marker::Send (Pointer(Unsize));
StorageDead(_10);
AscribeUserType(_9, o, UserTypeProjection { base: UserType(1), projs: [] });
_8 = _9;
StorageDead(_9);
StorageDead(_8);
StorageLive(_11);
StorageLive(_12);
_12 = &raw const (*_1);
_11 = move _12 as *const [i32] (Pointer(Unsize));
StorageDead(_12);
StorageDead(_11);
StorageLive(_13);
StorageLive(_14);
_14 = &raw const (*_1);
_13 = move _14 as *const i32 (Pointer(ArrayToPointer));
StorageDead(_14);
StorageDead(_13);
StorageLive(_15);
_15 = &raw const (*_1);
FakeRead(ForLet(None), _15);
AscribeUserType(_15, o, UserTypeProjection { base: UserType(3), projs: [] });
StorageLive(_16);
_16 = &raw const (*_1);
FakeRead(ForLet(None), _16);
AscribeUserType(_16, o, UserTypeProjection { base: UserType(5), projs: [] });
StorageLive(_17);
StorageLive(_18);
_18 = &raw const (*_1);
_17 = move _18 as *const dyn std::marker::Send (Pointer(Unsize));
StorageDead(_18);
FakeRead(ForLet(None), _17);
AscribeUserType(_17, o, UserTypeProjection { base: UserType(7), projs: [] });
StorageLive(_19);
StorageLive(_20);
_20 = &raw const (*_1);
_19 = move _20 as *const [i32] (Pointer(Unsize));
StorageDead(_20);
FakeRead(ForLet(None), _19);
AscribeUserType(_19, o, UserTypeProjection { base: UserType(9), projs: [] });
StorageLive(_21);
StorageLive(_22);
_22 = &raw const (*_3);
AscribeUserType(_22, o, UserTypeProjection { base: UserType(10), projs: [] });
_21 = _22;
StorageDead(_22);
StorageDead(_21);
StorageLive(_23);
_23 = &raw const (*_3);
StorageDead(_23);
StorageLive(_24);
StorageLive(_25);
StorageLive(_26);
_26 = &raw const (*_3);
_25 = move _26 as *const dyn std::marker::Send (Pointer(Unsize));
StorageDead(_26);
AscribeUserType(_25, o, UserTypeProjection { base: UserType(11), projs: [] });
_24 = _25;
StorageDead(_25);
StorageDead(_24);
StorageLive(_27);
StorageLive(_28);
_28 = &raw const (*_3);
_27 = move _28 as *const [i32] (Pointer(Unsize));
StorageDead(_28);
StorageDead(_27);
StorageLive(_29);
_29 = &raw const (*_3);
FakeRead(ForLet(None), _29);
AscribeUserType(_29, o, UserTypeProjection { base: UserType(13), projs: [] });
StorageLive(_30);
_30 = &raw const (*_3);
FakeRead(ForLet(None), _30);
AscribeUserType(_30, o, UserTypeProjection { base: UserType(15), projs: [] });
StorageLive(_31);
StorageLive(_32);
_32 = &raw const (*_3);
_31 = move _32 as *const dyn std::marker::Send (Pointer(Unsize));
StorageDead(_32);
FakeRead(ForLet(None), _31);
AscribeUserType(_31, o, UserTypeProjection { base: UserType(17), projs: [] });
StorageLive(_33);
StorageLive(_34);
_34 = &raw const (*_3);
_33 = move _34 as *const [i32] (Pointer(Unsize));
StorageDead(_34);
FakeRead(ForLet(None), _33);
AscribeUserType(_33, o, UserTypeProjection { base: UserType(19), projs: [] });
StorageLive(_35);
StorageLive(_36);
_36 = &raw mut (*_3);
AscribeUserType(_36, o, UserTypeProjection { base: UserType(20), projs: [] });
_35 = _36;
StorageDead(_36);
StorageDead(_35);
StorageLive(_37);
_37 = &raw mut (*_3);
StorageDead(_37);
StorageLive(_38);
StorageLive(_39);
StorageLive(_40);
_40 = &raw mut (*_3);
_39 = move _40 as *mut dyn std::marker::Send (Pointer(Unsize));
StorageDead(_40);
AscribeUserType(_39, o, UserTypeProjection { base: UserType(21), projs: [] });
_38 = _39;
StorageDead(_39);
StorageDead(_38);
StorageLive(_41);
StorageLive(_42);
_42 = &raw mut (*_3);
_41 = move _42 as *mut [i32] (Pointer(Unsize));
StorageDead(_42);
StorageDead(_41);
StorageLive(_43);
_43 = &raw mut (*_3);
FakeRead(ForLet(None), _43);
AscribeUserType(_43, o, UserTypeProjection { base: UserType(23), projs: [] });
StorageLive(_44);
_44 = &raw mut (*_3);
FakeRead(ForLet(None), _44);
AscribeUserType(_44, o, UserTypeProjection { base: UserType(25), projs: [] });
StorageLive(_45);
StorageLive(_46);
_46 = &raw mut (*_3);
_45 = move _46 as *mut dyn std::marker::Send (Pointer(Unsize));
StorageDead(_46);
FakeRead(ForLet(None), _45);
AscribeUserType(_45, o, UserTypeProjection { base: UserType(27), projs: [] });
StorageLive(_47);
StorageLive(_48);
_48 = &raw mut (*_3);
_47 = move _48 as *mut [i32] (Pointer(Unsize));
StorageDead(_48);
FakeRead(ForLet(None), _47);
AscribeUserType(_47, o, UserTypeProjection { base: UserType(29), projs: [] });
_0 = const ();
StorageDead(_47);
StorageDead(_45);
StorageDead(_44);
StorageDead(_43);
StorageDead(_33);
StorageDead(_31);
StorageDead(_30);
StorageDead(_29);
StorageDead(_19);
StorageDead(_17);
StorageDead(_16);
StorageDead(_15);
StorageDead(_4);
StorageDead(_3);
StorageDead(_2);
StorageDead(_1);
return;
}
}

View File

@ -1,47 +1,47 @@
// MIR for `borrow_and_cast` after SimplifyCfg-initial
fn borrow_and_cast(_1: i32) -> () {
debug x => _1; // in scope 0 at $DIR/address_of.rs:+0:20: +0:25
let mut _0: (); // return place in scope 0 at $DIR/address_of.rs:+0:32: +0:32
let _2: *const i32; // in scope 0 at $DIR/address_of.rs:+1:9: +1:10
let _3: &i32; // in scope 0 at $DIR/address_of.rs:+1:13: +1:15
let _5: &mut i32; // in scope 0 at $DIR/address_of.rs:+2:13: +2:19
let mut _7: &mut i32; // in scope 0 at $DIR/address_of.rs:+3:13: +3:19
debug x => _1;
let mut _0: ();
let _2: *const i32;
let _3: &i32;
let _5: &mut i32;
let mut _7: &mut i32;
scope 1 {
debug p => _2; // in scope 1 at $DIR/address_of.rs:+1:9: +1:10
let _4: *const i32; // in scope 1 at $DIR/address_of.rs:+2:9: +2:10
debug p => _2;
let _4: *const i32;
scope 2 {
debug q => _4; // in scope 2 at $DIR/address_of.rs:+2:9: +2:10
let _6: *mut i32; // in scope 2 at $DIR/address_of.rs:+3:9: +3:10
debug q => _4;
let _6: *mut i32;
scope 3 {
debug r => _6; // in scope 3 at $DIR/address_of.rs:+3:9: +3:10
debug r => _6;
}
}
}
bb0: {
StorageLive(_2); // scope 0 at $DIR/address_of.rs:+1:9: +1:10
StorageLive(_3); // scope 0 at $DIR/address_of.rs:+1:13: +1:15
_3 = &_1; // scope 0 at $DIR/address_of.rs:+1:13: +1:15
_2 = &raw const (*_3); // scope 0 at $DIR/address_of.rs:+1:13: +1:15
FakeRead(ForLet(None), _2); // scope 0 at $DIR/address_of.rs:+1:9: +1:10
StorageDead(_3); // scope 0 at $DIR/address_of.rs:+1:29: +1:30
StorageLive(_4); // scope 1 at $DIR/address_of.rs:+2:9: +2:10
StorageLive(_5); // scope 1 at $DIR/address_of.rs:+2:13: +2:19
_5 = &mut _1; // scope 1 at $DIR/address_of.rs:+2:13: +2:19
_4 = &raw const (*_5); // scope 1 at $DIR/address_of.rs:+2:13: +2:19
FakeRead(ForLet(None), _4); // scope 1 at $DIR/address_of.rs:+2:9: +2:10
StorageDead(_5); // scope 1 at $DIR/address_of.rs:+2:33: +2:34
StorageLive(_6); // scope 2 at $DIR/address_of.rs:+3:9: +3:10
StorageLive(_7); // scope 2 at $DIR/address_of.rs:+3:13: +3:19
_7 = &mut _1; // scope 2 at $DIR/address_of.rs:+3:13: +3:19
_6 = &raw mut (*_7); // scope 2 at $DIR/address_of.rs:+3:13: +3:19
FakeRead(ForLet(None), _6); // scope 2 at $DIR/address_of.rs:+3:9: +3:10
StorageDead(_7); // scope 2 at $DIR/address_of.rs:+3:31: +3:32
_0 = const (); // scope 0 at $DIR/address_of.rs:+0:32: +4:2
StorageDead(_6); // scope 2 at $DIR/address_of.rs:+4:1: +4:2
StorageDead(_4); // scope 1 at $DIR/address_of.rs:+4:1: +4:2
StorageDead(_2); // scope 0 at $DIR/address_of.rs:+4:1: +4:2
return; // scope 0 at $DIR/address_of.rs:+4:2: +4:2
StorageLive(_2);
StorageLive(_3);
_3 = &_1;
_2 = &raw const (*_3);
FakeRead(ForLet(None), _2);
StorageDead(_3);
StorageLive(_4);
StorageLive(_5);
_5 = &mut _1;
_4 = &raw const (*_5);
FakeRead(ForLet(None), _4);
StorageDead(_5);
StorageLive(_6);
StorageLive(_7);
_7 = &mut _1;
_6 = &raw mut (*_7);
FakeRead(ForLet(None), _6);
StorageDead(_7);
_0 = const ();
StorageDead(_6);
StorageDead(_4);
StorageDead(_2);
return;
}
}

View File

@ -1,22 +1,22 @@
// MIR for `main` after SimplifyCfg-elaborate-drops
fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/array_index_is_temporary.rs:+0:11: +0:11
let mut _1: [u32; 3]; // in scope 0 at $DIR/array_index_is_temporary.rs:+1:9: +1:14
let mut _4: &mut usize; // in scope 0 at $DIR/array_index_is_temporary.rs:+3:25: +3:31
let mut _5: u32; // in scope 0 at $DIR/array_index_is_temporary.rs:+4:12: +4:29
let mut _6: *mut usize; // in scope 0 at $DIR/array_index_is_temporary.rs:+4:25: +4:26
let _7: usize; // in scope 0 at $DIR/array_index_is_temporary.rs:+4:7: +4:8
let mut _8: usize; // in scope 0 at $DIR/array_index_is_temporary.rs:+4:5: +4:9
let mut _9: bool; // in scope 0 at $DIR/array_index_is_temporary.rs:+4:5: +4:9
let mut _0: ();
let mut _1: [u32; 3];
let mut _4: &mut usize;
let mut _5: u32;
let mut _6: *mut usize;
let _7: usize;
let mut _8: usize;
let mut _9: bool;
scope 1 {
debug x => _1; // in scope 1 at $DIR/array_index_is_temporary.rs:+1:9: +1:14
let mut _2: usize; // in scope 1 at $DIR/array_index_is_temporary.rs:+2:9: +2:14
debug x => _1;
let mut _2: usize;
scope 2 {
debug y => _2; // in scope 2 at $DIR/array_index_is_temporary.rs:+2:9: +2:14
let _3: *mut usize; // in scope 2 at $DIR/array_index_is_temporary.rs:+3:9: +3:10
debug y => _2;
let _3: *mut usize;
scope 3 {
debug z => _3; // in scope 3 at $DIR/array_index_is_temporary.rs:+3:9: +3:10
debug z => _3;
scope 4 {
}
}
@ -24,41 +24,38 @@ fn main() -> () {
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/array_index_is_temporary.rs:+1:9: +1:14
_1 = [const 42_u32, const 43_u32, const 44_u32]; // scope 0 at $DIR/array_index_is_temporary.rs:+1:17: +1:29
StorageLive(_2); // scope 1 at $DIR/array_index_is_temporary.rs:+2:9: +2:14
_2 = const 1_usize; // scope 1 at $DIR/array_index_is_temporary.rs:+2:17: +2:18
StorageLive(_3); // scope 2 at $DIR/array_index_is_temporary.rs:+3:9: +3:10
StorageLive(_4); // scope 2 at $DIR/array_index_is_temporary.rs:+3:25: +3:31
_4 = &mut _2; // scope 2 at $DIR/array_index_is_temporary.rs:+3:25: +3:31
_3 = &raw mut (*_4); // scope 2 at $DIR/array_index_is_temporary.rs:+3:25: +3:31
StorageDead(_4); // scope 2 at $DIR/array_index_is_temporary.rs:+3:31: +3:32
StorageLive(_5); // scope 3 at $DIR/array_index_is_temporary.rs:+4:12: +4:29
StorageLive(_6); // scope 4 at $DIR/array_index_is_temporary.rs:+4:25: +4:26
_6 = _3; // scope 4 at $DIR/array_index_is_temporary.rs:+4:25: +4:26
_5 = foo(move _6) -> [return: bb1, unwind unreachable]; // scope 4 at $DIR/array_index_is_temporary.rs:+4:21: +4:27
// mir::Constant
// + span: $DIR/array_index_is_temporary.rs:17:21: 17:24
// + literal: Const { ty: unsafe fn(*mut usize) -> u32 {foo}, val: Value(<ZST>) }
StorageLive(_1);
_1 = [const 42_u32, const 43_u32, const 44_u32];
StorageLive(_2);
_2 = const 1_usize;
StorageLive(_3);
StorageLive(_4);
_4 = &mut _2;
_3 = &raw mut (*_4);
StorageDead(_4);
StorageLive(_5);
StorageLive(_6);
_6 = _3;
_5 = foo(move _6) -> [return: bb1, unwind unreachable];
}
bb1: {
StorageDead(_6); // scope 4 at $DIR/array_index_is_temporary.rs:+4:26: +4:27
StorageLive(_7); // scope 3 at $DIR/array_index_is_temporary.rs:+4:7: +4:8
_7 = _2; // scope 3 at $DIR/array_index_is_temporary.rs:+4:7: +4:8
_8 = Len(_1); // scope 3 at $DIR/array_index_is_temporary.rs:+4:5: +4:9
_9 = Lt(_7, _8); // scope 3 at $DIR/array_index_is_temporary.rs:+4:5: +4:9
assert(move _9, "index out of bounds: the length is {} but the index is {}", move _8, _7) -> [success: bb2, unwind unreachable]; // scope 3 at $DIR/array_index_is_temporary.rs:+4:5: +4:9
StorageDead(_6);
StorageLive(_7);
_7 = _2;
_8 = Len(_1);
_9 = Lt(_7, _8);
assert(move _9, "index out of bounds: the length is {} but the index is {}", move _8, _7) -> [success: bb2, unwind unreachable];
}
bb2: {
_1[_7] = move _5; // scope 3 at $DIR/array_index_is_temporary.rs:+4:5: +4:29
StorageDead(_5); // scope 3 at $DIR/array_index_is_temporary.rs:+4:28: +4:29
StorageDead(_7); // scope 3 at $DIR/array_index_is_temporary.rs:+4:29: +4:30
_0 = const (); // scope 0 at $DIR/array_index_is_temporary.rs:+0:11: +5:2
StorageDead(_3); // scope 2 at $DIR/array_index_is_temporary.rs:+5:1: +5:2
StorageDead(_2); // scope 1 at $DIR/array_index_is_temporary.rs:+5:1: +5:2
StorageDead(_1); // scope 0 at $DIR/array_index_is_temporary.rs:+5:1: +5:2
return; // scope 0 at $DIR/array_index_is_temporary.rs:+5:2: +5:2
_1[_7] = move _5;
StorageDead(_5);
StorageDead(_7);
_0 = const ();
StorageDead(_3);
StorageDead(_2);
StorageDead(_1);
return;
}
}

View File

@ -1,22 +1,22 @@
// MIR for `main` after SimplifyCfg-elaborate-drops
fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/array_index_is_temporary.rs:+0:11: +0:11
let mut _1: [u32; 3]; // in scope 0 at $DIR/array_index_is_temporary.rs:+1:9: +1:14
let mut _4: &mut usize; // in scope 0 at $DIR/array_index_is_temporary.rs:+3:25: +3:31
let mut _5: u32; // in scope 0 at $DIR/array_index_is_temporary.rs:+4:12: +4:29
let mut _6: *mut usize; // in scope 0 at $DIR/array_index_is_temporary.rs:+4:25: +4:26
let _7: usize; // in scope 0 at $DIR/array_index_is_temporary.rs:+4:7: +4:8
let mut _8: usize; // in scope 0 at $DIR/array_index_is_temporary.rs:+4:5: +4:9
let mut _9: bool; // in scope 0 at $DIR/array_index_is_temporary.rs:+4:5: +4:9
let mut _0: ();
let mut _1: [u32; 3];
let mut _4: &mut usize;
let mut _5: u32;
let mut _6: *mut usize;
let _7: usize;
let mut _8: usize;
let mut _9: bool;
scope 1 {
debug x => _1; // in scope 1 at $DIR/array_index_is_temporary.rs:+1:9: +1:14
let mut _2: usize; // in scope 1 at $DIR/array_index_is_temporary.rs:+2:9: +2:14
debug x => _1;
let mut _2: usize;
scope 2 {
debug y => _2; // in scope 2 at $DIR/array_index_is_temporary.rs:+2:9: +2:14
let _3: *mut usize; // in scope 2 at $DIR/array_index_is_temporary.rs:+3:9: +3:10
debug y => _2;
let _3: *mut usize;
scope 3 {
debug z => _3; // in scope 3 at $DIR/array_index_is_temporary.rs:+3:9: +3:10
debug z => _3;
scope 4 {
}
}
@ -24,41 +24,38 @@ fn main() -> () {
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/array_index_is_temporary.rs:+1:9: +1:14
_1 = [const 42_u32, const 43_u32, const 44_u32]; // scope 0 at $DIR/array_index_is_temporary.rs:+1:17: +1:29
StorageLive(_2); // scope 1 at $DIR/array_index_is_temporary.rs:+2:9: +2:14
_2 = const 1_usize; // scope 1 at $DIR/array_index_is_temporary.rs:+2:17: +2:18
StorageLive(_3); // scope 2 at $DIR/array_index_is_temporary.rs:+3:9: +3:10
StorageLive(_4); // scope 2 at $DIR/array_index_is_temporary.rs:+3:25: +3:31
_4 = &mut _2; // scope 2 at $DIR/array_index_is_temporary.rs:+3:25: +3:31
_3 = &raw mut (*_4); // scope 2 at $DIR/array_index_is_temporary.rs:+3:25: +3:31
StorageDead(_4); // scope 2 at $DIR/array_index_is_temporary.rs:+3:31: +3:32
StorageLive(_5); // scope 3 at $DIR/array_index_is_temporary.rs:+4:12: +4:29
StorageLive(_6); // scope 4 at $DIR/array_index_is_temporary.rs:+4:25: +4:26
_6 = _3; // scope 4 at $DIR/array_index_is_temporary.rs:+4:25: +4:26
_5 = foo(move _6) -> bb1; // scope 4 at $DIR/array_index_is_temporary.rs:+4:21: +4:27
// mir::Constant
// + span: $DIR/array_index_is_temporary.rs:17:21: 17:24
// + literal: Const { ty: unsafe fn(*mut usize) -> u32 {foo}, val: Value(<ZST>) }
StorageLive(_1);
_1 = [const 42_u32, const 43_u32, const 44_u32];
StorageLive(_2);
_2 = const 1_usize;
StorageLive(_3);
StorageLive(_4);
_4 = &mut _2;
_3 = &raw mut (*_4);
StorageDead(_4);
StorageLive(_5);
StorageLive(_6);
_6 = _3;
_5 = foo(move _6) -> bb1;
}
bb1: {
StorageDead(_6); // scope 4 at $DIR/array_index_is_temporary.rs:+4:26: +4:27
StorageLive(_7); // scope 3 at $DIR/array_index_is_temporary.rs:+4:7: +4:8
_7 = _2; // scope 3 at $DIR/array_index_is_temporary.rs:+4:7: +4:8
_8 = Len(_1); // scope 3 at $DIR/array_index_is_temporary.rs:+4:5: +4:9
_9 = Lt(_7, _8); // scope 3 at $DIR/array_index_is_temporary.rs:+4:5: +4:9
assert(move _9, "index out of bounds: the length is {} but the index is {}", move _8, _7) -> bb2; // scope 3 at $DIR/array_index_is_temporary.rs:+4:5: +4:9
StorageDead(_6);
StorageLive(_7);
_7 = _2;
_8 = Len(_1);
_9 = Lt(_7, _8);
assert(move _9, "index out of bounds: the length is {} but the index is {}", move _8, _7) -> bb2;
}
bb2: {
_1[_7] = move _5; // scope 3 at $DIR/array_index_is_temporary.rs:+4:5: +4:29
StorageDead(_5); // scope 3 at $DIR/array_index_is_temporary.rs:+4:28: +4:29
StorageDead(_7); // scope 3 at $DIR/array_index_is_temporary.rs:+4:29: +4:30
_0 = const (); // scope 0 at $DIR/array_index_is_temporary.rs:+0:11: +5:2
StorageDead(_3); // scope 2 at $DIR/array_index_is_temporary.rs:+5:1: +5:2
StorageDead(_2); // scope 1 at $DIR/array_index_is_temporary.rs:+5:1: +5:2
StorageDead(_1); // scope 0 at $DIR/array_index_is_temporary.rs:+5:1: +5:2
return; // scope 0 at $DIR/array_index_is_temporary.rs:+5:2: +5:2
_1[_7] = move _5;
StorageDead(_5);
StorageDead(_7);
_0 = const ();
StorageDead(_3);
StorageDead(_2);
StorageDead(_1);
return;
}
}

View File

@ -1,20 +1,20 @@
// MIR for `main` after AbortUnwindingCalls
fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/asm_unwind_panic_abort.rs:+0:11: +0:11
let _1: (); // in scope 0 at $DIR/asm_unwind_panic_abort.rs:+2:9: +2:49
let mut _0: ();
let _1: ();
scope 1 {
}
bb0: {
StorageLive(_1); // scope 1 at $DIR/asm_unwind_panic_abort.rs:+2:9: +2:49
_1 = const (); // scope 1 at $DIR/asm_unwind_panic_abort.rs:+2:9: +2:49
asm!("", options(MAY_UNWIND)) -> [return: bb1, unwind terminate]; // scope 1 at $DIR/asm_unwind_panic_abort.rs:+2:9: +2:49
StorageLive(_1);
_1 = const ();
asm!("", options(MAY_UNWIND)) -> [return: bb1, unwind terminate];
}
bb1: {
StorageDead(_1); // scope 1 at $DIR/asm_unwind_panic_abort.rs:+2:48: +2:49
_0 = const (); // scope 1 at $DIR/asm_unwind_panic_abort.rs:+1:5: +3:6
return; // scope 0 at $DIR/asm_unwind_panic_abort.rs:+4:2: +4:2
StorageDead(_1);
_0 = const ();
return;
}
}

View File

@ -2,88 +2,88 @@
+ // MIR for `main` after ElaborateDrops
fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/basic_assignment.rs:+0:11: +0:11
let _1: bool; // in scope 0 at $DIR/basic_assignment.rs:+1:9: +1:17
let mut _3: bool; // in scope 0 at $DIR/basic_assignment.rs:+6:16: +6:24
let mut _6: std::option::Option<std::boxed::Box<u32>>; // in scope 0 at $DIR/basic_assignment.rs:+13:14: +13:20
let mut _0: ();
let _1: bool;
let mut _3: bool;
let mut _6: std::option::Option<std::boxed::Box<u32>>;
scope 1 {
debug nodrop_x => _1; // in scope 1 at $DIR/basic_assignment.rs:+1:9: +1:17
let _2: bool; // in scope 1 at $DIR/basic_assignment.rs:+2:9: +2:17
debug nodrop_x => _1;
let _2: bool;
scope 2 {
debug nodrop_y => _2; // in scope 2 at $DIR/basic_assignment.rs:+2:9: +2:17
let _4: std::option::Option<std::boxed::Box<u32>>; // in scope 2 at $DIR/basic_assignment.rs:+8:9: +8:15
debug nodrop_y => _2;
let _4: std::option::Option<std::boxed::Box<u32>>;
scope 3 {
debug drop_x => _4; // in scope 3 at $DIR/basic_assignment.rs:+8:9: +8:15
let _5: std::option::Option<std::boxed::Box<u32>>; // in scope 3 at $DIR/basic_assignment.rs:+9:9: +9:15
debug drop_x => _4;
let _5: std::option::Option<std::boxed::Box<u32>>;
scope 4 {
debug drop_y => _5; // in scope 4 at $DIR/basic_assignment.rs:+9:9: +9:15
debug drop_y => _5;
}
}
}
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/basic_assignment.rs:+1:9: +1:17
_1 = const false; // scope 0 at $DIR/basic_assignment.rs:+1:20: +1:25
StorageLive(_2); // scope 1 at $DIR/basic_assignment.rs:+2:9: +2:17
StorageLive(_3); // scope 2 at $DIR/basic_assignment.rs:+6:16: +6:24
_3 = _1; // scope 2 at $DIR/basic_assignment.rs:+6:16: +6:24
_2 = move _3; // scope 2 at $DIR/basic_assignment.rs:+6:5: +6:24
StorageDead(_3); // scope 2 at $DIR/basic_assignment.rs:+6:23: +6:24
StorageLive(_4); // scope 2 at $DIR/basic_assignment.rs:+8:9: +8:15
_4 = Option::<Box<u32>>::None; // scope 2 at $DIR/basic_assignment.rs:+8:36: +8:40
StorageLive(_5); // scope 3 at $DIR/basic_assignment.rs:+9:9: +9:15
StorageLive(_6); // scope 4 at $DIR/basic_assignment.rs:+13:14: +13:20
_6 = move _4; // scope 4 at $DIR/basic_assignment.rs:+13:14: +13:20
- drop(_5) -> [return: bb1, unwind: bb2]; // scope 4 at $DIR/basic_assignment.rs:+13:5: +13:11
+ goto -> bb1; // scope 4 at $DIR/basic_assignment.rs:+13:5: +13:11
StorageLive(_1);
_1 = const false;
StorageLive(_2);
StorageLive(_3);
_3 = _1;
_2 = move _3;
StorageDead(_3);
StorageLive(_4);
_4 = Option::<Box<u32>>::None;
StorageLive(_5);
StorageLive(_6);
_6 = move _4;
- drop(_5) -> [return: bb1, unwind: bb2];
+ goto -> bb1;
}
bb1: {
_5 = move _6; // scope 4 at $DIR/basic_assignment.rs:+13:5: +13:11
- drop(_6) -> [return: bb3, unwind: bb6]; // scope 4 at $DIR/basic_assignment.rs:+13:19: +13:20
+ goto -> bb3; // scope 4 at $DIR/basic_assignment.rs:+13:19: +13:20
_5 = move _6;
- drop(_6) -> [return: bb3, unwind: bb6];
+ goto -> bb3;
}
bb2 (cleanup): {
_5 = move _6; // scope 4 at $DIR/basic_assignment.rs:+13:5: +13:11
drop(_6) -> [return: bb6, unwind terminate]; // scope 4 at $DIR/basic_assignment.rs:+13:19: +13:20
_5 = move _6;
drop(_6) -> [return: bb6, unwind terminate];
}
bb3: {
StorageDead(_6); // scope 4 at $DIR/basic_assignment.rs:+13:19: +13:20
_0 = const (); // scope 0 at $DIR/basic_assignment.rs:+0:11: +14:2
drop(_5) -> [return: bb4, unwind: bb7]; // scope 3 at $DIR/basic_assignment.rs:+14:1: +14:2
StorageDead(_6);
_0 = const ();
drop(_5) -> [return: bb4, unwind: bb7];
}
bb4: {
StorageDead(_5); // scope 3 at $DIR/basic_assignment.rs:+14:1: +14:2
- drop(_4) -> bb5; // scope 2 at $DIR/basic_assignment.rs:+14:1: +14:2
+ goto -> bb5; // scope 2 at $DIR/basic_assignment.rs:+14:1: +14:2
StorageDead(_5);
- drop(_4) -> bb5;
+ goto -> bb5;
}
bb5: {
StorageDead(_4); // scope 2 at $DIR/basic_assignment.rs:+14:1: +14:2
StorageDead(_2); // scope 1 at $DIR/basic_assignment.rs:+14:1: +14:2
StorageDead(_1); // scope 0 at $DIR/basic_assignment.rs:+14:1: +14:2
return; // scope 0 at $DIR/basic_assignment.rs:+14:2: +14:2
StorageDead(_4);
StorageDead(_2);
StorageDead(_1);
return;
}
bb6 (cleanup): {
drop(_5) -> [return: bb7, unwind terminate]; // scope 3 at $DIR/basic_assignment.rs:+14:1: +14:2
drop(_5) -> [return: bb7, unwind terminate];
}
bb7 (cleanup): {
- drop(_4) -> [return: bb8, unwind terminate]; // scope 2 at $DIR/basic_assignment.rs:+14:1: +14:2
+ goto -> bb8; // scope 2 at $DIR/basic_assignment.rs:+14:1: +14:2
- drop(_4) -> [return: bb8, unwind terminate];
+ goto -> bb8;
}
bb8 (cleanup): {
resume; // scope 0 at $DIR/basic_assignment.rs:+0:1: +14:2
resume;
+ }
+
+ bb9 (cleanup): {
+ unreachable; // scope 0 at $DIR/basic_assignment.rs:+0:1: +14:2
+ unreachable;
}
}

View File

@ -5,82 +5,82 @@
| 1: user_ty: Canonical { value: Ty(std::option::Option<std::boxed::Box<u32>>), max_universe: U0, variables: [] }, span: $DIR/basic_assignment.rs:20:17: 20:33, inferred_ty: std::option::Option<std::boxed::Box<u32>>
|
fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/basic_assignment.rs:+0:11: +0:11
let _1: bool; // in scope 0 at $DIR/basic_assignment.rs:+1:9: +1:17
let mut _3: bool; // in scope 0 at $DIR/basic_assignment.rs:+6:16: +6:24
let mut _6: std::option::Option<std::boxed::Box<u32>>; // in scope 0 at $DIR/basic_assignment.rs:+13:14: +13:20
let mut _0: ();
let _1: bool;
let mut _3: bool;
let mut _6: std::option::Option<std::boxed::Box<u32>>;
scope 1 {
debug nodrop_x => _1; // in scope 1 at $DIR/basic_assignment.rs:+1:9: +1:17
let _2: bool; // in scope 1 at $DIR/basic_assignment.rs:+2:9: +2:17
debug nodrop_x => _1;
let _2: bool;
scope 2 {
debug nodrop_y => _2; // in scope 2 at $DIR/basic_assignment.rs:+2:9: +2:17
let _4: std::option::Option<std::boxed::Box<u32>> as UserTypeProjection { base: UserType(0), projs: [] }; // in scope 2 at $DIR/basic_assignment.rs:+8:9: +8:15
debug nodrop_y => _2;
let _4: std::option::Option<std::boxed::Box<u32>> as UserTypeProjection { base: UserType(0), projs: [] };
scope 3 {
debug drop_x => _4; // in scope 3 at $DIR/basic_assignment.rs:+8:9: +8:15
let _5: std::option::Option<std::boxed::Box<u32>>; // in scope 3 at $DIR/basic_assignment.rs:+9:9: +9:15
debug drop_x => _4;
let _5: std::option::Option<std::boxed::Box<u32>>;
scope 4 {
debug drop_y => _5; // in scope 4 at $DIR/basic_assignment.rs:+9:9: +9:15
debug drop_y => _5;
}
}
}
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/basic_assignment.rs:+1:9: +1:17
_1 = const false; // scope 0 at $DIR/basic_assignment.rs:+1:20: +1:25
FakeRead(ForLet(None), _1); // scope 0 at $DIR/basic_assignment.rs:+1:9: +1:17
StorageLive(_2); // scope 1 at $DIR/basic_assignment.rs:+2:9: +2:17
StorageLive(_3); // scope 2 at $DIR/basic_assignment.rs:+6:16: +6:24
_3 = _1; // scope 2 at $DIR/basic_assignment.rs:+6:16: +6:24
_2 = move _3; // scope 2 at $DIR/basic_assignment.rs:+6:5: +6:24
StorageDead(_3); // scope 2 at $DIR/basic_assignment.rs:+6:23: +6:24
StorageLive(_4); // scope 2 at $DIR/basic_assignment.rs:+8:9: +8:15
_4 = Option::<Box<u32>>::None; // scope 2 at $DIR/basic_assignment.rs:+8:36: +8:40
FakeRead(ForLet(None), _4); // scope 2 at $DIR/basic_assignment.rs:+8:9: +8:15
AscribeUserType(_4, o, UserTypeProjection { base: UserType(1), projs: [] }); // scope 2 at $DIR/basic_assignment.rs:+8:17: +8:33
StorageLive(_5); // scope 3 at $DIR/basic_assignment.rs:+9:9: +9:15
StorageLive(_6); // scope 4 at $DIR/basic_assignment.rs:+13:14: +13:20
_6 = move _4; // scope 4 at $DIR/basic_assignment.rs:+13:14: +13:20
drop(_5) -> [return: bb1, unwind: bb2]; // scope 4 at $DIR/basic_assignment.rs:+13:5: +13:11
StorageLive(_1);
_1 = const false;
FakeRead(ForLet(None), _1);
StorageLive(_2);
StorageLive(_3);
_3 = _1;
_2 = move _3;
StorageDead(_3);
StorageLive(_4);
_4 = Option::<Box<u32>>::None;
FakeRead(ForLet(None), _4);
AscribeUserType(_4, o, UserTypeProjection { base: UserType(1), projs: [] });
StorageLive(_5);
StorageLive(_6);
_6 = move _4;
drop(_5) -> [return: bb1, unwind: bb2];
}
bb1: {
_5 = move _6; // scope 4 at $DIR/basic_assignment.rs:+13:5: +13:11
drop(_6) -> [return: bb3, unwind: bb6]; // scope 4 at $DIR/basic_assignment.rs:+13:19: +13:20
_5 = move _6;
drop(_6) -> [return: bb3, unwind: bb6];
}
bb2 (cleanup): {
_5 = move _6; // scope 4 at $DIR/basic_assignment.rs:+13:5: +13:11
drop(_6) -> [return: bb6, unwind terminate]; // scope 4 at $DIR/basic_assignment.rs:+13:19: +13:20
_5 = move _6;
drop(_6) -> [return: bb6, unwind terminate];
}
bb3: {
StorageDead(_6); // scope 4 at $DIR/basic_assignment.rs:+13:19: +13:20
_0 = const (); // scope 0 at $DIR/basic_assignment.rs:+0:11: +14:2
drop(_5) -> [return: bb4, unwind: bb7]; // scope 3 at $DIR/basic_assignment.rs:+14:1: +14:2
StorageDead(_6);
_0 = const ();
drop(_5) -> [return: bb4, unwind: bb7];
}
bb4: {
StorageDead(_5); // scope 3 at $DIR/basic_assignment.rs:+14:1: +14:2
drop(_4) -> [return: bb5, unwind: bb8]; // scope 2 at $DIR/basic_assignment.rs:+14:1: +14:2
StorageDead(_5);
drop(_4) -> [return: bb5, unwind: bb8];
}
bb5: {
StorageDead(_4); // scope 2 at $DIR/basic_assignment.rs:+14:1: +14:2
StorageDead(_2); // scope 1 at $DIR/basic_assignment.rs:+14:1: +14:2
StorageDead(_1); // scope 0 at $DIR/basic_assignment.rs:+14:1: +14:2
return; // scope 0 at $DIR/basic_assignment.rs:+14:2: +14:2
StorageDead(_4);
StorageDead(_2);
StorageDead(_1);
return;
}
bb6 (cleanup): {
drop(_5) -> [return: bb7, unwind terminate]; // scope 3 at $DIR/basic_assignment.rs:+14:1: +14:2
drop(_5) -> [return: bb7, unwind terminate];
}
bb7 (cleanup): {
drop(_4) -> [return: bb8, unwind terminate]; // scope 2 at $DIR/basic_assignment.rs:+14:1: +14:2
drop(_4) -> [return: bb8, unwind terminate];
}
bb8 (cleanup): {
resume; // scope 0 at $DIR/basic_assignment.rs:+0:1: +14:2
resume;
}
}

View File

@ -2,34 +2,34 @@
+ // MIR for `opt1` after InstSimplify
fn opt1(_1: bool) -> u32 {
debug x => _1; // in scope 0 at $DIR/bool_compare.rs:+0:9: +0:10
let mut _0: u32; // return place in scope 0 at $DIR/bool_compare.rs:+0:21: +0:24
let mut _2: bool; // in scope 0 at $DIR/bool_compare.rs:+1:8: +1:17
let mut _3: bool; // in scope 0 at $DIR/bool_compare.rs:+1:8: +1:9
debug x => _1;
let mut _0: u32;
let mut _2: bool;
let mut _3: bool;
bb0: {
StorageLive(_2); // scope 0 at $DIR/bool_compare.rs:+1:8: +1:17
StorageLive(_3); // scope 0 at $DIR/bool_compare.rs:+1:8: +1:9
_3 = _1; // scope 0 at $DIR/bool_compare.rs:+1:8: +1:9
- _2 = Ne(move _3, const true); // scope 0 at $DIR/bool_compare.rs:+1:8: +1:17
+ _2 = Not(move _3); // scope 0 at $DIR/bool_compare.rs:+1:8: +1:17
StorageDead(_3); // scope 0 at $DIR/bool_compare.rs:+1:16: +1:17
switchInt(move _2) -> [0: bb2, otherwise: bb1]; // scope 0 at $DIR/bool_compare.rs:+1:8: +1:17
StorageLive(_2);
StorageLive(_3);
_3 = _1;
- _2 = Ne(move _3, const true);
+ _2 = Not(move _3);
StorageDead(_3);
switchInt(move _2) -> [0: bb2, otherwise: bb1];
}
bb1: {
_0 = const 0_u32; // scope 0 at $DIR/bool_compare.rs:+1:20: +1:21
goto -> bb3; // scope 0 at $DIR/bool_compare.rs:+1:5: +1:34
_0 = const 0_u32;
goto -> bb3;
}
bb2: {
_0 = const 1_u32; // scope 0 at $DIR/bool_compare.rs:+1:31: +1:32
goto -> bb3; // scope 0 at $DIR/bool_compare.rs:+1:5: +1:34
_0 = const 1_u32;
goto -> bb3;
}
bb3: {
StorageDead(_2); // scope 0 at $DIR/bool_compare.rs:+1:33: +1:34
return; // scope 0 at $DIR/bool_compare.rs:+2:2: +2:2
StorageDead(_2);
return;
}
}

View File

@ -2,34 +2,34 @@
+ // MIR for `opt2` after InstSimplify
fn opt2(_1: bool) -> u32 {
debug x => _1; // in scope 0 at $DIR/bool_compare.rs:+0:9: +0:10
let mut _0: u32; // return place in scope 0 at $DIR/bool_compare.rs:+0:21: +0:24
let mut _2: bool; // in scope 0 at $DIR/bool_compare.rs:+1:8: +1:17
let mut _3: bool; // in scope 0 at $DIR/bool_compare.rs:+1:16: +1:17
debug x => _1;
let mut _0: u32;
let mut _2: bool;
let mut _3: bool;
bb0: {
StorageLive(_2); // scope 0 at $DIR/bool_compare.rs:+1:8: +1:17
StorageLive(_3); // scope 0 at $DIR/bool_compare.rs:+1:16: +1:17
_3 = _1; // scope 0 at $DIR/bool_compare.rs:+1:16: +1:17
- _2 = Ne(const true, move _3); // scope 0 at $DIR/bool_compare.rs:+1:8: +1:17
+ _2 = Not(move _3); // scope 0 at $DIR/bool_compare.rs:+1:8: +1:17
StorageDead(_3); // scope 0 at $DIR/bool_compare.rs:+1:16: +1:17
switchInt(move _2) -> [0: bb2, otherwise: bb1]; // scope 0 at $DIR/bool_compare.rs:+1:8: +1:17
StorageLive(_2);
StorageLive(_3);
_3 = _1;
- _2 = Ne(const true, move _3);
+ _2 = Not(move _3);
StorageDead(_3);
switchInt(move _2) -> [0: bb2, otherwise: bb1];
}
bb1: {
_0 = const 0_u32; // scope 0 at $DIR/bool_compare.rs:+1:20: +1:21
goto -> bb3; // scope 0 at $DIR/bool_compare.rs:+1:5: +1:34
_0 = const 0_u32;
goto -> bb3;
}
bb2: {
_0 = const 1_u32; // scope 0 at $DIR/bool_compare.rs:+1:31: +1:32
goto -> bb3; // scope 0 at $DIR/bool_compare.rs:+1:5: +1:34
_0 = const 1_u32;
goto -> bb3;
}
bb3: {
StorageDead(_2); // scope 0 at $DIR/bool_compare.rs:+1:33: +1:34
return; // scope 0 at $DIR/bool_compare.rs:+2:2: +2:2
StorageDead(_2);
return;
}
}

View File

@ -2,34 +2,34 @@
+ // MIR for `opt3` after InstSimplify
fn opt3(_1: bool) -> u32 {
debug x => _1; // in scope 0 at $DIR/bool_compare.rs:+0:9: +0:10
let mut _0: u32; // return place in scope 0 at $DIR/bool_compare.rs:+0:21: +0:24
let mut _2: bool; // in scope 0 at $DIR/bool_compare.rs:+1:8: +1:18
let mut _3: bool; // in scope 0 at $DIR/bool_compare.rs:+1:8: +1:9
debug x => _1;
let mut _0: u32;
let mut _2: bool;
let mut _3: bool;
bb0: {
StorageLive(_2); // scope 0 at $DIR/bool_compare.rs:+1:8: +1:18
StorageLive(_3); // scope 0 at $DIR/bool_compare.rs:+1:8: +1:9
_3 = _1; // scope 0 at $DIR/bool_compare.rs:+1:8: +1:9
- _2 = Eq(move _3, const false); // scope 0 at $DIR/bool_compare.rs:+1:8: +1:18
+ _2 = Not(move _3); // scope 0 at $DIR/bool_compare.rs:+1:8: +1:18
StorageDead(_3); // scope 0 at $DIR/bool_compare.rs:+1:17: +1:18
switchInt(move _2) -> [0: bb2, otherwise: bb1]; // scope 0 at $DIR/bool_compare.rs:+1:8: +1:18
StorageLive(_2);
StorageLive(_3);
_3 = _1;
- _2 = Eq(move _3, const false);
+ _2 = Not(move _3);
StorageDead(_3);
switchInt(move _2) -> [0: bb2, otherwise: bb1];
}
bb1: {
_0 = const 0_u32; // scope 0 at $DIR/bool_compare.rs:+1:21: +1:22
goto -> bb3; // scope 0 at $DIR/bool_compare.rs:+1:5: +1:35
_0 = const 0_u32;
goto -> bb3;
}
bb2: {
_0 = const 1_u32; // scope 0 at $DIR/bool_compare.rs:+1:32: +1:33
goto -> bb3; // scope 0 at $DIR/bool_compare.rs:+1:5: +1:35
_0 = const 1_u32;
goto -> bb3;
}
bb3: {
StorageDead(_2); // scope 0 at $DIR/bool_compare.rs:+1:34: +1:35
return; // scope 0 at $DIR/bool_compare.rs:+2:2: +2:2
StorageDead(_2);
return;
}
}

View File

@ -2,34 +2,34 @@
+ // MIR for `opt4` after InstSimplify
fn opt4(_1: bool) -> u32 {
debug x => _1; // in scope 0 at $DIR/bool_compare.rs:+0:9: +0:10
let mut _0: u32; // return place in scope 0 at $DIR/bool_compare.rs:+0:21: +0:24
let mut _2: bool; // in scope 0 at $DIR/bool_compare.rs:+1:8: +1:18
let mut _3: bool; // in scope 0 at $DIR/bool_compare.rs:+1:17: +1:18
debug x => _1;
let mut _0: u32;
let mut _2: bool;
let mut _3: bool;
bb0: {
StorageLive(_2); // scope 0 at $DIR/bool_compare.rs:+1:8: +1:18
StorageLive(_3); // scope 0 at $DIR/bool_compare.rs:+1:17: +1:18
_3 = _1; // scope 0 at $DIR/bool_compare.rs:+1:17: +1:18
- _2 = Eq(const false, move _3); // scope 0 at $DIR/bool_compare.rs:+1:8: +1:18
+ _2 = Not(move _3); // scope 0 at $DIR/bool_compare.rs:+1:8: +1:18
StorageDead(_3); // scope 0 at $DIR/bool_compare.rs:+1:17: +1:18
switchInt(move _2) -> [0: bb2, otherwise: bb1]; // scope 0 at $DIR/bool_compare.rs:+1:8: +1:18
StorageLive(_2);
StorageLive(_3);
_3 = _1;
- _2 = Eq(const false, move _3);
+ _2 = Not(move _3);
StorageDead(_3);
switchInt(move _2) -> [0: bb2, otherwise: bb1];
}
bb1: {
_0 = const 0_u32; // scope 0 at $DIR/bool_compare.rs:+1:21: +1:22
goto -> bb3; // scope 0 at $DIR/bool_compare.rs:+1:5: +1:35
_0 = const 0_u32;
goto -> bb3;
}
bb2: {
_0 = const 1_u32; // scope 0 at $DIR/bool_compare.rs:+1:32: +1:33
goto -> bb3; // scope 0 at $DIR/bool_compare.rs:+1:5: +1:35
_0 = const 1_u32;
goto -> bb3;
}
bb3: {
StorageDead(_2); // scope 0 at $DIR/bool_compare.rs:+1:34: +1:35
return; // scope 0 at $DIR/bool_compare.rs:+2:2: +2:2
StorageDead(_2);
return;
}
}

View File

@ -1,80 +1,71 @@
// MIR for `main` before ElaborateDrops
fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/box_expr.rs:+0:11: +0:11
let _1: std::boxed::Box<S>; // in scope 0 at $DIR/box_expr.rs:+1:9: +1:10
let mut _2: usize; // in scope 0 at $DIR/box_expr.rs:+2:5: +2:23
let mut _3: usize; // in scope 0 at $DIR/box_expr.rs:+2:5: +2:23
let mut _4: *mut u8; // in scope 0 at $DIR/box_expr.rs:+2:5: +2:23
let mut _5: std::boxed::Box<S>; // in scope 0 at $DIR/box_expr.rs:+2:5: +2:23
let _6: (); // in scope 0 at $DIR/box_expr.rs:+3:5: +3:12
let mut _7: std::boxed::Box<S>; // in scope 0 at $DIR/box_expr.rs:+3:10: +3:11
let mut _0: ();
let _1: std::boxed::Box<S>;
let mut _2: usize;
let mut _3: usize;
let mut _4: *mut u8;
let mut _5: std::boxed::Box<S>;
let _6: ();
let mut _7: std::boxed::Box<S>;
scope 1 {
debug x => _1; // in scope 1 at $DIR/box_expr.rs:+1:9: +1:10
debug x => _1;
}
scope 2 {
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/box_expr.rs:+1:9: +1:10
_2 = SizeOf(S); // scope 2 at $DIR/box_expr.rs:+2:5: +2:23
_3 = AlignOf(S); // scope 2 at $DIR/box_expr.rs:+2:5: +2:23
_4 = alloc::alloc::exchange_malloc(move _2, move _3) -> [return: bb1, unwind: bb9]; // scope 2 at $DIR/box_expr.rs:+2:5: +2:23
// mir::Constant
// + span: $DIR/box_expr.rs:8:5: 8:23
// + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value(<ZST>) }
StorageLive(_1);
_2 = SizeOf(S);
_3 = AlignOf(S);
_4 = alloc::alloc::exchange_malloc(move _2, move _3) -> [return: bb1, unwind: bb9];
}
bb1: {
StorageLive(_5); // scope 0 at $DIR/box_expr.rs:+2:5: +2:23
_5 = ShallowInitBox(move _4, S); // scope 0 at $DIR/box_expr.rs:+2:5: +2:23
(*_5) = S::new() -> [return: bb2, unwind: bb8]; // scope 0 at $DIR/box_expr.rs:+2:14: +2:22
// mir::Constant
// + span: $DIR/box_expr.rs:8:14: 8:20
// + literal: Const { ty: fn() -> S {S::new}, val: Value(<ZST>) }
StorageLive(_5);
_5 = ShallowInitBox(move _4, S);
(*_5) = S::new() -> [return: bb2, unwind: bb8];
}
bb2: {
_1 = move _5; // scope 0 at $DIR/box_expr.rs:+2:5: +2:23
drop(_5) -> [return: bb3, unwind: bb9]; // scope 0 at $DIR/box_expr.rs:+2:22: +2:23
_1 = move _5;
drop(_5) -> [return: bb3, unwind: bb9];
}
bb3: {
StorageDead(_5); // scope 0 at $DIR/box_expr.rs:+2:22: +2:23
StorageLive(_6); // scope 1 at $DIR/box_expr.rs:+3:5: +3:12
StorageLive(_7); // scope 1 at $DIR/box_expr.rs:+3:10: +3:11
_7 = move _1; // scope 1 at $DIR/box_expr.rs:+3:10: +3:11
_6 = std::mem::drop::<Box<S>>(move _7) -> [return: bb4, unwind: bb6]; // scope 1 at $DIR/box_expr.rs:+3:5: +3:12
// mir::Constant
// + span: $DIR/box_expr.rs:9:5: 9:9
// + literal: Const { ty: fn(Box<S>) {std::mem::drop::<Box<S>>}, val: Value(<ZST>) }
StorageDead(_5);
StorageLive(_6);
StorageLive(_7);
_7 = move _1;
_6 = std::mem::drop::<Box<S>>(move _7) -> [return: bb4, unwind: bb6];
}
bb4: {
StorageDead(_7); // scope 1 at $DIR/box_expr.rs:+3:11: +3:12
StorageDead(_6); // scope 1 at $DIR/box_expr.rs:+3:12: +3:13
_0 = const (); // scope 0 at $DIR/box_expr.rs:+0:11: +4:2
drop(_1) -> [return: bb5, unwind: bb9]; // scope 0 at $DIR/box_expr.rs:+4:1: +4:2
StorageDead(_7);
StorageDead(_6);
_0 = const ();
drop(_1) -> [return: bb5, unwind: bb9];
}
bb5: {
StorageDead(_1); // scope 0 at $DIR/box_expr.rs:+4:1: +4:2
return; // scope 0 at $DIR/box_expr.rs:+4:2: +4:2
StorageDead(_1);
return;
}
bb6 (cleanup): {
drop(_7) -> [return: bb7, unwind terminate]; // scope 1 at $DIR/box_expr.rs:+3:11: +3:12
drop(_7) -> [return: bb7, unwind terminate];
}
bb7 (cleanup): {
drop(_1) -> [return: bb9, unwind terminate]; // scope 0 at $DIR/box_expr.rs:+4:1: +4:2
drop(_1) -> [return: bb9, unwind terminate];
}
bb8 (cleanup): {
drop(_5) -> [return: bb9, unwind terminate]; // scope 0 at $DIR/box_expr.rs:+2:22: +2:23
drop(_5) -> [return: bb9, unwind terminate];
}
bb9 (cleanup): {
resume; // scope 0 at $DIR/box_expr.rs:+0:1: +4:2
resume;
}
}

View File

@ -1,80 +1,71 @@
// MIR for `main` before ElaborateDrops
fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/box_expr.rs:+0:11: +0:11
let _1: std::boxed::Box<S>; // in scope 0 at $DIR/box_expr.rs:+1:9: +1:10
let mut _2: usize; // in scope 0 at $DIR/box_expr.rs:+2:5: +2:23
let mut _3: usize; // in scope 0 at $DIR/box_expr.rs:+2:5: +2:23
let mut _4: *mut u8; // in scope 0 at $DIR/box_expr.rs:+2:5: +2:23
let mut _5: std::boxed::Box<S>; // in scope 0 at $DIR/box_expr.rs:+2:5: +2:23
let _6: (); // in scope 0 at $DIR/box_expr.rs:+3:5: +3:12
let mut _7: std::boxed::Box<S>; // in scope 0 at $DIR/box_expr.rs:+3:10: +3:11
let mut _0: ();
let _1: std::boxed::Box<S>;
let mut _2: usize;
let mut _3: usize;
let mut _4: *mut u8;
let mut _5: std::boxed::Box<S>;
let _6: ();
let mut _7: std::boxed::Box<S>;
scope 1 {
debug x => _1; // in scope 1 at $DIR/box_expr.rs:+1:9: +1:10
debug x => _1;
}
scope 2 {
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/box_expr.rs:+1:9: +1:10
_2 = SizeOf(S); // scope 2 at $DIR/box_expr.rs:+2:5: +2:23
_3 = AlignOf(S); // scope 2 at $DIR/box_expr.rs:+2:5: +2:23
_4 = alloc::alloc::exchange_malloc(move _2, move _3) -> bb1; // scope 2 at $DIR/box_expr.rs:+2:5: +2:23
// mir::Constant
// + span: $DIR/box_expr.rs:8:5: 8:23
// + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value(<ZST>) }
StorageLive(_1);
_2 = SizeOf(S);
_3 = AlignOf(S);
_4 = alloc::alloc::exchange_malloc(move _2, move _3) -> bb1;
}
bb1: {
StorageLive(_5); // scope 0 at $DIR/box_expr.rs:+2:5: +2:23
_5 = ShallowInitBox(move _4, S); // scope 0 at $DIR/box_expr.rs:+2:5: +2:23
(*_5) = S::new() -> [return: bb2, unwind: bb8]; // scope 0 at $DIR/box_expr.rs:+2:14: +2:22
// mir::Constant
// + span: $DIR/box_expr.rs:8:14: 8:20
// + literal: Const { ty: fn() -> S {S::new}, val: Value(<ZST>) }
StorageLive(_5);
_5 = ShallowInitBox(move _4, S);
(*_5) = S::new() -> [return: bb2, unwind: bb8];
}
bb2: {
_1 = move _5; // scope 0 at $DIR/box_expr.rs:+2:5: +2:23
drop(_5) -> bb3; // scope 0 at $DIR/box_expr.rs:+2:22: +2:23
_1 = move _5;
drop(_5) -> bb3;
}
bb3: {
StorageDead(_5); // scope 0 at $DIR/box_expr.rs:+2:22: +2:23
StorageLive(_6); // scope 1 at $DIR/box_expr.rs:+3:5: +3:12
StorageLive(_7); // scope 1 at $DIR/box_expr.rs:+3:10: +3:11
_7 = move _1; // scope 1 at $DIR/box_expr.rs:+3:10: +3:11
_6 = std::mem::drop::<Box<S>>(move _7) -> [return: bb4, unwind: bb6]; // scope 1 at $DIR/box_expr.rs:+3:5: +3:12
// mir::Constant
// + span: $DIR/box_expr.rs:9:5: 9:9
// + literal: Const { ty: fn(Box<S>) {std::mem::drop::<Box<S>>}, val: Value(<ZST>) }
StorageDead(_5);
StorageLive(_6);
StorageLive(_7);
_7 = move _1;
_6 = std::mem::drop::<Box<S>>(move _7) -> [return: bb4, unwind: bb6];
}
bb4: {
StorageDead(_7); // scope 1 at $DIR/box_expr.rs:+3:11: +3:12
StorageDead(_6); // scope 1 at $DIR/box_expr.rs:+3:12: +3:13
_0 = const (); // scope 0 at $DIR/box_expr.rs:+0:11: +4:2
drop(_1) -> bb5; // scope 0 at $DIR/box_expr.rs:+4:1: +4:2
StorageDead(_7);
StorageDead(_6);
_0 = const ();
drop(_1) -> bb5;
}
bb5: {
StorageDead(_1); // scope 0 at $DIR/box_expr.rs:+4:1: +4:2
return; // scope 0 at $DIR/box_expr.rs:+4:2: +4:2
StorageDead(_1);
return;
}
bb6 (cleanup): {
drop(_7) -> [return: bb7, unwind terminate]; // scope 1 at $DIR/box_expr.rs:+3:11: +3:12
drop(_7) -> [return: bb7, unwind terminate];
}
bb7 (cleanup): {
drop(_1) -> [return: bb9, unwind terminate]; // scope 0 at $DIR/box_expr.rs:+4:1: +4:2
drop(_1) -> [return: bb9, unwind terminate];
}
bb8 (cleanup): {
drop(_5) -> [return: bb9, unwind terminate]; // scope 0 at $DIR/box_expr.rs:+2:22: +2:23
drop(_5) -> [return: bb9, unwind terminate];
}
bb9 (cleanup): {
resume; // scope 0 at $DIR/box_expr.rs:+0:1: +4:2
resume;
}
}

View File

@ -10,30 +10,30 @@
} */
fn a::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:11:14: 11:16]>, _2: &mut Context<'_>) -> Poll<()> {
debug _task_context => _4; // in scope 0 at $DIR/async_await.rs:+0:14: +0:16
let mut _0: std::task::Poll<()>; // return place in scope 0 at $DIR/async_await.rs:+0:14: +0:16
let mut _3: (); // in scope 0 at $DIR/async_await.rs:+0:14: +0:16
let mut _4: &mut std::task::Context<'_>; // in scope 0 at $DIR/async_await.rs:+0:14: +0:16
let mut _5: u32; // in scope 0 at $DIR/async_await.rs:+0:14: +0:16
debug _task_context => _4;
let mut _0: std::task::Poll<()>;
let mut _3: ();
let mut _4: &mut std::task::Context<'_>;
let mut _5: u32;
bb0: {
_5 = discriminant((*(_1.0: &mut [async fn body@$DIR/async_await.rs:11:14: 11:16]))); // scope 0 at $DIR/async_await.rs:+0:14: +0:16
switchInt(move _5) -> [0: bb1, 1: bb2, otherwise: bb3]; // scope 0 at $DIR/async_await.rs:+0:14: +0:16
_5 = discriminant((*(_1.0: &mut [async fn body@$DIR/async_await.rs:11:14: 11:16])));
switchInt(move _5) -> [0: bb1, 1: bb2, otherwise: bb3];
}
bb1: {
_4 = move _2; // scope 0 at $DIR/async_await.rs:+0:14: +0:16
_3 = const (); // scope 0 at $DIR/async_await.rs:+0:14: +0:16
_0 = Poll::<()>::Ready(move _3); // scope 0 at $DIR/async_await.rs:+0:16: +0:16
discriminant((*(_1.0: &mut [async fn body@$DIR/async_await.rs:11:14: 11:16]))) = 1; // scope 0 at $DIR/async_await.rs:+0:16: +0:16
return; // scope 0 at $DIR/async_await.rs:+0:16: +0:16
_4 = move _2;
_3 = const ();
_0 = Poll::<()>::Ready(move _3);
discriminant((*(_1.0: &mut [async fn body@$DIR/async_await.rs:11:14: 11:16]))) = 1;
return;
}
bb2: {
assert(const false, "`async fn` resumed after completion") -> bb2; // scope 0 at $DIR/async_await.rs:+0:14: +0:16
assert(const false, "`async fn` resumed after completion") -> bb2;
}
bb3: {
unreachable; // scope 0 at $DIR/async_await.rs:+0:14: +0:16
unreachable;
}
}

View File

@ -32,312 +32,288 @@
} */
fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>, _2: &mut Context<'_>) -> Poll<()> {
debug _task_context => _38; // in scope 0 at $DIR/async_await.rs:+0:18: +3:2
let mut _0: std::task::Poll<()>; // return place in scope 0 at $DIR/async_await.rs:+0:18: +3:2
let _3: (); // in scope 0 at $DIR/async_await.rs:+1:5: +1:14
let mut _4: impl std::future::Future<Output = ()>; // in scope 0 at $DIR/async_await.rs:+1:9: +1:14
let mut _5: impl std::future::Future<Output = ()>; // in scope 0 at $DIR/async_await.rs:+1:5: +1:8
let mut _6: impl std::future::Future<Output = ()>; // in scope 0 at $DIR/async_await.rs:+1:9: +1:14
let mut _7: (); // in scope 0 at $DIR/async_await.rs:+0:18: +3:2
let _8: (); // in scope 0 at $DIR/async_await.rs:+1:9: +1:14
let mut _9: std::task::Poll<()>; // in scope 0 at $DIR/async_await.rs:+1:9: +1:14
let mut _10: std::pin::Pin<&mut impl std::future::Future<Output = ()>>; // in scope 0 at $DIR/async_await.rs:+1:9: +1:14
let mut _11: &mut impl std::future::Future<Output = ()>; // in scope 0 at $DIR/async_await.rs:+1:9: +1:14
let mut _12: &mut impl std::future::Future<Output = ()>; // in scope 0 at $DIR/async_await.rs:+1:9: +1:14
let mut _13: &mut std::task::Context<'_>; // in scope 0 at $DIR/async_await.rs:+1:5: +1:14
let mut _14: &mut std::task::Context<'_>; // in scope 0 at $DIR/async_await.rs:+1:5: +1:14
let mut _15: &mut std::task::Context<'_>; // in scope 0 at $DIR/async_await.rs:+1:9: +1:14
let mut _16: isize; // in scope 0 at $DIR/async_await.rs:+1:9: +1:14
let mut _18: !; // in scope 0 at $DIR/async_await.rs:+1:5: +1:14
let mut _19: &mut std::task::Context<'_>; // in scope 0 at $DIR/async_await.rs:+1:9: +1:14
let mut _20: (); // in scope 0 at $DIR/async_await.rs:+1:9: +1:14
let mut _21: impl std::future::Future<Output = ()>; // in scope 0 at $DIR/async_await.rs:+2:9: +2:14
let mut _22: impl std::future::Future<Output = ()>; // in scope 0 at $DIR/async_await.rs:+2:5: +2:8
let mut _23: impl std::future::Future<Output = ()>; // in scope 0 at $DIR/async_await.rs:+2:9: +2:14
let _24: (); // in scope 0 at $DIR/async_await.rs:+2:9: +2:14
let mut _25: std::task::Poll<()>; // in scope 0 at $DIR/async_await.rs:+2:9: +2:14
let mut _26: std::pin::Pin<&mut impl std::future::Future<Output = ()>>; // in scope 0 at $DIR/async_await.rs:+2:9: +2:14
let mut _27: &mut impl std::future::Future<Output = ()>; // in scope 0 at $DIR/async_await.rs:+2:9: +2:14
let mut _28: &mut impl std::future::Future<Output = ()>; // in scope 0 at $DIR/async_await.rs:+2:9: +2:14
let mut _29: &mut std::task::Context<'_>; // in scope 0 at $DIR/async_await.rs:+2:5: +2:14
let mut _30: &mut std::task::Context<'_>; // in scope 0 at $DIR/async_await.rs:+2:5: +2:14
let mut _31: &mut std::task::Context<'_>; // in scope 0 at $DIR/async_await.rs:+2:9: +2:14
let mut _32: isize; // in scope 0 at $DIR/async_await.rs:+2:9: +2:14
let mut _34: !; // in scope 0 at $DIR/async_await.rs:+2:5: +2:14
let mut _35: &mut std::task::Context<'_>; // in scope 0 at $DIR/async_await.rs:+2:9: +2:14
let mut _36: (); // in scope 0 at $DIR/async_await.rs:+2:9: +2:14
let mut _37: (); // in scope 0 at $DIR/async_await.rs:+0:18: +3:2
let mut _38: &mut std::task::Context<'_>; // in scope 0 at $DIR/async_await.rs:+0:18: +3:2
let mut _39: u32; // in scope 0 at $DIR/async_await.rs:+0:18: +3:2
debug _task_context => _38;
let mut _0: std::task::Poll<()>;
let _3: ();
let mut _4: impl std::future::Future<Output = ()>;
let mut _5: impl std::future::Future<Output = ()>;
let mut _6: impl std::future::Future<Output = ()>;
let mut _7: ();
let _8: ();
let mut _9: std::task::Poll<()>;
let mut _10: std::pin::Pin<&mut impl std::future::Future<Output = ()>>;
let mut _11: &mut impl std::future::Future<Output = ()>;
let mut _12: &mut impl std::future::Future<Output = ()>;
let mut _13: &mut std::task::Context<'_>;
let mut _14: &mut std::task::Context<'_>;
let mut _15: &mut std::task::Context<'_>;
let mut _16: isize;
let mut _18: !;
let mut _19: &mut std::task::Context<'_>;
let mut _20: ();
let mut _21: impl std::future::Future<Output = ()>;
let mut _22: impl std::future::Future<Output = ()>;
let mut _23: impl std::future::Future<Output = ()>;
let _24: ();
let mut _25: std::task::Poll<()>;
let mut _26: std::pin::Pin<&mut impl std::future::Future<Output = ()>>;
let mut _27: &mut impl std::future::Future<Output = ()>;
let mut _28: &mut impl std::future::Future<Output = ()>;
let mut _29: &mut std::task::Context<'_>;
let mut _30: &mut std::task::Context<'_>;
let mut _31: &mut std::task::Context<'_>;
let mut _32: isize;
let mut _34: !;
let mut _35: &mut std::task::Context<'_>;
let mut _36: ();
let mut _37: ();
let mut _38: &mut std::task::Context<'_>;
let mut _39: u32;
scope 1 {
debug __awaitee => (((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2])) as variant#3).0: impl std::future::Future<Output = ()>); // in scope 1 at $DIR/async_await.rs:+1:9: +1:14
let _17: (); // in scope 1 at $DIR/async_await.rs:+1:5: +1:14
debug __awaitee => (((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2])) as variant#3).0: impl std::future::Future<Output = ()>);
let _17: ();
scope 2 {
}
scope 3 {
debug result => _17; // in scope 3 at $DIR/async_await.rs:+1:5: +1:14
debug result => _17;
}
}
scope 4 {
debug __awaitee => (((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2])) as variant#4).0: impl std::future::Future<Output = ()>); // in scope 4 at $DIR/async_await.rs:+2:9: +2:14
let _33: (); // in scope 4 at $DIR/async_await.rs:+2:5: +2:14
debug __awaitee => (((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2])) as variant#4).0: impl std::future::Future<Output = ()>);
let _33: ();
scope 5 {
}
scope 6 {
debug result => _33; // in scope 6 at $DIR/async_await.rs:+2:5: +2:14
debug result => _33;
}
}
bb0: {
_39 = discriminant((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2]))); // scope 0 at $DIR/async_await.rs:+0:18: +3:2
switchInt(move _39) -> [0: bb1, 1: bb28, 3: bb26, 4: bb27, otherwise: bb29]; // scope 0 at $DIR/async_await.rs:+0:18: +3:2
_39 = discriminant((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2])));
switchInt(move _39) -> [0: bb1, 1: bb28, 3: bb26, 4: bb27, otherwise: bb29];
}
bb1: {
_38 = move _2; // scope 0 at $DIR/async_await.rs:+0:18: +3:2
StorageLive(_3); // scope 0 at $DIR/async_await.rs:+1:5: +1:14
StorageLive(_4); // scope 0 at $DIR/async_await.rs:+1:9: +1:14
StorageLive(_5); // scope 0 at $DIR/async_await.rs:+1:5: +1:8
_5 = a() -> [return: bb2, unwind unreachable]; // scope 0 at $DIR/async_await.rs:+1:5: +1:8
// mir::Constant
// + span: $DIR/async_await.rs:15:5: 15:6
// + literal: Const { ty: fn() -> impl Future<Output = ()> {a}, val: Value(<ZST>) }
_38 = move _2;
StorageLive(_3);
StorageLive(_4);
StorageLive(_5);
_5 = a() -> [return: bb2, unwind unreachable];
}
bb2: {
_4 = <impl Future<Output = ()> as IntoFuture>::into_future(move _5) -> [return: bb3, unwind unreachable]; // scope 0 at $DIR/async_await.rs:+1:9: +1:14
// mir::Constant
// + span: $DIR/async_await.rs:15:9: 15:14
// + literal: Const { ty: fn(impl Future<Output = ()>) -> <impl Future<Output = ()> as IntoFuture>::IntoFuture {<impl Future<Output = ()> as IntoFuture>::into_future}, val: Value(<ZST>) }
_4 = <impl Future<Output = ()> as IntoFuture>::into_future(move _5) -> [return: bb3, unwind unreachable];
}
bb3: {
StorageDead(_5); // scope 0 at $DIR/async_await.rs:+1:13: +1:14
nop; // scope 0 at $DIR/async_await.rs:+1:9: +1:14
(((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2])) as variant#3).0: impl std::future::Future<Output = ()>) = move _4; // scope 0 at $DIR/async_await.rs:+1:9: +1:14
goto -> bb4; // scope 1 at $DIR/async_await.rs:+1:9: +1:14
StorageDead(_5);
nop;
(((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2])) as variant#3).0: impl std::future::Future<Output = ()>) = move _4;
goto -> bb4;
}
bb4: {
StorageLive(_8); // scope 1 at $DIR/async_await.rs:+1:9: +1:14
StorageLive(_9); // scope 1 at $DIR/async_await.rs:+1:9: +1:14
StorageLive(_10); // scope 2 at $DIR/async_await.rs:+1:9: +1:14
StorageLive(_11); // scope 2 at $DIR/async_await.rs:+1:9: +1:14
StorageLive(_12); // scope 2 at $DIR/async_await.rs:+1:9: +1:14
_12 = &mut (((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2])) as variant#3).0: impl std::future::Future<Output = ()>); // scope 2 at $DIR/async_await.rs:+1:9: +1:14
_11 = &mut (*_12); // scope 2 at $DIR/async_await.rs:+1:9: +1:14
_10 = Pin::<&mut impl Future<Output = ()>>::new_unchecked(move _11) -> [return: bb5, unwind unreachable]; // scope 2 at $DIR/async_await.rs:+1:9: +1:14
// mir::Constant
// + span: $DIR/async_await.rs:15:9: 15:14
// + literal: Const { ty: unsafe fn(&mut impl Future<Output = ()>) -> Pin<&mut impl Future<Output = ()>> {Pin::<&mut impl Future<Output = ()>>::new_unchecked}, val: Value(<ZST>) }
StorageLive(_8);
StorageLive(_9);
StorageLive(_10);
StorageLive(_11);
StorageLive(_12);
_12 = &mut (((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2])) as variant#3).0: impl std::future::Future<Output = ()>);
_11 = &mut (*_12);
_10 = Pin::<&mut impl Future<Output = ()>>::new_unchecked(move _11) -> [return: bb5, unwind unreachable];
}
bb5: {
StorageDead(_11); // scope 2 at $DIR/async_await.rs:+1:13: +1:14
StorageLive(_13); // scope 2 at $DIR/async_await.rs:+1:5: +1:14
StorageLive(_14); // scope 2 at $DIR/async_await.rs:+1:5: +1:14
StorageLive(_15); // scope 2 at $DIR/async_await.rs:+1:9: +1:14
_15 = _38; // scope 2 at $DIR/async_await.rs:+1:9: +1:14
_14 = move _15; // scope 2 at $DIR/async_await.rs:+1:5: +1:14
goto -> bb6; // scope 2 at $DIR/async_await.rs:+1:5: +1:14
StorageDead(_11);
StorageLive(_13);
StorageLive(_14);
StorageLive(_15);
_15 = _38;
_14 = move _15;
goto -> bb6;
}
bb6: {
_13 = &mut (*_14); // scope 2 at $DIR/async_await.rs:+1:5: +1:14
StorageDead(_15); // scope 2 at $DIR/async_await.rs:+1:13: +1:14
_9 = <impl Future<Output = ()> as Future>::poll(move _10, move _13) -> [return: bb7, unwind unreachable]; // scope 2 at $DIR/async_await.rs:+1:9: +1:14
// mir::Constant
// + span: $DIR/async_await.rs:15:9: 15:14
// + literal: Const { ty: for<'a, 'b, 'c> fn(Pin<&'a mut impl Future<Output = ()>>, &'b mut Context<'c>) -> Poll<<impl Future<Output = ()> as Future>::Output> {<impl Future<Output = ()> as Future>::poll}, val: Value(<ZST>) }
_13 = &mut (*_14);
StorageDead(_15);
_9 = <impl Future<Output = ()> as Future>::poll(move _10, move _13) -> [return: bb7, unwind unreachable];
}
bb7: {
StorageDead(_13); // scope 2 at $DIR/async_await.rs:+1:13: +1:14
StorageDead(_10); // scope 2 at $DIR/async_await.rs:+1:13: +1:14
_16 = discriminant(_9); // scope 1 at $DIR/async_await.rs:+1:9: +1:14
switchInt(move _16) -> [0: bb10, 1: bb8, otherwise: bb9]; // scope 1 at $DIR/async_await.rs:+1:9: +1:14
StorageDead(_13);
StorageDead(_10);
_16 = discriminant(_9);
switchInt(move _16) -> [0: bb10, 1: bb8, otherwise: bb9];
}
bb8: {
_8 = const (); // scope 1 at $DIR/async_await.rs:+1:9: +1:14
StorageDead(_14); // scope 1 at $DIR/async_await.rs:+1:13: +1:14
StorageDead(_12); // scope 1 at $DIR/async_await.rs:+1:13: +1:14
StorageDead(_9); // scope 1 at $DIR/async_await.rs:+1:13: +1:14
StorageDead(_8); // scope 1 at $DIR/async_await.rs:+1:13: +1:14
StorageLive(_19); // scope 1 at $DIR/async_await.rs:+1:9: +1:14
StorageLive(_20); // scope 1 at $DIR/async_await.rs:+1:9: +1:14
_20 = (); // scope 1 at $DIR/async_await.rs:+1:9: +1:14
_0 = Poll::<()>::Pending; // scope 1 at $DIR/async_await.rs:+1:9: +1:14
discriminant((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2]))) = 3; // scope 1 at $DIR/async_await.rs:+1:9: +1:14
return; // scope 1 at $DIR/async_await.rs:+1:9: +1:14
_8 = const ();
StorageDead(_14);
StorageDead(_12);
StorageDead(_9);
StorageDead(_8);
StorageLive(_19);
StorageLive(_20);
_20 = ();
_0 = Poll::<()>::Pending;
discriminant((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2]))) = 3;
return;
}
bb9: {
unreachable; // scope 1 at $DIR/async_await.rs:+1:9: +1:14
unreachable;
}
bb10: {
StorageLive(_17); // scope 1 at $DIR/async_await.rs:+1:5: +1:14
_17 = ((_9 as Ready).0: ()); // scope 1 at $DIR/async_await.rs:+1:5: +1:14
_3 = _17; // scope 3 at $DIR/async_await.rs:+1:5: +1:14
StorageDead(_17); // scope 1 at $DIR/async_await.rs:+1:13: +1:14
StorageDead(_14); // scope 1 at $DIR/async_await.rs:+1:13: +1:14
StorageDead(_12); // scope 1 at $DIR/async_await.rs:+1:13: +1:14
StorageDead(_9); // scope 1 at $DIR/async_await.rs:+1:13: +1:14
StorageDead(_8); // scope 1 at $DIR/async_await.rs:+1:13: +1:14
goto -> bb12; // scope 0 at $DIR/async_await.rs:+1:13: +1:14
StorageLive(_17);
_17 = ((_9 as Ready).0: ());
_3 = _17;
StorageDead(_17);
StorageDead(_14);
StorageDead(_12);
StorageDead(_9);
StorageDead(_8);
goto -> bb12;
}
bb11: {
StorageDead(_20); // scope 1 at $DIR/async_await.rs:+1:13: +1:14
_38 = move _19; // scope 1 at $DIR/async_await.rs:+1:9: +1:14
StorageDead(_19); // scope 1 at $DIR/async_await.rs:+1:13: +1:14
_7 = const (); // scope 1 at $DIR/async_await.rs:+1:9: +1:14
goto -> bb4; // scope 1 at $DIR/async_await.rs:+1:9: +1:14
StorageDead(_20);
_38 = move _19;
StorageDead(_19);
_7 = const ();
goto -> bb4;
}
bb12: {
nop; // scope 0 at $DIR/async_await.rs:+1:13: +1:14
goto -> bb13; // scope 0 at $DIR/async_await.rs:+1:14: +1:15
nop;
goto -> bb13;
}
bb13: {
StorageDead(_4); // scope 0 at $DIR/async_await.rs:+1:14: +1:15
StorageDead(_3); // scope 0 at $DIR/async_await.rs:+1:14: +1:15
StorageLive(_21); // scope 0 at $DIR/async_await.rs:+2:9: +2:14
StorageLive(_22); // scope 0 at $DIR/async_await.rs:+2:5: +2:8
_22 = a() -> [return: bb14, unwind unreachable]; // scope 0 at $DIR/async_await.rs:+2:5: +2:8
// mir::Constant
// + span: $DIR/async_await.rs:16:5: 16:6
// + literal: Const { ty: fn() -> impl Future<Output = ()> {a}, val: Value(<ZST>) }
StorageDead(_4);
StorageDead(_3);
StorageLive(_21);
StorageLive(_22);
_22 = a() -> [return: bb14, unwind unreachable];
}
bb14: {
_21 = <impl Future<Output = ()> as IntoFuture>::into_future(move _22) -> [return: bb15, unwind unreachable]; // scope 0 at $DIR/async_await.rs:+2:9: +2:14
// mir::Constant
// + span: $DIR/async_await.rs:16:9: 16:14
// + literal: Const { ty: fn(impl Future<Output = ()>) -> <impl Future<Output = ()> as IntoFuture>::IntoFuture {<impl Future<Output = ()> as IntoFuture>::into_future}, val: Value(<ZST>) }
_21 = <impl Future<Output = ()> as IntoFuture>::into_future(move _22) -> [return: bb15, unwind unreachable];
}
bb15: {
StorageDead(_22); // scope 0 at $DIR/async_await.rs:+2:13: +2:14
nop; // scope 0 at $DIR/async_await.rs:+2:9: +2:14
(((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2])) as variant#4).0: impl std::future::Future<Output = ()>) = move _21; // scope 0 at $DIR/async_await.rs:+2:9: +2:14
goto -> bb16; // scope 4 at $DIR/async_await.rs:+2:9: +2:14
StorageDead(_22);
nop;
(((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2])) as variant#4).0: impl std::future::Future<Output = ()>) = move _21;
goto -> bb16;
}
bb16: {
StorageLive(_24); // scope 4 at $DIR/async_await.rs:+2:9: +2:14
StorageLive(_25); // scope 4 at $DIR/async_await.rs:+2:9: +2:14
StorageLive(_26); // scope 5 at $DIR/async_await.rs:+2:9: +2:14
StorageLive(_27); // scope 5 at $DIR/async_await.rs:+2:9: +2:14
StorageLive(_28); // scope 5 at $DIR/async_await.rs:+2:9: +2:14
_28 = &mut (((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2])) as variant#4).0: impl std::future::Future<Output = ()>); // scope 5 at $DIR/async_await.rs:+2:9: +2:14
_27 = &mut (*_28); // scope 5 at $DIR/async_await.rs:+2:9: +2:14
_26 = Pin::<&mut impl Future<Output = ()>>::new_unchecked(move _27) -> [return: bb17, unwind unreachable]; // scope 5 at $DIR/async_await.rs:+2:9: +2:14
// mir::Constant
// + span: $DIR/async_await.rs:16:9: 16:14
// + literal: Const { ty: unsafe fn(&mut impl Future<Output = ()>) -> Pin<&mut impl Future<Output = ()>> {Pin::<&mut impl Future<Output = ()>>::new_unchecked}, val: Value(<ZST>) }
StorageLive(_24);
StorageLive(_25);
StorageLive(_26);
StorageLive(_27);
StorageLive(_28);
_28 = &mut (((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2])) as variant#4).0: impl std::future::Future<Output = ()>);
_27 = &mut (*_28);
_26 = Pin::<&mut impl Future<Output = ()>>::new_unchecked(move _27) -> [return: bb17, unwind unreachable];
}
bb17: {
StorageDead(_27); // scope 5 at $DIR/async_await.rs:+2:13: +2:14
StorageLive(_29); // scope 5 at $DIR/async_await.rs:+2:5: +2:14
StorageLive(_30); // scope 5 at $DIR/async_await.rs:+2:5: +2:14
StorageLive(_31); // scope 5 at $DIR/async_await.rs:+2:9: +2:14
_31 = _38; // scope 5 at $DIR/async_await.rs:+2:9: +2:14
_30 = move _31; // scope 5 at $DIR/async_await.rs:+2:5: +2:14
goto -> bb18; // scope 5 at $DIR/async_await.rs:+2:5: +2:14
StorageDead(_27);
StorageLive(_29);
StorageLive(_30);
StorageLive(_31);
_31 = _38;
_30 = move _31;
goto -> bb18;
}
bb18: {
_29 = &mut (*_30); // scope 5 at $DIR/async_await.rs:+2:5: +2:14
StorageDead(_31); // scope 5 at $DIR/async_await.rs:+2:13: +2:14
_25 = <impl Future<Output = ()> as Future>::poll(move _26, move _29) -> [return: bb19, unwind unreachable]; // scope 5 at $DIR/async_await.rs:+2:9: +2:14
// mir::Constant
// + span: $DIR/async_await.rs:16:9: 16:14
// + literal: Const { ty: for<'a, 'b, 'c> fn(Pin<&'a mut impl Future<Output = ()>>, &'b mut Context<'c>) -> Poll<<impl Future<Output = ()> as Future>::Output> {<impl Future<Output = ()> as Future>::poll}, val: Value(<ZST>) }
_29 = &mut (*_30);
StorageDead(_31);
_25 = <impl Future<Output = ()> as Future>::poll(move _26, move _29) -> [return: bb19, unwind unreachable];
}
bb19: {
StorageDead(_29); // scope 5 at $DIR/async_await.rs:+2:13: +2:14
StorageDead(_26); // scope 5 at $DIR/async_await.rs:+2:13: +2:14
_32 = discriminant(_25); // scope 4 at $DIR/async_await.rs:+2:9: +2:14
switchInt(move _32) -> [0: bb21, 1: bb20, otherwise: bb9]; // scope 4 at $DIR/async_await.rs:+2:9: +2:14
StorageDead(_29);
StorageDead(_26);
_32 = discriminant(_25);
switchInt(move _32) -> [0: bb21, 1: bb20, otherwise: bb9];
}
bb20: {
_24 = const (); // scope 4 at $DIR/async_await.rs:+2:9: +2:14
StorageDead(_30); // scope 4 at $DIR/async_await.rs:+2:13: +2:14
StorageDead(_28); // scope 4 at $DIR/async_await.rs:+2:13: +2:14
StorageDead(_25); // scope 4 at $DIR/async_await.rs:+2:13: +2:14
StorageDead(_24); // scope 4 at $DIR/async_await.rs:+2:13: +2:14
StorageLive(_35); // scope 4 at $DIR/async_await.rs:+2:9: +2:14
StorageLive(_36); // scope 4 at $DIR/async_await.rs:+2:9: +2:14
_36 = (); // scope 4 at $DIR/async_await.rs:+2:9: +2:14
_0 = Poll::<()>::Pending; // scope 4 at $DIR/async_await.rs:+2:9: +2:14
discriminant((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2]))) = 4; // scope 4 at $DIR/async_await.rs:+2:9: +2:14
return; // scope 4 at $DIR/async_await.rs:+2:9: +2:14
_24 = const ();
StorageDead(_30);
StorageDead(_28);
StorageDead(_25);
StorageDead(_24);
StorageLive(_35);
StorageLive(_36);
_36 = ();
_0 = Poll::<()>::Pending;
discriminant((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2]))) = 4;
return;
}
bb21: {
StorageLive(_33); // scope 4 at $DIR/async_await.rs:+2:5: +2:14
_33 = ((_25 as Ready).0: ()); // scope 4 at $DIR/async_await.rs:+2:5: +2:14
_37 = _33; // scope 6 at $DIR/async_await.rs:+2:5: +2:14
StorageDead(_33); // scope 4 at $DIR/async_await.rs:+2:13: +2:14
StorageDead(_30); // scope 4 at $DIR/async_await.rs:+2:13: +2:14
StorageDead(_28); // scope 4 at $DIR/async_await.rs:+2:13: +2:14
StorageDead(_25); // scope 4 at $DIR/async_await.rs:+2:13: +2:14
StorageDead(_24); // scope 4 at $DIR/async_await.rs:+2:13: +2:14
goto -> bb23; // scope 0 at $DIR/async_await.rs:+2:13: +2:14
StorageLive(_33);
_33 = ((_25 as Ready).0: ());
_37 = _33;
StorageDead(_33);
StorageDead(_30);
StorageDead(_28);
StorageDead(_25);
StorageDead(_24);
goto -> bb23;
}
bb22: {
StorageDead(_36); // scope 4 at $DIR/async_await.rs:+2:13: +2:14
_38 = move _35; // scope 4 at $DIR/async_await.rs:+2:9: +2:14
StorageDead(_35); // scope 4 at $DIR/async_await.rs:+2:13: +2:14
_7 = const (); // scope 4 at $DIR/async_await.rs:+2:9: +2:14
goto -> bb16; // scope 4 at $DIR/async_await.rs:+2:9: +2:14
StorageDead(_36);
_38 = move _35;
StorageDead(_35);
_7 = const ();
goto -> bb16;
}
bb23: {
nop; // scope 0 at $DIR/async_await.rs:+2:13: +2:14
goto -> bb24; // scope 0 at $DIR/async_await.rs:+3:1: +3:2
nop;
goto -> bb24;
}
bb24: {
StorageDead(_21); // scope 0 at $DIR/async_await.rs:+3:1: +3:2
goto -> bb25; // scope 0 at $DIR/async_await.rs:+3:1: +3:2
StorageDead(_21);
goto -> bb25;
}
bb25: {
_0 = Poll::<()>::Ready(move _37); // scope 0 at $DIR/async_await.rs:+3:2: +3:2
discriminant((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2]))) = 1; // scope 0 at $DIR/async_await.rs:+3:2: +3:2
return; // scope 0 at $DIR/async_await.rs:+3:2: +3:2
_0 = Poll::<()>::Ready(move _37);
discriminant((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2]))) = 1;
return;
}
bb26: {
StorageLive(_3); // scope 0 at $DIR/async_await.rs:+0:18: +3:2
StorageLive(_4); // scope 0 at $DIR/async_await.rs:+0:18: +3:2
StorageLive(_19); // scope 0 at $DIR/async_await.rs:+0:18: +3:2
StorageLive(_20); // scope 0 at $DIR/async_await.rs:+0:18: +3:2
_19 = move _2; // scope 0 at $DIR/async_await.rs:+0:18: +3:2
goto -> bb11; // scope 0 at $DIR/async_await.rs:+0:18: +3:2
StorageLive(_3);
StorageLive(_4);
StorageLive(_19);
StorageLive(_20);
_19 = move _2;
goto -> bb11;
}
bb27: {
StorageLive(_21); // scope 0 at $DIR/async_await.rs:+0:18: +3:2
StorageLive(_35); // scope 0 at $DIR/async_await.rs:+0:18: +3:2
StorageLive(_36); // scope 0 at $DIR/async_await.rs:+0:18: +3:2
_35 = move _2; // scope 0 at $DIR/async_await.rs:+0:18: +3:2
goto -> bb22; // scope 0 at $DIR/async_await.rs:+0:18: +3:2
StorageLive(_21);
StorageLive(_35);
StorageLive(_36);
_35 = move _2;
goto -> bb22;
}
bb28: {
assert(const false, "`async fn` resumed after completion") -> bb28; // scope 0 at $DIR/async_await.rs:+0:18: +3:2
assert(const false, "`async fn` resumed after completion") -> bb28;
}
bb29: {
unreachable; // scope 0 at $DIR/async_await.rs:+0:18: +3:2
unreachable;
}
}

View File

@ -1,16 +1,16 @@
// MIR for `adt` after built
fn adt() -> Onion {
let mut _0: Onion; // return place in scope 0 at $DIR/aggregate_exprs.rs:+0:13: +0:18
let mut _1: i32; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
let mut _2: Foo; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
let mut _3: Bar; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
let mut _0: Onion;
let mut _1: i32;
let mut _2: Foo;
let mut _3: Bar;
bb0: {
_1 = const 1_i32; // scope 0 at $DIR/aggregate_exprs.rs:+6:13: +6:20
_2 = Foo { a: const 1_i32, b: const 2_i32 }; // scope 0 at $DIR/aggregate_exprs.rs:+7:13: +10:14
_3 = Bar::Foo(move _2, _1); // scope 0 at $DIR/aggregate_exprs.rs:+11:13: +11:39
_0 = Onion { neon: ((_3 as variant#0).1: i32) }; // scope 0 at $DIR/aggregate_exprs.rs:+12:13: +12:58
return; // scope 0 at $DIR/aggregate_exprs.rs:+13:13: +13:21
_1 = const 1_i32;
_2 = Foo { a: const 1_i32, b: const 2_i32 };
_3 = Bar::Foo(move _2, _1);
_0 = Onion { neon: ((_3 as variant#0).1: i32) };
return;
}
}

View File

@ -1,15 +1,15 @@
// MIR for `array` after built
fn array() -> [i32; 2] {
let mut _0: [i32; 2]; // return place in scope 0 at $DIR/aggregate_exprs.rs:+0:15: +0:23
let mut _1: [i32; 2]; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
let mut _2: i32; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
let mut _0: [i32; 2];
let mut _1: [i32; 2];
let mut _2: i32;
bb0: {
_1 = [const 42_i32, const 43_i32]; // scope 0 at $DIR/aggregate_exprs.rs:+5:13: +5:25
_2 = const 1_i32; // scope 0 at $DIR/aggregate_exprs.rs:+6:13: +6:20
_1 = [_2, const 2_i32]; // scope 0 at $DIR/aggregate_exprs.rs:+7:13: +7:25
_0 = move _1; // scope 0 at $DIR/aggregate_exprs.rs:+8:13: +8:26
return; // scope 0 at $DIR/aggregate_exprs.rs:+9:13: +9:21
_1 = [const 42_i32, const 43_i32];
_2 = const 1_i32;
_1 = [_2, const 2_i32];
_0 = move _1;
return;
}
}

View File

@ -1,10 +1,10 @@
// MIR for `tuple` after built
fn tuple() -> (i32, bool) {
let mut _0: (i32, bool); // return place in scope 0 at $DIR/aggregate_exprs.rs:+0:15: +0:26
let mut _0: (i32, bool);
bb0: {
_0 = (const 1_i32, const true); // scope 0 at $DIR/aggregate_exprs.rs:+3:13: +3:28
return; // scope 0 at $DIR/aggregate_exprs.rs:+4:13: +4:21
_0 = (const 1_i32, const true);
return;
}
}

View File

@ -1,22 +1,22 @@
// MIR for `arbitrary_let` after built
fn arbitrary_let(_1: i32) -> i32 {
let mut _0: i32; // return place in scope 0 at $DIR/arbitrary_let.rs:+0:29: +0:32
let mut _2: i32; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
let mut _3: i32; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
let mut _0: i32;
let mut _2: i32;
let mut _3: i32;
bb0: {
_2 = _1; // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
goto -> bb2; // scope 0 at $DIR/arbitrary_let.rs:+4:13: +4:25
_2 = _1;
goto -> bb2;
}
bb1: {
_0 = _3; // scope 0 at $DIR/arbitrary_let.rs:+7:13: +7:20
return; // scope 0 at $DIR/arbitrary_let.rs:+8:13: +8:21
_0 = _3;
return;
}
bb2: {
_3 = _2; // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
goto -> bb1; // scope 0 at $DIR/arbitrary_let.rs:+12:13: +12:24
_3 = _2;
goto -> bb1;
}
}

View File

@ -1,14 +1,14 @@
// MIR for `arrays` after built
fn arrays() -> usize {
let mut _0: usize; // return place in scope 0 at $DIR/arrays.rs:+0:32: +0:37
let mut _1: [i32; C]; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
let mut _2: usize; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
let mut _0: usize;
let mut _1: [i32; C];
let mut _2: usize;
bb0: {
_1 = [const 5_i32; C]; // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
_2 = Len(_1); // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
_0 = _2; // scope 0 at $DIR/arrays.rs:+4:9: +4:16
return; // scope 0 at $DIR/arrays.rs:+5:9: +5:17
_1 = [const 5_i32; C];
_2 = Len(_1);
_0 = _2;
return;
}
}

View File

@ -1,10 +1,10 @@
// MIR for `float_to_int` after built
fn float_to_int(_1: f32) -> i32 {
let mut _0: i32; // return place in scope 0 at $DIR/as_cast.rs:+0:28: +0:31
let mut _0: i32;
bb0: {
_0 = _1 as i32 (FloatToInt); // scope 0 at $DIR/as_cast.rs:+3:13: +3:27
return; // scope 0 at $DIR/as_cast.rs:+4:13: +4:21
_0 = _1 as i32 (FloatToInt);
return;
}
}

View File

@ -1,10 +1,10 @@
// MIR for `int_to_int` after built
fn int_to_int(_1: u32) -> i32 {
let mut _0: i32; // return place in scope 0 at $DIR/as_cast.rs:+0:26: +0:29
let mut _0: i32;
bb0: {
_0 = _1 as i32 (IntToInt); // scope 0 at $DIR/as_cast.rs:+3:13: +3:27
return; // scope 0 at $DIR/as_cast.rs:+4:13: +4:21
_0 = _1 as i32 (IntToInt);
return;
}
}

View File

@ -1,10 +1,10 @@
// MIR for `int_to_ptr` after built
fn int_to_ptr(_1: usize) -> *const i32 {
let mut _0: *const i32; // return place in scope 0 at $DIR/as_cast.rs:+0:28: +0:38
let mut _0: *const i32;
bb0: {
_0 = _1 as *const i32 (PointerFromExposedAddress); // scope 0 at $DIR/as_cast.rs:+3:13: +3:34
return; // scope 0 at $DIR/as_cast.rs:+4:13: +4:21
_0 = _1 as *const i32 (PointerFromExposedAddress);
return;
}
}

View File

@ -1,11 +1,11 @@
// MIR for `tuple` after built
fn tuple() -> (i32, bool) {
let mut _0: (i32, bool); // return place in scope 0 at $DIR/composite_return.rs:+0:15: +0:26
let mut _0: (i32, bool);
bb0: {
(_0.0: i32) = const 1_i32; // scope 0 at $DIR/composite_return.rs:+4:13: +4:22
(_0.1: bool) = const true; // scope 0 at $DIR/composite_return.rs:+5:13: +5:25
return; // scope 0 at $DIR/composite_return.rs:+6:13: +6:21
(_0.0: i32) = const 1_i32;
(_0.1: bool) = const true;
return;
}
}

View File

@ -1,22 +1,19 @@
// MIR for `consts` after built
fn consts() -> () {
let mut _0: (); // return place in scope 0 at $DIR/consts.rs:+0:27: +0:27
let mut _1: u8; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
let mut _2: i8; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
let mut _3: u32; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
let mut _4: i32; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
let mut _5: fn() {consts::<10>}; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
let mut _0: ();
let mut _1: u8;
let mut _2: i8;
let mut _3: u32;
let mut _4: i32;
let mut _5: fn() {consts::<10>};
bb0: {
_1 = const 5_u8; // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
_2 = const _; // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
_3 = const C; // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
_4 = const _; // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
_5 = consts::<10>; // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
// mir::Constant
// + span: $DIR/consts.rs:16:18: 16:30
// + literal: Const { ty: fn() {consts::<10>}, val: Value(<ZST>) }
return; // scope 0 at $DIR/consts.rs:+7:9: +7:17
_1 = const 5_u8;
_2 = const _;
_3 = const C;
_4 = const _;
_5 = consts::<10>;
return;
}
}

View File

@ -1,20 +1,14 @@
// MIR for `statics` after built
fn statics() -> () {
let mut _0: (); // return place in scope 0 at $DIR/consts.rs:+0:14: +0:14
let mut _1: &i32; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
let mut _2: *mut i32; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
let mut _0: ();
let mut _1: &i32;
let mut _2: *mut i32;
bb0: {
_1 = const {alloc1: &i32}; // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
// mir::Constant
// + span: $DIR/consts.rs:27:31: 27:32
// + literal: Const { ty: &i32, val: Value(Scalar(alloc1)) }
_2 = const {alloc2: *mut i32}; // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
// mir::Constant
// + span: $DIR/consts.rs:28:38: 28:39
// + literal: Const { ty: *mut i32, val: Value(Scalar(alloc2)) }
return; // scope 0 at $DIR/consts.rs:+4:9: +4:17
_1 = const {alloc1: &i32};
_2 = const {alloc2: *mut i32};
return;
}
}

View File

@ -1,11 +1,11 @@
// MIR for `set_discr` after built
fn set_discr(_1: &mut Option<()>) -> () {
let mut _0: (); // return place in scope 0 at $DIR/enums.rs:+0:39: +0:39
let mut _0: ();
bb0: {
Deinit((*_1)); // scope 0 at $DIR/enums.rs:+2:9: +2:24
discriminant((*_1)) = 0; // scope 0 at $DIR/enums.rs:+3:9: +3:36
return; // scope 0 at $DIR/enums.rs:+4:9: +4:17
Deinit((*_1));
discriminant((*_1)) = 0;
return;
}
}

View File

@ -1,10 +1,10 @@
// MIR for `set_discr_repr` after built
fn set_discr_repr(_1: &mut Bool) -> () {
let mut _0: (); // return place in scope 0 at $DIR/enums.rs:+0:33: +0:33
let mut _0: ();
bb0: {
discriminant((*_1)) = 0; // scope 0 at $DIR/enums.rs:+2:9: +2:31
return; // scope 0 at $DIR/enums.rs:+3:9: +3:17
discriminant((*_1)) = 0;
return;
}
}

View File

@ -1,19 +1,19 @@
// MIR for `switch_bool` after built
fn switch_bool(_1: bool) -> u32 {
let mut _0: u32; // return place in scope 0 at $DIR/enums.rs:+0:32: +0:35
let mut _0: u32;
bb0: {
switchInt(_1) -> [1: bb1, 0: bb2, otherwise: bb2]; // scope 0 at $DIR/enums.rs:+3:13: +7:14
switchInt(_1) -> [1: bb1, 0: bb2, otherwise: bb2];
}
bb1: {
_0 = const 5_u32; // scope 0 at $DIR/enums.rs:+11:13: +11:20
return; // scope 0 at $DIR/enums.rs:+12:13: +12:21
_0 = const 5_u32;
return;
}
bb2: {
_0 = const 10_u32; // scope 0 at $DIR/enums.rs:+16:13: +16:21
return; // scope 0 at $DIR/enums.rs:+17:13: +17:21
_0 = const 10_u32;
return;
}
}

View File

@ -1,21 +1,21 @@
// MIR for `switch_option` after built
fn switch_option(_1: Option<()>) -> bool {
let mut _0: bool; // return place in scope 0 at $DIR/enums.rs:+0:45: +0:49
let mut _2: isize; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
let mut _0: bool;
let mut _2: isize;
bb0: {
_2 = discriminant(_1); // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
switchInt(_2) -> [0: bb1, 1: bb2, otherwise: bb2]; // scope 0 at $DIR/enums.rs:+4:13: +8:14
_2 = discriminant(_1);
switchInt(_2) -> [0: bb1, 1: bb2, otherwise: bb2];
}
bb1: {
_0 = const false; // scope 0 at $DIR/enums.rs:+12:13: +12:24
return; // scope 0 at $DIR/enums.rs:+13:13: +13:21
_0 = const false;
return;
}
bb2: {
_0 = const true; // scope 0 at $DIR/enums.rs:+17:13: +17:23
return; // scope 0 at $DIR/enums.rs:+18:13: +18:21
_0 = const true;
return;
}
}

View File

@ -1,21 +1,21 @@
// MIR for `switch_option_repr` after built
fn switch_option_repr(_1: Bool) -> bool {
let mut _0: bool; // return place in scope 0 at $DIR/enums.rs:+0:40: +0:44
let mut _2: u8; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
let mut _0: bool;
let mut _2: u8;
bb0: {
_2 = discriminant(_1); // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
switchInt(_2) -> [0: bb2, otherwise: bb1]; // scope 0 at $DIR/enums.rs:+4:13: +7:14
_2 = discriminant(_1);
switchInt(_2) -> [0: bb2, otherwise: bb1];
}
bb1: {
_0 = const true; // scope 0 at $DIR/enums.rs:+11:13: +11:23
return; // scope 0 at $DIR/enums.rs:+12:13: +12:21
_0 = const true;
return;
}
bb2: {
_0 = const false; // scope 0 at $DIR/enums.rs:+16:13: +16:24
return; // scope 0 at $DIR/enums.rs:+17:13: +17:21
_0 = const false;
return;
}
}

View File

@ -1,30 +1,30 @@
// MIR for `f` after built
fn f(_1: i32, _2: bool) -> i32 {
let mut _0: i32; // return place in scope 0 at $DIR/operators.rs:+0:30: +0:33
let mut _3: (i32, bool); // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
let mut _0: i32;
let mut _3: (i32, bool);
bb0: {
_1 = Neg(_1); // scope 0 at $DIR/operators.rs:+2:9: +2:15
_2 = Not(_2); // scope 0 at $DIR/operators.rs:+3:9: +3:15
_1 = Add(_1, _1); // scope 0 at $DIR/operators.rs:+4:9: +4:18
_1 = Sub(_1, _1); // scope 0 at $DIR/operators.rs:+5:9: +5:18
_1 = Mul(_1, _1); // scope 0 at $DIR/operators.rs:+6:9: +6:18
_1 = Div(_1, _1); // scope 0 at $DIR/operators.rs:+7:9: +7:18
_1 = Rem(_1, _1); // scope 0 at $DIR/operators.rs:+8:9: +8:18
_1 = BitXor(_1, _1); // scope 0 at $DIR/operators.rs:+9:9: +9:18
_1 = BitAnd(_1, _1); // scope 0 at $DIR/operators.rs:+10:9: +10:18
_1 = Shl(_1, _1); // scope 0 at $DIR/operators.rs:+11:9: +11:19
_1 = Shr(_1, _1); // scope 0 at $DIR/operators.rs:+12:9: +12:19
_2 = Eq(_1, _1); // scope 0 at $DIR/operators.rs:+13:9: +13:19
_2 = Lt(_1, _1); // scope 0 at $DIR/operators.rs:+14:9: +14:18
_2 = Le(_1, _1); // scope 0 at $DIR/operators.rs:+15:9: +15:19
_2 = Ge(_1, _1); // scope 0 at $DIR/operators.rs:+16:9: +16:19
_2 = Gt(_1, _1); // scope 0 at $DIR/operators.rs:+17:9: +17:18
_3 = CheckedAdd(_1, _1); // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
_2 = (_3.1: bool); // scope 0 at $DIR/operators.rs:+19:9: +19:18
_1 = (_3.0: i32); // scope 0 at $DIR/operators.rs:+20:9: +20:18
_0 = _1; // scope 0 at $DIR/operators.rs:+21:9: +21:16
return; // scope 0 at $DIR/operators.rs:+22:9: +22:17
_1 = Neg(_1);
_2 = Not(_2);
_1 = Add(_1, _1);
_1 = Sub(_1, _1);
_1 = Mul(_1, _1);
_1 = Div(_1, _1);
_1 = Rem(_1, _1);
_1 = BitXor(_1, _1);
_1 = BitAnd(_1, _1);
_1 = Shl(_1, _1);
_1 = Shr(_1, _1);
_2 = Eq(_1, _1);
_2 = Lt(_1, _1);
_2 = Le(_1, _1);
_2 = Ge(_1, _1);
_2 = Gt(_1, _1);
_3 = CheckedAdd(_1, _1);
_2 = (_3.1: bool);
_1 = (_3.0: i32);
_0 = _1;
return;
}
}

View File

@ -1,12 +1,12 @@
// MIR for `copy_for_deref` after built
fn copy_for_deref(_1: (&i32, i32)) -> i32 {
let mut _0: i32; // return place in scope 0 at $DIR/projections.rs:+0:38: +0:41
let mut _2: &i32; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
let mut _0: i32;
let mut _2: &i32;
bb0: {
_2 = deref_copy (_1.0: &i32); // scope 0 at $DIR/projections.rs:+4:13: +4:37
_0 = (*_2); // scope 0 at $DIR/projections.rs:+5:13: +5:24
return; // scope 0 at $DIR/projections.rs:+6:13: +6:21
_2 = deref_copy (_1.0: &i32);
_0 = (*_2);
return;
}
}

View File

@ -1,10 +1,10 @@
// MIR for `set` after built
fn set(_1: &mut Option<i32>) -> () {
let mut _0: (); // return place in scope 0 at $DIR/projections.rs:+0:31: +0:31
let mut _0: ();
bb0: {
(((*_1) as variant#1).0: i32) = const 10_i32; // scope 0 at $DIR/projections.rs:+2:9: +2:48
return; // scope 0 at $DIR/projections.rs:+3:9: +3:17
(((*_1) as variant#1).0: i32) = const 10_i32;
return;
}
}

View File

@ -1,13 +1,13 @@
// MIR for `simple_index` after built
fn simple_index(_1: [i32; 10], _2: &[i32]) -> i32 {
let mut _0: i32; // return place in scope 0 at $DIR/projections.rs:+0:45: +0:48
let mut _3: usize; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
let mut _0: i32;
let mut _3: usize;
bb0: {
_3 = const 3_usize; // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
_0 = _1[_3]; // scope 0 at $DIR/projections.rs:+3:9: +3:22
_0 = (*_2)[_3]; // scope 0 at $DIR/projections.rs:+4:9: +4:25
return; // scope 0 at $DIR/projections.rs:+5:9: +5:17
_3 = const 3_usize;
_0 = _1[_3];
_0 = (*_2)[_3];
return;
}
}

View File

@ -1,11 +1,11 @@
// MIR for `tuples` after built
fn tuples(_1: (u32, i32)) -> (u32, i32) {
let mut _0: (u32, i32); // return place in scope 0 at $DIR/projections.rs:+0:29: +0:39
let mut _0: (u32, i32);
bb0: {
(_0.0: u32) = (_1.0: u32); // scope 0 at $DIR/projections.rs:+4:13: +4:24
(_0.1: i32) = (_1.1: i32); // scope 0 at $DIR/projections.rs:+5:13: +5:24
return; // scope 0 at $DIR/projections.rs:+6:13: +6:21
(_0.0: u32) = (_1.0: u32);
(_0.1: i32) = (_1.1: i32);
return;
}
}

View File

@ -1,10 +1,10 @@
// MIR for `unions` after built
fn unions(_1: U) -> i32 {
let mut _0: i32; // return place in scope 0 at $DIR/projections.rs:+0:20: +0:23
let mut _0: i32;
bb0: {
_0 = (_1.0: i32); // scope 0 at $DIR/projections.rs:+2:9: +2:18
return; // scope 0 at $DIR/projections.rs:+3:9: +3:17
_0 = (_1.0: i32);
return;
}
}

View File

@ -1,10 +1,10 @@
// MIR for `unwrap` after built
fn unwrap(_1: Option<i32>) -> i32 {
let mut _0: i32; // return place in scope 0 at $DIR/projections.rs:+0:32: +0:35
let mut _0: i32;
bb0: {
_0 = ((_1 as variant#1).0: i32); // scope 0 at $DIR/projections.rs:+2:9: +2:40
return; // scope 0 at $DIR/projections.rs:+3:9: +3:17
_0 = ((_1 as variant#1).0: i32);
return;
}
}

View File

@ -1,10 +1,10 @@
// MIR for `unwrap_deref` after built
fn unwrap_deref(_1: Option<&i32>) -> i32 {
let mut _0: i32; // return place in scope 0 at $DIR/projections.rs:+0:39: +0:42
let mut _0: i32;
bb0: {
_0 = (*((_1 as variant#1).0: &i32)); // scope 0 at $DIR/projections.rs:+2:9: +2:49
return; // scope 0 at $DIR/projections.rs:+3:9: +3:17
_0 = (*((_1 as variant#1).0: &i32));
return;
}
}

View File

@ -1,13 +1,13 @@
// MIR for `immut_ref` after built
fn immut_ref(_1: &i32) -> &i32 {
let mut _0: &i32; // return place in scope 0 at $DIR/references.rs:+0:30: +0:34
let mut _2: *const i32; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
let mut _0: &i32;
let mut _2: *const i32;
bb0: {
_2 = &raw const (*_1); // scope 0 at $DIR/references.rs:+5:13: +5:29
_0 = &(*_2); // scope 0 at $DIR/references.rs:+6:13: +6:23
Retag(_0); // scope 0 at $DIR/references.rs:+7:13: +7:23
return; // scope 0 at $DIR/references.rs:+8:13: +8:21
_2 = &raw const (*_1);
_0 = &(*_2);
Retag(_0);
return;
}
}

View File

@ -1,13 +1,13 @@
// MIR for `mut_ref` after built
fn mut_ref(_1: &mut i32) -> &mut i32 {
let mut _0: &mut i32; // return place in scope 0 at $DIR/references.rs:+0:32: +0:40
let mut _2: *mut i32; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
let mut _0: &mut i32;
let mut _2: *mut i32;
bb0: {
_2 = &raw mut (*_1); // scope 0 at $DIR/references.rs:+5:13: +5:33
_0 = &mut (*_2); // scope 0 at $DIR/references.rs:+6:13: +6:26
Retag(_0); // scope 0 at $DIR/references.rs:+7:13: +7:23
return; // scope 0 at $DIR/references.rs:+8:13: +8:21
_2 = &raw mut (*_1);
_0 = &mut (*_2);
Retag(_0);
return;
}
}

View File

@ -1,10 +1,10 @@
// MIR for `raw_pointer` after built
fn raw_pointer(_1: *const i32) -> *const i32 {
let mut _0: *const i32; // return place in scope 0 at $DIR/references.rs:+0:38: +0:48
let mut _0: *const i32;
bb0: {
_0 = &raw const (*_1); // scope 0 at $DIR/references.rs:+4:9: +4:27
return; // scope 0 at $DIR/references.rs:+5:9: +5:17
_0 = &raw const (*_1);
return;
}
}

View File

@ -1,10 +1,10 @@
// MIR for `raw_pointer_offset` after built
fn raw_pointer_offset(_1: *const i32) -> *const i32 {
let mut _0: *const i32; // return place in scope 0 at $DIR/references.rs:+0:45: +0:55
let mut _0: *const i32;
bb0: {
_0 = Offset(_1, const 1_isize); // scope 0 at $DIR/references.rs:+2:9: +2:33
return; // scope 0 at $DIR/references.rs:+3:9: +3:17
_0 = Offset(_1, const 1_isize);
return;
}
}

View File

@ -1,20 +1,20 @@
// MIR for `simple` after built
fn simple(_1: i32) -> i32 {
let mut _0: i32; // return place in scope 0 at $DIR/simple_assign.rs:+0:26: +0:29
let mut _2: i32; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
let mut _3: i32; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
let mut _0: i32;
let mut _2: i32;
let mut _3: i32;
bb0: {
StorageLive(_2); // scope 0 at $DIR/simple_assign.rs:+6:13: +6:31
_2 = _1; // scope 0 at $DIR/simple_assign.rs:+7:13: +7:22
goto -> bb1; // scope 0 at $DIR/simple_assign.rs:+8:13: +8:23
StorageLive(_2);
_2 = _1;
goto -> bb1;
}
bb1: {
_3 = move _2; // scope 0 at $DIR/simple_assign.rs:+12:13: +12:32
StorageDead(_2); // scope 0 at $DIR/simple_assign.rs:+13:13: +13:31
_0 = _3; // scope 0 at $DIR/simple_assign.rs:+14:13: +14:24
return; // scope 0 at $DIR/simple_assign.rs:+15:13: +15:21
_3 = move _2;
StorageDead(_2);
_0 = _3;
return;
}
}

View File

@ -1,10 +1,10 @@
// MIR for `simple_ref` after built
fn simple_ref(_1: &mut i32) -> &mut i32 {
let mut _0: &mut i32; // return place in scope 0 at $DIR/simple_assign.rs:+0:35: +0:43
let mut _0: &mut i32;
bb0: {
_0 = move _1; // scope 0 at $DIR/simple_assign.rs:+2:9: +2:22
return; // scope 0 at $DIR/simple_assign.rs:+3:9: +3:17
_0 = move _1;
return;
}
}

View File

@ -1,17 +1,17 @@
// MIR for `assert_nonzero` after built
fn assert_nonzero(_1: i32) -> () {
let mut _0: (); // return place in scope 0 at $DIR/terminators.rs:+0:27: +0:27
let mut _0: ();
bb0: {
switchInt(_1) -> [0: bb1, otherwise: bb2]; // scope 0 at $DIR/terminators.rs:+3:13: +6:14
switchInt(_1) -> [0: bb1, otherwise: bb2];
}
bb1: {
unreachable; // scope 0 at $DIR/terminators.rs:+10:13: +10:26
unreachable;
}
bb2: {
return; // scope 0 at $DIR/terminators.rs:+14:13: +14:21
return;
}
}

View File

@ -1,16 +1,13 @@
// MIR for `direct_call` after built
fn direct_call(_1: i32) -> i32 {
let mut _0: i32; // return place in scope 0 at $DIR/terminators.rs:+0:27: +0:30
let mut _0: i32;
bb0: {
_0 = ident::<i32>(_1) -> bb1; // scope 0 at $DIR/terminators.rs:+3:13: +3:42
// mir::Constant
// + span: $DIR/terminators.rs:15:33: 15:38
// + literal: Const { ty: fn(i32) -> i32 {ident::<i32>}, val: Value(<ZST>) }
_0 = ident::<i32>(_1) -> bb1;
}
bb1: {
return; // scope 0 at $DIR/terminators.rs:+7:13: +7:21
return;
}
}

View File

@ -1,14 +1,14 @@
// MIR for `drop_first` after built
fn drop_first(_1: WriteOnDrop<'_>, _2: WriteOnDrop<'_>) -> () {
let mut _0: (); // return place in scope 0 at $DIR/terminators.rs:+0:59: +0:59
let mut _0: ();
bb0: {
drop(_1) -> bb1; // scope 0 at $DIR/terminators.rs:+3:13: +3:30
drop(_1) -> bb1;
}
bb1: {
_1 = move _2; // scope 0 at $DIR/terminators.rs:+7:13: +7:24
return; // scope 0 at $DIR/terminators.rs:+8:13: +8:21
_1 = move _2;
return;
}
}

View File

@ -1,13 +1,13 @@
// MIR for `drop_second` after built
fn drop_second(_1: WriteOnDrop<'_>, _2: WriteOnDrop<'_>) -> () {
let mut _0: (); // return place in scope 0 at $DIR/terminators.rs:+0:60: +0:60
let mut _0: ();
bb0: {
drop(_2) -> bb1; // scope 0 at $DIR/terminators.rs:+3:13: +3:30
drop(_2) -> bb1;
}
bb1: {
return; // scope 0 at $DIR/terminators.rs:+7:13: +7:21
return;
}
}

View File

@ -1,13 +1,13 @@
// MIR for `indirect_call` after built
fn indirect_call(_1: i32, _2: fn(i32) -> i32) -> i32 {
let mut _0: i32; // return place in scope 0 at $DIR/terminators.rs:+0:48: +0:51
let mut _0: i32;
bb0: {
_0 = _2(_1) -> bb1; // scope 0 at $DIR/terminators.rs:+3:13: +3:38
_0 = _2(_1) -> bb1;
}
bb1: {
return; // scope 0 at $DIR/terminators.rs:+7:13: +7:21
return;
}
}

View File

@ -1,22 +1,22 @@
// MIR for `bar` after built
fn bar(_1: Bar) -> usize {
debug bar => _1; // in scope 0 at $DIR/enum_cast.rs:+0:8: +0:11
let mut _0: usize; // return place in scope 0 at $DIR/enum_cast.rs:+0:21: +0:26
let _2: Bar; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
let mut _3: isize; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
let mut _4: u8; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
let mut _5: bool; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
debug bar => _1;
let mut _0: usize;
let _2: Bar;
let mut _3: isize;
let mut _4: u8;
let mut _5: bool;
bb0: {
StorageLive(_2); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
_2 = move _1; // scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
_3 = discriminant(_2); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
_4 = _3 as u8 (IntToInt); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
_5 = Le(_4, const 1_u8); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
assume(move _5); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
_0 = move _3 as usize (IntToInt); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
StorageDead(_2); // scope 0 at $DIR/enum_cast.rs:+1:16: +1:17
return; // scope 0 at $DIR/enum_cast.rs:+2:2: +2:2
StorageLive(_2);
_2 = move _1;
_3 = discriminant(_2);
_4 = _3 as u8 (IntToInt);
_5 = Le(_4, const 1_u8);
assume(move _5);
_0 = move _3 as usize (IntToInt);
StorageDead(_2);
return;
}
}

View File

@ -1,22 +1,22 @@
// MIR for `boo` after built
fn boo(_1: Boo) -> usize {
debug boo => _1; // in scope 0 at $DIR/enum_cast.rs:+0:8: +0:11
let mut _0: usize; // return place in scope 0 at $DIR/enum_cast.rs:+0:21: +0:26
let _2: Boo; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
let mut _3: u8; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
let mut _4: u8; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
let mut _5: bool; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
debug boo => _1;
let mut _0: usize;
let _2: Boo;
let mut _3: u8;
let mut _4: u8;
let mut _5: bool;
bb0: {
StorageLive(_2); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
_2 = move _1; // scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
_3 = discriminant(_2); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
_4 = _3 as u8 (IntToInt); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
_5 = Le(_4, const 1_u8); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
assume(move _5); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
_0 = move _3 as usize (IntToInt); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
StorageDead(_2); // scope 0 at $DIR/enum_cast.rs:+1:16: +1:17
return; // scope 0 at $DIR/enum_cast.rs:+2:2: +2:2
StorageLive(_2);
_2 = move _1;
_3 = discriminant(_2);
_4 = _3 as u8 (IntToInt);
_5 = Le(_4, const 1_u8);
assume(move _5);
_0 = move _3 as usize (IntToInt);
StorageDead(_2);
return;
}
}

View File

@ -1,71 +1,71 @@
// MIR for `droppy` after built
fn droppy() -> () {
let mut _0: (); // return place in scope 0 at $DIR/enum_cast.rs:+0:13: +0:13
let _1: (); // in scope 0 at $DIR/enum_cast.rs:+1:5: +6:6
let _2: Droppy; // in scope 0 at $DIR/enum_cast.rs:+2:13: +2:14
let _4: Droppy; // in scope 0 at $DIR/enum_cast.rs:+5:17: +5:18
let mut _5: isize; // in scope 0 at $DIR/enum_cast.rs:+5:17: +5:18
let mut _6: u8; // in scope 0 at $DIR/enum_cast.rs:+5:17: +5:27
let mut _7: bool; // in scope 0 at $DIR/enum_cast.rs:+5:17: +5:27
let _8: Droppy; // in scope 0 at $DIR/enum_cast.rs:+7:9: +7:10
let mut _0: ();
let _1: ();
let _2: Droppy;
let _4: Droppy;
let mut _5: isize;
let mut _6: u8;
let mut _7: bool;
let _8: Droppy;
scope 1 {
debug x => _2; // in scope 1 at $DIR/enum_cast.rs:+2:13: +2:14
debug x => _2;
scope 2 {
debug y => _3; // in scope 2 at $DIR/enum_cast.rs:+5:13: +5:14
debug y => _3;
}
scope 3 {
let _3: usize; // in scope 3 at $DIR/enum_cast.rs:+5:13: +5:14
let _3: usize;
}
}
scope 4 {
debug z => _8; // in scope 4 at $DIR/enum_cast.rs:+7:9: +7:10
debug z => _8;
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/enum_cast.rs:+1:5: +6:6
StorageLive(_2); // scope 0 at $DIR/enum_cast.rs:+2:13: +2:14
_2 = Droppy::C; // scope 0 at $DIR/enum_cast.rs:+2:17: +2:26
FakeRead(ForLet(None), _2); // scope 0 at $DIR/enum_cast.rs:+2:13: +2:14
StorageLive(_3); // scope 3 at $DIR/enum_cast.rs:+5:13: +5:14
StorageLive(_4); // scope 3 at $DIR/enum_cast.rs:+5:17: +5:18
_4 = move _2; // scope 3 at $DIR/enum_cast.rs:+5:17: +5:18
_5 = discriminant(_4); // scope 3 at $DIR/enum_cast.rs:+5:17: +5:27
_6 = _5 as u8 (IntToInt); // scope 3 at $DIR/enum_cast.rs:+5:17: +5:27
_7 = Le(_6, const 2_u8); // scope 3 at $DIR/enum_cast.rs:+5:17: +5:27
assume(move _7); // scope 3 at $DIR/enum_cast.rs:+5:17: +5:27
_3 = move _5 as usize (IntToInt); // scope 3 at $DIR/enum_cast.rs:+5:17: +5:27
drop(_4) -> [return: bb1, unwind: bb4]; // scope 3 at $DIR/enum_cast.rs:+5:26: +5:27
StorageLive(_1);
StorageLive(_2);
_2 = Droppy::C;
FakeRead(ForLet(None), _2);
StorageLive(_3);
StorageLive(_4);
_4 = move _2;
_5 = discriminant(_4);
_6 = _5 as u8 (IntToInt);
_7 = Le(_6, const 2_u8);
assume(move _7);
_3 = move _5 as usize (IntToInt);
drop(_4) -> [return: bb1, unwind: bb4];
}
bb1: {
StorageDead(_4); // scope 3 at $DIR/enum_cast.rs:+5:26: +5:27
FakeRead(ForLet(None), _3); // scope 3 at $DIR/enum_cast.rs:+5:13: +5:14
_1 = const (); // scope 0 at $DIR/enum_cast.rs:+1:5: +6:6
StorageDead(_3); // scope 1 at $DIR/enum_cast.rs:+6:5: +6:6
drop(_2) -> [return: bb2, unwind: bb5]; // scope 0 at $DIR/enum_cast.rs:+6:5: +6:6
StorageDead(_4);
FakeRead(ForLet(None), _3);
_1 = const ();
StorageDead(_3);
drop(_2) -> [return: bb2, unwind: bb5];
}
bb2: {
StorageDead(_2); // scope 0 at $DIR/enum_cast.rs:+6:5: +6:6
StorageDead(_1); // scope 0 at $DIR/enum_cast.rs:+6:5: +6:6
StorageLive(_8); // scope 0 at $DIR/enum_cast.rs:+7:9: +7:10
_8 = Droppy::B; // scope 0 at $DIR/enum_cast.rs:+7:13: +7:22
FakeRead(ForLet(None), _8); // scope 0 at $DIR/enum_cast.rs:+7:9: +7:10
_0 = const (); // scope 0 at $DIR/enum_cast.rs:+0:13: +8:2
drop(_8) -> [return: bb3, unwind: bb5]; // scope 0 at $DIR/enum_cast.rs:+8:1: +8:2
StorageDead(_2);
StorageDead(_1);
StorageLive(_8);
_8 = Droppy::B;
FakeRead(ForLet(None), _8);
_0 = const ();
drop(_8) -> [return: bb3, unwind: bb5];
}
bb3: {
StorageDead(_8); // scope 0 at $DIR/enum_cast.rs:+8:1: +8:2
return; // scope 0 at $DIR/enum_cast.rs:+8:2: +8:2
StorageDead(_8);
return;
}
bb4 (cleanup): {
drop(_2) -> [return: bb5, unwind terminate]; // scope 0 at $DIR/enum_cast.rs:+6:5: +6:6
drop(_2) -> [return: bb5, unwind terminate];
}
bb5 (cleanup): {
resume; // scope 0 at $DIR/enum_cast.rs:+0:1: +8:2
resume;
}
}

View File

@ -1,22 +1,22 @@
// MIR for `far` after built
fn far(_1: Far) -> isize {
debug far => _1; // in scope 0 at $DIR/enum_cast.rs:+0:8: +0:11
let mut _0: isize; // return place in scope 0 at $DIR/enum_cast.rs:+0:21: +0:26
let _2: Far; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
let mut _3: i16; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
let mut _4: u16; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
let mut _5: bool; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
debug far => _1;
let mut _0: isize;
let _2: Far;
let mut _3: i16;
let mut _4: u16;
let mut _5: bool;
bb0: {
StorageLive(_2); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
_2 = move _1; // scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
_3 = discriminant(_2); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
_4 = _3 as u16 (IntToInt); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
_5 = Le(_4, const 1_u16); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
assume(move _5); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
_0 = move _3 as isize (IntToInt); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
StorageDead(_2); // scope 0 at $DIR/enum_cast.rs:+1:16: +1:17
return; // scope 0 at $DIR/enum_cast.rs:+2:2: +2:2
StorageLive(_2);
_2 = move _1;
_3 = discriminant(_2);
_4 = _3 as u16 (IntToInt);
_5 = Le(_4, const 1_u16);
assume(move _5);
_0 = move _3 as isize (IntToInt);
StorageDead(_2);
return;
}
}

View File

@ -1,17 +1,17 @@
// MIR for `foo` after built
fn foo(_1: Foo) -> usize {
debug foo => _1; // in scope 0 at $DIR/enum_cast.rs:+0:8: +0:11
let mut _0: usize; // return place in scope 0 at $DIR/enum_cast.rs:+0:21: +0:26
let _2: Foo; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
let mut _3: isize; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
debug foo => _1;
let mut _0: usize;
let _2: Foo;
let mut _3: isize;
bb0: {
StorageLive(_2); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
_2 = move _1; // scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
_3 = discriminant(_2); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
_0 = move _3 as usize (IntToInt); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
StorageDead(_2); // scope 0 at $DIR/enum_cast.rs:+1:16: +1:17
return; // scope 0 at $DIR/enum_cast.rs:+2:2: +2:2
StorageLive(_2);
_2 = move _1;
_3 = discriminant(_2);
_0 = move _3 as usize (IntToInt);
StorageDead(_2);
return;
}
}

View File

@ -1,26 +1,26 @@
// MIR for `offsetty` after built
fn offsetty(_1: NotStartingAtZero) -> u32 {
debug x => _1; // in scope 0 at $DIR/enum_cast.rs:+0:13: +0:14
let mut _0: u32; // return place in scope 0 at $DIR/enum_cast.rs:+0:38: +0:41
let _2: NotStartingAtZero; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:6
let mut _3: isize; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:6
let mut _4: u8; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
let mut _5: bool; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
let mut _6: bool; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
let mut _7: bool; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
debug x => _1;
let mut _0: u32;
let _2: NotStartingAtZero;
let mut _3: isize;
let mut _4: u8;
let mut _5: bool;
let mut _6: bool;
let mut _7: bool;
bb0: {
StorageLive(_2); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:6
_2 = move _1; // scope 0 at $DIR/enum_cast.rs:+1:5: +1:6
_3 = discriminant(_2); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
_4 = _3 as u8 (IntToInt); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
_5 = Ge(_4, const 4_u8); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
_6 = Le(_4, const 8_u8); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
_7 = BitAnd(move _5, move _6); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
assume(move _7); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
_0 = move _3 as u32 (IntToInt); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
StorageDead(_2); // scope 0 at $DIR/enum_cast.rs:+1:12: +1:13
return; // scope 0 at $DIR/enum_cast.rs:+2:2: +2:2
StorageLive(_2);
_2 = move _1;
_3 = discriminant(_2);
_4 = _3 as u8 (IntToInt);
_5 = Ge(_4, const 4_u8);
_6 = Le(_4, const 8_u8);
_7 = BitAnd(move _5, move _6);
assume(move _7);
_0 = move _3 as u32 (IntToInt);
StorageDead(_2);
return;
}
}

View File

@ -1,26 +1,26 @@
// MIR for `signy` after built
fn signy(_1: SignedAroundZero) -> i16 {
debug x => _1; // in scope 0 at $DIR/enum_cast.rs:+0:10: +0:11
let mut _0: i16; // return place in scope 0 at $DIR/enum_cast.rs:+0:34: +0:37
let _2: SignedAroundZero; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:6
let mut _3: i16; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:6
let mut _4: u16; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
let mut _5: bool; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
let mut _6: bool; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
let mut _7: bool; // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
debug x => _1;
let mut _0: i16;
let _2: SignedAroundZero;
let mut _3: i16;
let mut _4: u16;
let mut _5: bool;
let mut _6: bool;
let mut _7: bool;
bb0: {
StorageLive(_2); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:6
_2 = move _1; // scope 0 at $DIR/enum_cast.rs:+1:5: +1:6
_3 = discriminant(_2); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
_4 = _3 as u16 (IntToInt); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
_5 = Ge(_4, const 65534_u16); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
_6 = Le(_4, const 2_u16); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
_7 = BitOr(move _5, move _6); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
assume(move _7); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
_0 = move _3 as i16 (IntToInt); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:13
StorageDead(_2); // scope 0 at $DIR/enum_cast.rs:+1:12: +1:13
return; // scope 0 at $DIR/enum_cast.rs:+2:2: +2:2
StorageLive(_2);
_2 = move _1;
_3 = discriminant(_2);
_4 = _3 as u16 (IntToInt);
_5 = Ge(_4, const 65534_u16);
_6 = Le(_4, const 2_u16);
_7 = BitOr(move _5, move _6);
assume(move _7);
_0 = move _3 as i16 (IntToInt);
StorageDead(_2);
return;
}
}

View File

@ -1,17 +1,17 @@
// MIR for `unsigny` after built
fn unsigny(_1: UnsignedAroundZero) -> u16 {
debug x => _1; // in scope 0 at $DIR/enum_cast.rs:+0:12: +0:13
let mut _0: u16; // return place in scope 0 at $DIR/enum_cast.rs:+0:38: +0:41
let _2: UnsignedAroundZero; // in scope 0 at $DIR/enum_cast.rs:+2:5: +2:6
let mut _3: u16; // in scope 0 at $DIR/enum_cast.rs:+2:5: +2:6
debug x => _1;
let mut _0: u16;
let _2: UnsignedAroundZero;
let mut _3: u16;
bb0: {
StorageLive(_2); // scope 0 at $DIR/enum_cast.rs:+2:5: +2:6
_2 = move _1; // scope 0 at $DIR/enum_cast.rs:+2:5: +2:6
_3 = discriminant(_2); // scope 0 at $DIR/enum_cast.rs:+2:5: +2:13
_0 = move _3 as u16 (IntToInt); // scope 0 at $DIR/enum_cast.rs:+2:5: +2:13
StorageDead(_2); // scope 0 at $DIR/enum_cast.rs:+2:12: +2:13
return; // scope 0 at $DIR/enum_cast.rs:+3:2: +3:2
StorageLive(_2);
_2 = move _1;
_3 = discriminant(_2);
_0 = move _3 as u16 (IntToInt);
StorageDead(_2);
return;
}
}

View File

@ -5,71 +5,65 @@
| 1: user_ty: Canonical { value: Ty(std::option::Option<u8>), max_universe: U0, variables: [] }, span: $DIR/issue_101867.rs:3:12: 3:22, inferred_ty: std::option::Option<u8>
|
fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/issue_101867.rs:+0:11: +0:11
let _1: std::option::Option<u8> as UserTypeProjection { base: UserType(0), projs: [] }; // in scope 0 at $DIR/issue_101867.rs:+1:9: +1:10
let mut _2: !; // in scope 0 at $DIR/issue_101867.rs:+2:26: +4:6
let _3: (); // in scope 0 at $SRC_DIR/std/src/panic.rs:LL:COL
let mut _4: !; // in scope 0 at $SRC_DIR/std/src/panic.rs:LL:COL
let mut _6: isize; // in scope 0 at $DIR/issue_101867.rs:+2:9: +2:16
let mut _0: ();
let _1: std::option::Option<u8> as UserTypeProjection { base: UserType(0), projs: [] };
let mut _2: !;
let _3: ();
let mut _4: !;
let mut _6: isize;
scope 1 {
debug x => _1; // in scope 1 at $DIR/issue_101867.rs:+1:9: +1:10
let _5: u8; // in scope 1 at $DIR/issue_101867.rs:+2:14: +2:15
debug x => _1;
let _5: u8;
scope 2 {
debug y => _5; // in scope 2 at $DIR/issue_101867.rs:+2:14: +2:15
debug y => _5;
}
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/issue_101867.rs:+1:9: +1:10
_1 = Option::<u8>::Some(const 1_u8); // scope 0 at $DIR/issue_101867.rs:+1:25: +1:32
FakeRead(ForLet(None), _1); // scope 0 at $DIR/issue_101867.rs:+1:9: +1:10
AscribeUserType(_1, o, UserTypeProjection { base: UserType(1), projs: [] }); // scope 0 at $DIR/issue_101867.rs:+1:12: +1:22
StorageLive(_5); // scope 1 at $DIR/issue_101867.rs:+2:14: +2:15
FakeRead(ForMatchedPlace(None), _1); // scope 1 at $DIR/issue_101867.rs:+2:19: +2:20
_6 = discriminant(_1); // scope 1 at $DIR/issue_101867.rs:+2:19: +2:20
switchInt(move _6) -> [1: bb4, otherwise: bb3]; // scope 1 at $DIR/issue_101867.rs:+2:9: +2:16
StorageLive(_1);
_1 = Option::<u8>::Some(const 1_u8);
FakeRead(ForLet(None), _1);
AscribeUserType(_1, o, UserTypeProjection { base: UserType(1), projs: [] });
StorageLive(_5);
FakeRead(ForMatchedPlace(None), _1);
_6 = discriminant(_1);
switchInt(move _6) -> [1: bb4, otherwise: bb3];
}
bb1: {
StorageLive(_3); // scope 1 at $SRC_DIR/std/src/panic.rs:LL:COL
StorageLive(_4); // scope 1 at $SRC_DIR/std/src/panic.rs:LL:COL
_4 = begin_panic::<&str>(const "explicit panic") -> bb7; // scope 1 at $SRC_DIR/std/src/panic.rs:LL:COL
// mir::Constant
// + span: $SRC_DIR/std/src/panic.rs:LL:COL
// + literal: Const { ty: fn(&str) -> ! {begin_panic::<&str>}, val: Value(<ZST>) }
// mir::Constant
// + span: $SRC_DIR/std/src/panic.rs:LL:COL
// + literal: Const { ty: &str, val: Value(Slice(..)) }
StorageLive(_3);
StorageLive(_4);
_4 = begin_panic::<&str>(const "explicit panic") -> bb7;
}
bb2: {
StorageDead(_4); // scope 1 at $SRC_DIR/std/src/panic.rs:LL:COL
StorageDead(_3); // scope 1 at $DIR/issue_101867.rs:+3:16: +3:17
unreachable; // scope 1 at $DIR/issue_101867.rs:+2:26: +4:6
StorageDead(_4);
StorageDead(_3);
unreachable;
}
bb3: {
goto -> bb6; // scope 1 at $DIR/issue_101867.rs:+2:19: +2:20
goto -> bb6;
}
bb4: {
falseEdge -> [real: bb5, imaginary: bb3]; // scope 1 at $DIR/issue_101867.rs:+2:9: +2:16
falseEdge -> [real: bb5, imaginary: bb3];
}
bb5: {
_5 = ((_1 as Some).0: u8); // scope 1 at $DIR/issue_101867.rs:+2:14: +2:15
_0 = const (); // scope 0 at $DIR/issue_101867.rs:+0:11: +5:2
StorageDead(_5); // scope 1 at $DIR/issue_101867.rs:+5:1: +5:2
StorageDead(_1); // scope 0 at $DIR/issue_101867.rs:+5:1: +5:2
return; // scope 0 at $DIR/issue_101867.rs:+5:2: +5:2
_5 = ((_1 as Some).0: u8);
_0 = const ();
StorageDead(_5);
StorageDead(_1);
return;
}
bb6: {
StorageDead(_5); // scope 1 at $DIR/issue_101867.rs:+5:1: +5:2
goto -> bb1; // scope 0 at $DIR/issue_101867.rs:+0:11: +5:2
StorageDead(_5);
goto -> bb1;
}
bb7 (cleanup): {
resume; // scope 0 at $DIR/issue_101867.rs:+0:1: +5:2
resume;
}
}

View File

@ -1,82 +1,79 @@
// MIR for `main` after built
fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/issue_49232.rs:+0:11: +0:11
let mut _1: (); // in scope 0 at $DIR/issue_49232.rs:+0:1: +10:2
let _2: i32; // in scope 0 at $DIR/issue_49232.rs:+2:13: +2:19
let mut _3: bool; // in scope 0 at $DIR/issue_49232.rs:+3:19: +3:23
let mut _4: !; // in scope 0 at $DIR/issue_49232.rs:+5:25: +5:30
let _5: (); // in scope 0 at $DIR/issue_49232.rs:+8:9: +8:22
let mut _6: &i32; // in scope 0 at $DIR/issue_49232.rs:+8:14: +8:21
let mut _0: ();
let mut _1: ();
let _2: i32;
let mut _3: bool;
let mut _4: !;
let _5: ();
let mut _6: &i32;
scope 1 {
debug beacon => _2; // in scope 1 at $DIR/issue_49232.rs:+2:13: +2:19
debug beacon => _2;
}
bb0: {
goto -> bb1; // scope 0 at $DIR/issue_49232.rs:+1:5: +9:6
goto -> bb1;
}
bb1: {
falseUnwind -> [real: bb2, unwind: bb11]; // scope 0 at $DIR/issue_49232.rs:+1:5: +9:6
falseUnwind -> [real: bb2, unwind: bb11];
}
bb2: {
StorageLive(_2); // scope 0 at $DIR/issue_49232.rs:+2:13: +2:19
StorageLive(_3); // scope 0 at $DIR/issue_49232.rs:+3:19: +3:23
_3 = const true; // scope 0 at $DIR/issue_49232.rs:+3:19: +3:23
FakeRead(ForMatchedPlace(None), _3); // scope 0 at $DIR/issue_49232.rs:+3:19: +3:23
switchInt(_3) -> [0: bb3, otherwise: bb4]; // scope 0 at $DIR/issue_49232.rs:+3:13: +3:23
StorageLive(_2);
StorageLive(_3);
_3 = const true;
FakeRead(ForMatchedPlace(None), _3);
switchInt(_3) -> [0: bb3, otherwise: bb4];
}
bb3: {
falseEdge -> [real: bb5, imaginary: bb4]; // scope 0 at $DIR/issue_49232.rs:+4:17: +4:22
falseEdge -> [real: bb5, imaginary: bb4];
}
bb4: {
_0 = const (); // scope 0 at $DIR/issue_49232.rs:+5:25: +5:30
goto -> bb10; // scope 0 at $DIR/issue_49232.rs:+5:25: +5:30
_0 = const ();
goto -> bb10;
}
bb5: {
_2 = const 4_i32; // scope 0 at $DIR/issue_49232.rs:+4:26: +4:27
goto -> bb8; // scope 0 at $DIR/issue_49232.rs:+4:26: +4:27
_2 = const 4_i32;
goto -> bb8;
}
bb6: {
unreachable; // scope 0 at $DIR/issue_49232.rs:+5:25: +5:30
unreachable;
}
bb7: {
goto -> bb8; // scope 0 at $DIR/issue_49232.rs:+6:13: +6:14
goto -> bb8;
}
bb8: {
FakeRead(ForLet(None), _2); // scope 0 at $DIR/issue_49232.rs:+2:13: +2:19
StorageDead(_3); // scope 0 at $DIR/issue_49232.rs:+7:10: +7:11
StorageLive(_5); // scope 1 at $DIR/issue_49232.rs:+8:9: +8:22
StorageLive(_6); // scope 1 at $DIR/issue_49232.rs:+8:14: +8:21
_6 = &_2; // scope 1 at $DIR/issue_49232.rs:+8:14: +8:21
_5 = std::mem::drop::<&i32>(move _6) -> [return: bb9, unwind: bb11]; // scope 1 at $DIR/issue_49232.rs:+8:9: +8:22
// mir::Constant
// + span: $DIR/issue_49232.rs:13:9: 13:13
// + literal: Const { ty: fn(&i32) {std::mem::drop::<&i32>}, val: Value(<ZST>) }
FakeRead(ForLet(None), _2);
StorageDead(_3);
StorageLive(_5);
StorageLive(_6);
_6 = &_2;
_5 = std::mem::drop::<&i32>(move _6) -> [return: bb9, unwind: bb11];
}
bb9: {
StorageDead(_6); // scope 1 at $DIR/issue_49232.rs:+8:21: +8:22
StorageDead(_5); // scope 1 at $DIR/issue_49232.rs:+8:22: +8:23
_1 = const (); // scope 0 at $DIR/issue_49232.rs:+1:10: +9:6
StorageDead(_2); // scope 0 at $DIR/issue_49232.rs:+9:5: +9:6
goto -> bb1; // scope 0 at $DIR/issue_49232.rs:+1:5: +9:6
StorageDead(_6);
StorageDead(_5);
_1 = const ();
StorageDead(_2);
goto -> bb1;
}
bb10: {
StorageDead(_3); // scope 0 at $DIR/issue_49232.rs:+7:10: +7:11
StorageDead(_2); // scope 0 at $DIR/issue_49232.rs:+9:5: +9:6
return; // scope 0 at $DIR/issue_49232.rs:+10:2: +10:2
StorageDead(_3);
StorageDead(_2);
return;
}
bb11 (cleanup): {
resume; // scope 0 at $DIR/issue_49232.rs:+0:1: +10:2
resume;
}
}

View File

@ -1,113 +1,110 @@
// MIR for `full_tested_match` after built
fn full_tested_match() -> () {
let mut _0: (); // return place in scope 0 at $DIR/match_false_edges.rs:+0:28: +0:28
let mut _1: (i32, i32); // in scope 0 at $DIR/match_false_edges.rs:+1:13: +5:6
let mut _2: std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
let mut _3: isize; // in scope 0 at $DIR/match_false_edges.rs:+2:9: +2:16
let mut _4: &std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
let _5: i32; // in scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
let _6: &i32; // in scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
let mut _7: bool; // in scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
let mut _8: i32; // in scope 0 at $DIR/match_false_edges.rs:+2:35: +2:36
let _9: i32; // in scope 0 at $DIR/match_false_edges.rs:+3:14: +3:15
let mut _10: i32; // in scope 0 at $DIR/match_false_edges.rs:+3:24: +3:25
let mut _0: ();
let mut _1: (i32, i32);
let mut _2: std::option::Option<i32>;
let mut _3: isize;
let mut _4: &std::option::Option<i32>;
let _5: i32;
let _6: &i32;
let mut _7: bool;
let mut _8: i32;
let _9: i32;
let mut _10: i32;
scope 1 {
}
scope 2 {
debug x => _5; // in scope 2 at $DIR/match_false_edges.rs:+2:14: +2:15
debug x => _6; // in scope 2 at $DIR/match_false_edges.rs:+2:14: +2:15
debug x => _5;
debug x => _6;
}
scope 3 {
debug y => _9; // in scope 3 at $DIR/match_false_edges.rs:+3:14: +3:15
debug y => _9;
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/match_false_edges.rs:+1:13: +5:6
StorageLive(_2); // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
_2 = Option::<i32>::Some(const 42_i32); // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
FakeRead(ForMatchedPlace(None), _2); // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
_3 = discriminant(_2); // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
switchInt(move _3) -> [0: bb1, 1: bb2, otherwise: bb4]; // scope 0 at $DIR/match_false_edges.rs:+1:13: +1:27
StorageLive(_1);
StorageLive(_2);
_2 = Option::<i32>::Some(const 42_i32);
FakeRead(ForMatchedPlace(None), _2);
_3 = discriminant(_2);
switchInt(move _3) -> [0: bb1, 1: bb2, otherwise: bb4];
}
bb1: {
_1 = (const 3_i32, const 3_i32); // scope 0 at $DIR/match_false_edges.rs:+4:17: +4:23
goto -> bb11; // scope 0 at $DIR/match_false_edges.rs:+4:17: +4:23
_1 = (const 3_i32, const 3_i32);
goto -> bb11;
}
bb2: {
falseEdge -> [real: bb5, imaginary: bb3]; // scope 0 at $DIR/match_false_edges.rs:+2:9: +2:16
falseEdge -> [real: bb5, imaginary: bb3];
}
bb3: {
falseEdge -> [real: bb10, imaginary: bb1]; // scope 0 at $DIR/match_false_edges.rs:+3:9: +3:16
falseEdge -> [real: bb10, imaginary: bb1];
}
bb4: {
unreachable; // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
unreachable;
}
bb5: {
StorageLive(_6); // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
_6 = &((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
_4 = &shallow _2; // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
StorageLive(_7); // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
_7 = guard() -> [return: bb6, unwind: bb12]; // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
// mir::Constant
// + span: $DIR/match_false_edges.rs:14:20: 14:25
// + literal: Const { ty: fn() -> bool {guard}, val: Value(<ZST>) }
StorageLive(_6);
_6 = &((_2 as Some).0: i32);
_4 = &shallow _2;
StorageLive(_7);
_7 = guard() -> [return: bb6, unwind: bb12];
}
bb6: {
switchInt(move _7) -> [0: bb8, otherwise: bb7]; // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
switchInt(move _7) -> [0: bb8, otherwise: bb7];
}
bb7: {
StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:+2:26: +2:27
FakeRead(ForMatchGuard, _4); // scope 0 at $DIR/match_false_edges.rs:+2:26: +2:27
FakeRead(ForGuardBinding, _6); // scope 0 at $DIR/match_false_edges.rs:+2:26: +2:27
StorageLive(_5); // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
_5 = ((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
StorageLive(_8); // scope 2 at $DIR/match_false_edges.rs:+2:35: +2:36
_8 = _5; // scope 2 at $DIR/match_false_edges.rs:+2:35: +2:36
_1 = (const 1_i32, move _8); // scope 2 at $DIR/match_false_edges.rs:+2:31: +2:37
StorageDead(_8); // scope 2 at $DIR/match_false_edges.rs:+2:36: +2:37
StorageDead(_5); // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
StorageDead(_6); // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
goto -> bb11; // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
StorageDead(_7);
FakeRead(ForMatchGuard, _4);
FakeRead(ForGuardBinding, _6);
StorageLive(_5);
_5 = ((_2 as Some).0: i32);
StorageLive(_8);
_8 = _5;
_1 = (const 1_i32, move _8);
StorageDead(_8);
StorageDead(_5);
StorageDead(_6);
goto -> bb11;
}
bb8: {
goto -> bb9; // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
goto -> bb9;
}
bb9: {
StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:+2:26: +2:27
StorageDead(_6); // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
goto -> bb3; // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
StorageDead(_7);
StorageDead(_6);
goto -> bb3;
}
bb10: {
StorageLive(_9); // scope 0 at $DIR/match_false_edges.rs:+3:14: +3:15
_9 = ((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:+3:14: +3:15
StorageLive(_10); // scope 3 at $DIR/match_false_edges.rs:+3:24: +3:25
_10 = _9; // scope 3 at $DIR/match_false_edges.rs:+3:24: +3:25
_1 = (const 2_i32, move _10); // scope 3 at $DIR/match_false_edges.rs:+3:20: +3:26
StorageDead(_10); // scope 3 at $DIR/match_false_edges.rs:+3:25: +3:26
StorageDead(_9); // scope 0 at $DIR/match_false_edges.rs:+3:25: +3:26
goto -> bb11; // scope 0 at $DIR/match_false_edges.rs:+3:25: +3:26
StorageLive(_9);
_9 = ((_2 as Some).0: i32);
StorageLive(_10);
_10 = _9;
_1 = (const 2_i32, move _10);
StorageDead(_10);
StorageDead(_9);
goto -> bb11;
}
bb11: {
PlaceMention(_1); // scope 0 at $DIR/match_false_edges.rs:+1:13: +5:6
StorageDead(_2); // scope 0 at $DIR/match_false_edges.rs:+5:6: +5:7
StorageDead(_1); // scope 0 at $DIR/match_false_edges.rs:+5:6: +5:7
_0 = const (); // scope 0 at $DIR/match_false_edges.rs:+0:28: +6:2
return; // scope 0 at $DIR/match_false_edges.rs:+6:2: +6:2
PlaceMention(_1);
StorageDead(_2);
StorageDead(_1);
_0 = const ();
return;
}
bb12 (cleanup): {
resume; // scope 0 at $DIR/match_false_edges.rs:+0:1: +6:2
resume;
}
}

View File

@ -1,113 +1,110 @@
// MIR for `full_tested_match2` after built
fn full_tested_match2() -> () {
let mut _0: (); // return place in scope 0 at $DIR/match_false_edges.rs:+0:29: +0:29
let mut _1: (i32, i32); // in scope 0 at $DIR/match_false_edges.rs:+1:13: +5:6
let mut _2: std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
let mut _3: isize; // in scope 0 at $DIR/match_false_edges.rs:+2:9: +2:16
let mut _4: &std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
let _5: i32; // in scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
let _6: &i32; // in scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
let mut _7: bool; // in scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
let mut _8: i32; // in scope 0 at $DIR/match_false_edges.rs:+2:35: +2:36
let _9: i32; // in scope 0 at $DIR/match_false_edges.rs:+4:14: +4:15
let mut _10: i32; // in scope 0 at $DIR/match_false_edges.rs:+4:24: +4:25
let mut _0: ();
let mut _1: (i32, i32);
let mut _2: std::option::Option<i32>;
let mut _3: isize;
let mut _4: &std::option::Option<i32>;
let _5: i32;
let _6: &i32;
let mut _7: bool;
let mut _8: i32;
let _9: i32;
let mut _10: i32;
scope 1 {
}
scope 2 {
debug x => _5; // in scope 2 at $DIR/match_false_edges.rs:+2:14: +2:15
debug x => _6; // in scope 2 at $DIR/match_false_edges.rs:+2:14: +2:15
debug x => _5;
debug x => _6;
}
scope 3 {
debug y => _9; // in scope 3 at $DIR/match_false_edges.rs:+4:14: +4:15
debug y => _9;
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/match_false_edges.rs:+1:13: +5:6
StorageLive(_2); // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
_2 = Option::<i32>::Some(const 42_i32); // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
FakeRead(ForMatchedPlace(None), _2); // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
_3 = discriminant(_2); // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
switchInt(move _3) -> [0: bb1, 1: bb2, otherwise: bb4]; // scope 0 at $DIR/match_false_edges.rs:+1:13: +1:27
StorageLive(_1);
StorageLive(_2);
_2 = Option::<i32>::Some(const 42_i32);
FakeRead(ForMatchedPlace(None), _2);
_3 = discriminant(_2);
switchInt(move _3) -> [0: bb1, 1: bb2, otherwise: bb4];
}
bb1: {
falseEdge -> [real: bb10, imaginary: bb3]; // scope 0 at $DIR/match_false_edges.rs:+3:9: +3:13
falseEdge -> [real: bb10, imaginary: bb3];
}
bb2: {
falseEdge -> [real: bb5, imaginary: bb1]; // scope 0 at $DIR/match_false_edges.rs:+2:9: +2:16
falseEdge -> [real: bb5, imaginary: bb1];
}
bb3: {
StorageLive(_9); // scope 0 at $DIR/match_false_edges.rs:+4:14: +4:15
_9 = ((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:+4:14: +4:15
StorageLive(_10); // scope 3 at $DIR/match_false_edges.rs:+4:24: +4:25
_10 = _9; // scope 3 at $DIR/match_false_edges.rs:+4:24: +4:25
_1 = (const 2_i32, move _10); // scope 3 at $DIR/match_false_edges.rs:+4:20: +4:26
StorageDead(_10); // scope 3 at $DIR/match_false_edges.rs:+4:25: +4:26
StorageDead(_9); // scope 0 at $DIR/match_false_edges.rs:+4:25: +4:26
goto -> bb11; // scope 0 at $DIR/match_false_edges.rs:+4:25: +4:26
StorageLive(_9);
_9 = ((_2 as Some).0: i32);
StorageLive(_10);
_10 = _9;
_1 = (const 2_i32, move _10);
StorageDead(_10);
StorageDead(_9);
goto -> bb11;
}
bb4: {
unreachable; // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
unreachable;
}
bb5: {
StorageLive(_6); // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
_6 = &((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
_4 = &shallow _2; // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
StorageLive(_7); // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
_7 = guard() -> [return: bb6, unwind: bb12]; // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
// mir::Constant
// + span: $DIR/match_false_edges.rs:25:20: 25:25
// + literal: Const { ty: fn() -> bool {guard}, val: Value(<ZST>) }
StorageLive(_6);
_6 = &((_2 as Some).0: i32);
_4 = &shallow _2;
StorageLive(_7);
_7 = guard() -> [return: bb6, unwind: bb12];
}
bb6: {
switchInt(move _7) -> [0: bb8, otherwise: bb7]; // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
switchInt(move _7) -> [0: bb8, otherwise: bb7];
}
bb7: {
StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:+2:26: +2:27
FakeRead(ForMatchGuard, _4); // scope 0 at $DIR/match_false_edges.rs:+2:26: +2:27
FakeRead(ForGuardBinding, _6); // scope 0 at $DIR/match_false_edges.rs:+2:26: +2:27
StorageLive(_5); // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
_5 = ((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
StorageLive(_8); // scope 2 at $DIR/match_false_edges.rs:+2:35: +2:36
_8 = _5; // scope 2 at $DIR/match_false_edges.rs:+2:35: +2:36
_1 = (const 1_i32, move _8); // scope 2 at $DIR/match_false_edges.rs:+2:31: +2:37
StorageDead(_8); // scope 2 at $DIR/match_false_edges.rs:+2:36: +2:37
StorageDead(_5); // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
StorageDead(_6); // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
goto -> bb11; // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
StorageDead(_7);
FakeRead(ForMatchGuard, _4);
FakeRead(ForGuardBinding, _6);
StorageLive(_5);
_5 = ((_2 as Some).0: i32);
StorageLive(_8);
_8 = _5;
_1 = (const 1_i32, move _8);
StorageDead(_8);
StorageDead(_5);
StorageDead(_6);
goto -> bb11;
}
bb8: {
goto -> bb9; // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
goto -> bb9;
}
bb9: {
StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:+2:26: +2:27
StorageDead(_6); // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
falseEdge -> [real: bb3, imaginary: bb1]; // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
StorageDead(_7);
StorageDead(_6);
falseEdge -> [real: bb3, imaginary: bb1];
}
bb10: {
_1 = (const 3_i32, const 3_i32); // scope 0 at $DIR/match_false_edges.rs:+3:17: +3:23
goto -> bb11; // scope 0 at $DIR/match_false_edges.rs:+3:17: +3:23
_1 = (const 3_i32, const 3_i32);
goto -> bb11;
}
bb11: {
PlaceMention(_1); // scope 0 at $DIR/match_false_edges.rs:+1:13: +5:6
StorageDead(_2); // scope 0 at $DIR/match_false_edges.rs:+5:6: +5:7
StorageDead(_1); // scope 0 at $DIR/match_false_edges.rs:+5:6: +5:7
_0 = const (); // scope 0 at $DIR/match_false_edges.rs:+0:29: +6:2
return; // scope 0 at $DIR/match_false_edges.rs:+6:2: +6:2
PlaceMention(_1);
StorageDead(_2);
StorageDead(_1);
_0 = const ();
return;
}
bb12 (cleanup): {
resume; // scope 0 at $DIR/match_false_edges.rs:+0:1: +6:2
resume;
}
}

View File

@ -1,175 +1,169 @@
// MIR for `main` after built
fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/match_false_edges.rs:+0:11: +0:11
let mut _1: i32; // in scope 0 at $DIR/match_false_edges.rs:+1:13: +6:6
let mut _2: std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
let mut _3: isize; // in scope 0 at $DIR/match_false_edges.rs:+4:9: +4:16
let mut _4: isize; // in scope 0 at $DIR/match_false_edges.rs:+2:9: +2:17
let mut _5: &std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
let _6: i32; // in scope 0 at $DIR/match_false_edges.rs:+2:14: +2:16
let _7: &i32; // in scope 0 at $DIR/match_false_edges.rs:+2:14: +2:16
let mut _8: bool; // in scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
let _9: std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:+3:9: +3:11
let _10: i32; // in scope 0 at $DIR/match_false_edges.rs:+4:14: +4:15
let _11: &i32; // in scope 0 at $DIR/match_false_edges.rs:+4:14: +4:15
let mut _12: bool; // in scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
let mut _13: i32; // in scope 0 at $DIR/match_false_edges.rs:+4:27: +4:28
let _14: std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:+5:9: +5:11
let mut _0: ();
let mut _1: i32;
let mut _2: std::option::Option<i32>;
let mut _3: isize;
let mut _4: isize;
let mut _5: &std::option::Option<i32>;
let _6: i32;
let _7: &i32;
let mut _8: bool;
let _9: std::option::Option<i32>;
let _10: i32;
let _11: &i32;
let mut _12: bool;
let mut _13: i32;
let _14: std::option::Option<i32>;
scope 1 {
}
scope 2 {
debug _w => _6; // in scope 2 at $DIR/match_false_edges.rs:+2:14: +2:16
debug _w => _7; // in scope 2 at $DIR/match_false_edges.rs:+2:14: +2:16
debug _w => _6;
debug _w => _7;
}
scope 3 {
debug _x => _9; // in scope 3 at $DIR/match_false_edges.rs:+3:9: +3:11
debug _x => _9;
}
scope 4 {
debug y => _10; // in scope 4 at $DIR/match_false_edges.rs:+4:14: +4:15
debug y => _11; // in scope 4 at $DIR/match_false_edges.rs:+4:14: +4:15
debug y => _10;
debug y => _11;
}
scope 5 {
debug _z => _14; // in scope 5 at $DIR/match_false_edges.rs:+5:9: +5:11
debug _z => _14;
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/match_false_edges.rs:+1:13: +6:6
StorageLive(_2); // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
_2 = Option::<i32>::Some(const 1_i32); // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
FakeRead(ForMatchedPlace(None), _2); // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
_4 = discriminant(_2); // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
switchInt(move _4) -> [1: bb2, otherwise: bb1]; // scope 0 at $DIR/match_false_edges.rs:+1:13: +1:26
StorageLive(_1);
StorageLive(_2);
_2 = Option::<i32>::Some(const 1_i32);
FakeRead(ForMatchedPlace(None), _2);
_4 = discriminant(_2);
switchInt(move _4) -> [1: bb2, otherwise: bb1];
}
bb1: {
falseEdge -> [real: bb13, imaginary: bb6]; // scope 0 at $DIR/match_false_edges.rs:+3:9: +3:11
falseEdge -> [real: bb13, imaginary: bb6];
}
bb2: {
falseEdge -> [real: bb8, imaginary: bb1]; // scope 0 at $DIR/match_false_edges.rs:+2:9: +2:17
falseEdge -> [real: bb8, imaginary: bb1];
}
bb3: {
goto -> bb1; // scope 0 at $DIR/match_false_edges.rs:+1:13: +1:26
goto -> bb1;
}
bb4: {
_3 = discriminant(_2); // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
switchInt(move _3) -> [1: bb6, otherwise: bb5]; // scope 0 at $DIR/match_false_edges.rs:+1:13: +1:26
_3 = discriminant(_2);
switchInt(move _3) -> [1: bb6, otherwise: bb5];
}
bb5: {
StorageLive(_14); // scope 0 at $DIR/match_false_edges.rs:+5:9: +5:11
_14 = _2; // scope 0 at $DIR/match_false_edges.rs:+5:9: +5:11
_1 = const 4_i32; // scope 5 at $DIR/match_false_edges.rs:+5:15: +5:16
StorageDead(_14); // scope 0 at $DIR/match_false_edges.rs:+5:15: +5:16
goto -> bb19; // scope 0 at $DIR/match_false_edges.rs:+5:15: +5:16
StorageLive(_14);
_14 = _2;
_1 = const 4_i32;
StorageDead(_14);
goto -> bb19;
}
bb6: {
falseEdge -> [real: bb14, imaginary: bb5]; // scope 0 at $DIR/match_false_edges.rs:+4:9: +4:16
falseEdge -> [real: bb14, imaginary: bb5];
}
bb7: {
goto -> bb5; // scope 0 at $DIR/match_false_edges.rs:+1:13: +1:26
goto -> bb5;
}
bb8: {
StorageLive(_7); // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:16
_7 = &((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:16
_5 = &shallow _2; // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
StorageLive(_8); // scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
_8 = guard() -> [return: bb9, unwind: bb20]; // scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
// mir::Constant
// + span: $DIR/match_false_edges.rs:34:21: 34:26
// + literal: Const { ty: fn() -> bool {guard}, val: Value(<ZST>) }
StorageLive(_7);
_7 = &((_2 as Some).0: i32);
_5 = &shallow _2;
StorageLive(_8);
_8 = guard() -> [return: bb9, unwind: bb20];
}
bb9: {
switchInt(move _8) -> [0: bb11, otherwise: bb10]; // scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
switchInt(move _8) -> [0: bb11, otherwise: bb10];
}
bb10: {
StorageDead(_8); // scope 0 at $DIR/match_false_edges.rs:+2:27: +2:28
FakeRead(ForMatchGuard, _5); // scope 0 at $DIR/match_false_edges.rs:+2:27: +2:28
FakeRead(ForGuardBinding, _7); // scope 0 at $DIR/match_false_edges.rs:+2:27: +2:28
StorageLive(_6); // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:16
_6 = ((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:16
_1 = const 1_i32; // scope 2 at $DIR/match_false_edges.rs:+2:32: +2:33
StorageDead(_6); // scope 0 at $DIR/match_false_edges.rs:+2:32: +2:33
StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:+2:32: +2:33
goto -> bb19; // scope 0 at $DIR/match_false_edges.rs:+2:32: +2:33
StorageDead(_8);
FakeRead(ForMatchGuard, _5);
FakeRead(ForGuardBinding, _7);
StorageLive(_6);
_6 = ((_2 as Some).0: i32);
_1 = const 1_i32;
StorageDead(_6);
StorageDead(_7);
goto -> bb19;
}
bb11: {
goto -> bb12; // scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
goto -> bb12;
}
bb12: {
StorageDead(_8); // scope 0 at $DIR/match_false_edges.rs:+2:27: +2:28
StorageDead(_7); // scope 0 at $DIR/match_false_edges.rs:+2:32: +2:33
falseEdge -> [real: bb3, imaginary: bb1]; // scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
StorageDead(_8);
StorageDead(_7);
falseEdge -> [real: bb3, imaginary: bb1];
}
bb13: {
StorageLive(_9); // scope 0 at $DIR/match_false_edges.rs:+3:9: +3:11
_9 = _2; // scope 0 at $DIR/match_false_edges.rs:+3:9: +3:11
_1 = const 2_i32; // scope 3 at $DIR/match_false_edges.rs:+3:15: +3:16
StorageDead(_9); // scope 0 at $DIR/match_false_edges.rs:+3:15: +3:16
goto -> bb19; // scope 0 at $DIR/match_false_edges.rs:+3:15: +3:16
StorageLive(_9);
_9 = _2;
_1 = const 2_i32;
StorageDead(_9);
goto -> bb19;
}
bb14: {
StorageLive(_11); // scope 0 at $DIR/match_false_edges.rs:+4:14: +4:15
_11 = &((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:+4:14: +4:15
_5 = &shallow _2; // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
StorageLive(_12); // scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
StorageLive(_13); // scope 0 at $DIR/match_false_edges.rs:+4:27: +4:28
_13 = (*_11); // scope 0 at $DIR/match_false_edges.rs:+4:27: +4:28
_12 = guard2(move _13) -> [return: bb15, unwind: bb20]; // scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
// mir::Constant
// + span: $DIR/match_false_edges.rs:36:20: 36:26
// + literal: Const { ty: fn(i32) -> bool {guard2}, val: Value(<ZST>) }
StorageLive(_11);
_11 = &((_2 as Some).0: i32);
_5 = &shallow _2;
StorageLive(_12);
StorageLive(_13);
_13 = (*_11);
_12 = guard2(move _13) -> [return: bb15, unwind: bb20];
}
bb15: {
switchInt(move _12) -> [0: bb17, otherwise: bb16]; // scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
switchInt(move _12) -> [0: bb17, otherwise: bb16];
}
bb16: {
StorageDead(_13); // scope 0 at $DIR/match_false_edges.rs:+4:28: +4:29
StorageDead(_12); // scope 0 at $DIR/match_false_edges.rs:+4:28: +4:29
FakeRead(ForMatchGuard, _5); // scope 0 at $DIR/match_false_edges.rs:+4:28: +4:29
FakeRead(ForGuardBinding, _11); // scope 0 at $DIR/match_false_edges.rs:+4:28: +4:29
StorageLive(_10); // scope 0 at $DIR/match_false_edges.rs:+4:14: +4:15
_10 = ((_2 as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:+4:14: +4:15
_1 = const 3_i32; // scope 4 at $DIR/match_false_edges.rs:+4:33: +4:34
StorageDead(_10); // scope 0 at $DIR/match_false_edges.rs:+4:33: +4:34
StorageDead(_11); // scope 0 at $DIR/match_false_edges.rs:+4:33: +4:34
goto -> bb19; // scope 0 at $DIR/match_false_edges.rs:+4:33: +4:34
StorageDead(_13);
StorageDead(_12);
FakeRead(ForMatchGuard, _5);
FakeRead(ForGuardBinding, _11);
StorageLive(_10);
_10 = ((_2 as Some).0: i32);
_1 = const 3_i32;
StorageDead(_10);
StorageDead(_11);
goto -> bb19;
}
bb17: {
goto -> bb18; // scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
goto -> bb18;
}
bb18: {
StorageDead(_13); // scope 0 at $DIR/match_false_edges.rs:+4:28: +4:29
StorageDead(_12); // scope 0 at $DIR/match_false_edges.rs:+4:28: +4:29
StorageDead(_11); // scope 0 at $DIR/match_false_edges.rs:+4:33: +4:34
falseEdge -> [real: bb7, imaginary: bb5]; // scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
StorageDead(_13);
StorageDead(_12);
StorageDead(_11);
falseEdge -> [real: bb7, imaginary: bb5];
}
bb19: {
PlaceMention(_1); // scope 0 at $DIR/match_false_edges.rs:+1:13: +6:6
StorageDead(_2); // scope 0 at $DIR/match_false_edges.rs:+6:6: +6:7
StorageDead(_1); // scope 0 at $DIR/match_false_edges.rs:+6:6: +6:7
_0 = const (); // scope 0 at $DIR/match_false_edges.rs:+0:11: +7:2
return; // scope 0 at $DIR/match_false_edges.rs:+7:2: +7:2
PlaceMention(_1);
StorageDead(_2);
StorageDead(_1);
_0 = const ();
return;
}
bb20 (cleanup): {
resume; // scope 0 at $DIR/match_false_edges.rs:+0:1: +7:2
resume;
}
}

View File

@ -7,90 +7,81 @@
| 3: user_ty: Canonical { value: Ty(&&&&*mut Test), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/receiver_ptr_mutability.rs:18:18: 18:31, inferred_ty: &&&&*mut Test
|
fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/receiver_ptr_mutability.rs:+0:11: +0:11
let _1: *mut Test as UserTypeProjection { base: UserType(0), projs: [] }; // in scope 0 at $DIR/receiver_ptr_mutability.rs:+1:9: +1:12
let _2: (); // in scope 0 at $DIR/receiver_ptr_mutability.rs:+2:5: +2:12
let mut _3: *const Test; // in scope 0 at $DIR/receiver_ptr_mutability.rs:+2:5: +2:12
let mut _4: *mut Test; // in scope 0 at $DIR/receiver_ptr_mutability.rs:+2:5: +2:8
let _6: &&&&*mut Test; // in scope 0 at $DIR/receiver_ptr_mutability.rs:+5:34: +5:41
let _7: &&&*mut Test; // in scope 0 at $DIR/receiver_ptr_mutability.rs:+5:35: +5:41
let _8: &&*mut Test; // in scope 0 at $DIR/receiver_ptr_mutability.rs:+5:36: +5:41
let _9: &*mut Test; // in scope 0 at $DIR/receiver_ptr_mutability.rs:+5:37: +5:41
let _10: (); // in scope 0 at $DIR/receiver_ptr_mutability.rs:+6:5: +6:16
let mut _11: *const Test; // in scope 0 at $DIR/receiver_ptr_mutability.rs:+6:5: +6:16
let mut _12: *mut Test; // in scope 0 at $DIR/receiver_ptr_mutability.rs:+6:5: +6:16
let mut _0: ();
let _1: *mut Test as UserTypeProjection { base: UserType(0), projs: [] };
let _2: ();
let mut _3: *const Test;
let mut _4: *mut Test;
let _6: &&&&*mut Test;
let _7: &&&*mut Test;
let _8: &&*mut Test;
let _9: &*mut Test;
let _10: ();
let mut _11: *const Test;
let mut _12: *mut Test;
scope 1 {
debug ptr => _1; // in scope 1 at $DIR/receiver_ptr_mutability.rs:+1:9: +1:12
let _5: &&&&*mut Test as UserTypeProjection { base: UserType(2), projs: [] }; // in scope 1 at $DIR/receiver_ptr_mutability.rs:+5:9: +5:16
debug ptr => _1;
let _5: &&&&*mut Test as UserTypeProjection { base: UserType(2), projs: [] };
scope 2 {
debug ptr_ref => _5; // in scope 2 at $DIR/receiver_ptr_mutability.rs:+5:9: +5:16
debug ptr_ref => _5;
}
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/receiver_ptr_mutability.rs:+1:9: +1:12
_1 = null_mut::<Test>() -> [return: bb1, unwind: bb4]; // scope 0 at $DIR/receiver_ptr_mutability.rs:+1:26: +1:46
// mir::Constant
// + span: $DIR/receiver_ptr_mutability.rs:14:26: 14:44
// + literal: Const { ty: fn() -> *mut Test {null_mut::<Test>}, val: Value(<ZST>) }
StorageLive(_1);
_1 = null_mut::<Test>() -> [return: bb1, unwind: bb4];
}
bb1: {
FakeRead(ForLet(None), _1); // scope 0 at $DIR/receiver_ptr_mutability.rs:+1:9: +1:12
AscribeUserType(_1, o, UserTypeProjection { base: UserType(1), projs: [] }); // scope 0 at $DIR/receiver_ptr_mutability.rs:+1:14: +1:23
StorageLive(_2); // scope 1 at $DIR/receiver_ptr_mutability.rs:+2:5: +2:12
StorageLive(_3); // scope 1 at $DIR/receiver_ptr_mutability.rs:+2:5: +2:12
StorageLive(_4); // scope 1 at $DIR/receiver_ptr_mutability.rs:+2:5: +2:8
_4 = _1; // scope 1 at $DIR/receiver_ptr_mutability.rs:+2:5: +2:8
_3 = move _4 as *const Test (Pointer(MutToConstPointer)); // scope 1 at $DIR/receiver_ptr_mutability.rs:+2:5: +2:12
StorageDead(_4); // scope 1 at $DIR/receiver_ptr_mutability.rs:+2:7: +2:8
_2 = Test::x(move _3) -> [return: bb2, unwind: bb4]; // scope 1 at $DIR/receiver_ptr_mutability.rs:+2:5: +2:12
// mir::Constant
// + span: $DIR/receiver_ptr_mutability.rs:15:9: 15:10
// + literal: Const { ty: fn(*const Test) {Test::x}, val: Value(<ZST>) }
FakeRead(ForLet(None), _1);
AscribeUserType(_1, o, UserTypeProjection { base: UserType(1), projs: [] });
StorageLive(_2);
StorageLive(_3);
StorageLive(_4);
_4 = _1;
_3 = move _4 as *const Test (Pointer(MutToConstPointer));
StorageDead(_4);
_2 = Test::x(move _3) -> [return: bb2, unwind: bb4];
}
bb2: {
StorageDead(_3); // scope 1 at $DIR/receiver_ptr_mutability.rs:+2:11: +2:12
StorageDead(_2); // scope 1 at $DIR/receiver_ptr_mutability.rs:+2:12: +2:13
StorageLive(_5); // scope 1 at $DIR/receiver_ptr_mutability.rs:+5:9: +5:16
StorageLive(_6); // scope 1 at $DIR/receiver_ptr_mutability.rs:+5:34: +5:41
StorageLive(_7); // scope 1 at $DIR/receiver_ptr_mutability.rs:+5:35: +5:41
StorageLive(_8); // scope 1 at $DIR/receiver_ptr_mutability.rs:+5:36: +5:41
StorageLive(_9); // scope 1 at $DIR/receiver_ptr_mutability.rs:+5:37: +5:41
_9 = &_1; // scope 1 at $DIR/receiver_ptr_mutability.rs:+5:37: +5:41
_8 = &_9; // scope 1 at $DIR/receiver_ptr_mutability.rs:+5:36: +5:41
_7 = &_8; // scope 1 at $DIR/receiver_ptr_mutability.rs:+5:35: +5:41
_6 = &_7; // scope 1 at $DIR/receiver_ptr_mutability.rs:+5:34: +5:41
_5 = &(*_6); // scope 1 at $DIR/receiver_ptr_mutability.rs:+5:34: +5:41
FakeRead(ForLet(None), _5); // scope 1 at $DIR/receiver_ptr_mutability.rs:+5:9: +5:16
AscribeUserType(_5, o, UserTypeProjection { base: UserType(3), projs: [] }); // scope 1 at $DIR/receiver_ptr_mutability.rs:+5:18: +5:31
StorageDead(_6); // scope 1 at $DIR/receiver_ptr_mutability.rs:+5:41: +5:42
StorageLive(_10); // scope 2 at $DIR/receiver_ptr_mutability.rs:+6:5: +6:16
StorageLive(_11); // scope 2 at $DIR/receiver_ptr_mutability.rs:+6:5: +6:16
StorageLive(_12); // scope 2 at $DIR/receiver_ptr_mutability.rs:+6:5: +6:16
_12 = (*(*(*(*_5)))); // scope 2 at $DIR/receiver_ptr_mutability.rs:+6:5: +6:16
_11 = move _12 as *const Test (Pointer(MutToConstPointer)); // scope 2 at $DIR/receiver_ptr_mutability.rs:+6:5: +6:16
StorageDead(_12); // scope 2 at $DIR/receiver_ptr_mutability.rs:+6:11: +6:12
_10 = Test::x(move _11) -> [return: bb3, unwind: bb4]; // scope 2 at $DIR/receiver_ptr_mutability.rs:+6:5: +6:16
// mir::Constant
// + span: $DIR/receiver_ptr_mutability.rs:19:13: 19:14
// + literal: Const { ty: fn(*const Test) {Test::x}, val: Value(<ZST>) }
StorageDead(_3);
StorageDead(_2);
StorageLive(_5);
StorageLive(_6);
StorageLive(_7);
StorageLive(_8);
StorageLive(_9);
_9 = &_1;
_8 = &_9;
_7 = &_8;
_6 = &_7;
_5 = &(*_6);
FakeRead(ForLet(None), _5);
AscribeUserType(_5, o, UserTypeProjection { base: UserType(3), projs: [] });
StorageDead(_6);
StorageLive(_10);
StorageLive(_11);
StorageLive(_12);
_12 = (*(*(*(*_5))));
_11 = move _12 as *const Test (Pointer(MutToConstPointer));
StorageDead(_12);
_10 = Test::x(move _11) -> [return: bb3, unwind: bb4];
}
bb3: {
StorageDead(_11); // scope 2 at $DIR/receiver_ptr_mutability.rs:+6:15: +6:16
StorageDead(_10); // scope 2 at $DIR/receiver_ptr_mutability.rs:+6:16: +6:17
_0 = const (); // scope 0 at $DIR/receiver_ptr_mutability.rs:+0:11: +7:2
StorageDead(_9); // scope 1 at $DIR/receiver_ptr_mutability.rs:+7:1: +7:2
StorageDead(_8); // scope 1 at $DIR/receiver_ptr_mutability.rs:+7:1: +7:2
StorageDead(_7); // scope 1 at $DIR/receiver_ptr_mutability.rs:+7:1: +7:2
StorageDead(_5); // scope 1 at $DIR/receiver_ptr_mutability.rs:+7:1: +7:2
StorageDead(_1); // scope 0 at $DIR/receiver_ptr_mutability.rs:+7:1: +7:2
return; // scope 0 at $DIR/receiver_ptr_mutability.rs:+7:2: +7:2
StorageDead(_11);
StorageDead(_10);
_0 = const ();
StorageDead(_9);
StorageDead(_8);
StorageDead(_7);
StorageDead(_5);
StorageDead(_1);
return;
}
bb4 (cleanup): {
resume; // scope 0 at $DIR/receiver_ptr_mutability.rs:+0:1: +7:2
resume;
}
}

View File

@ -1,147 +1,147 @@
// MIR for `shift_signed` after built
fn shift_signed(_1: i8, _2: u128, _3: i8, _4: i32, _5: i128) -> ([i8; 3], [u128; 3]) {
debug small => _1; // in scope 0 at $DIR/shifts.rs:+0:17: +0:22
debug big => _2; // in scope 0 at $DIR/shifts.rs:+0:28: +0:31
debug a => _3; // in scope 0 at $DIR/shifts.rs:+0:39: +0:40
debug b => _4; // in scope 0 at $DIR/shifts.rs:+0:46: +0:47
debug c => _5; // in scope 0 at $DIR/shifts.rs:+0:54: +0:55
let mut _0: ([i8; 3], [u128; 3]); // return place in scope 0 at $DIR/shifts.rs:+0:66: +0:86
let mut _6: [i8; 3]; // in scope 0 at $DIR/shifts.rs:+2:9: +2:45
let mut _7: i8; // in scope 0 at $DIR/shifts.rs:+2:10: +2:20
let mut _8: i8; // in scope 0 at $DIR/shifts.rs:+2:10: +2:15
let mut _9: i8; // in scope 0 at $DIR/shifts.rs:+2:19: +2:20
let mut _10: u8; // in scope 0 at $DIR/shifts.rs:+2:10: +2:20
let mut _11: bool; // in scope 0 at $DIR/shifts.rs:+2:10: +2:20
let mut _12: i8; // in scope 0 at $DIR/shifts.rs:+2:22: +2:32
let mut _13: i8; // in scope 0 at $DIR/shifts.rs:+2:22: +2:27
let mut _14: i32; // in scope 0 at $DIR/shifts.rs:+2:31: +2:32
let mut _15: u32; // in scope 0 at $DIR/shifts.rs:+2:22: +2:32
let mut _16: bool; // in scope 0 at $DIR/shifts.rs:+2:22: +2:32
let mut _17: i8; // in scope 0 at $DIR/shifts.rs:+2:34: +2:44
let mut _18: i8; // in scope 0 at $DIR/shifts.rs:+2:34: +2:39
let mut _19: i128; // in scope 0 at $DIR/shifts.rs:+2:43: +2:44
let mut _20: u128; // in scope 0 at $DIR/shifts.rs:+2:34: +2:44
let mut _21: bool; // in scope 0 at $DIR/shifts.rs:+2:34: +2:44
let mut _22: [u128; 3]; // in scope 0 at $DIR/shifts.rs:+3:9: +3:39
let mut _23: u128; // in scope 0 at $DIR/shifts.rs:+3:10: +3:18
let mut _24: u128; // in scope 0 at $DIR/shifts.rs:+3:10: +3:13
let mut _25: i8; // in scope 0 at $DIR/shifts.rs:+3:17: +3:18
let mut _26: u8; // in scope 0 at $DIR/shifts.rs:+3:10: +3:18
let mut _27: bool; // in scope 0 at $DIR/shifts.rs:+3:10: +3:18
let mut _28: u128; // in scope 0 at $DIR/shifts.rs:+3:20: +3:28
let mut _29: u128; // in scope 0 at $DIR/shifts.rs:+3:20: +3:23
let mut _30: i32; // in scope 0 at $DIR/shifts.rs:+3:27: +3:28
let mut _31: u32; // in scope 0 at $DIR/shifts.rs:+3:20: +3:28
let mut _32: bool; // in scope 0 at $DIR/shifts.rs:+3:20: +3:28
let mut _33: u128; // in scope 0 at $DIR/shifts.rs:+3:30: +3:38
let mut _34: u128; // in scope 0 at $DIR/shifts.rs:+3:30: +3:33
let mut _35: i128; // in scope 0 at $DIR/shifts.rs:+3:37: +3:38
let mut _36: u128; // in scope 0 at $DIR/shifts.rs:+3:30: +3:38
let mut _37: bool; // in scope 0 at $DIR/shifts.rs:+3:30: +3:38
debug small => _1;
debug big => _2;
debug a => _3;
debug b => _4;
debug c => _5;
let mut _0: ([i8; 3], [u128; 3]);
let mut _6: [i8; 3];
let mut _7: i8;
let mut _8: i8;
let mut _9: i8;
let mut _10: u8;
let mut _11: bool;
let mut _12: i8;
let mut _13: i8;
let mut _14: i32;
let mut _15: u32;
let mut _16: bool;
let mut _17: i8;
let mut _18: i8;
let mut _19: i128;
let mut _20: u128;
let mut _21: bool;
let mut _22: [u128; 3];
let mut _23: u128;
let mut _24: u128;
let mut _25: i8;
let mut _26: u8;
let mut _27: bool;
let mut _28: u128;
let mut _29: u128;
let mut _30: i32;
let mut _31: u32;
let mut _32: bool;
let mut _33: u128;
let mut _34: u128;
let mut _35: i128;
let mut _36: u128;
let mut _37: bool;
bb0: {
StorageLive(_6); // scope 0 at $DIR/shifts.rs:+2:9: +2:45
StorageLive(_7); // scope 0 at $DIR/shifts.rs:+2:10: +2:20
StorageLive(_8); // scope 0 at $DIR/shifts.rs:+2:10: +2:15
_8 = _1; // scope 0 at $DIR/shifts.rs:+2:10: +2:15
StorageLive(_9); // scope 0 at $DIR/shifts.rs:+2:19: +2:20
_9 = _3; // scope 0 at $DIR/shifts.rs:+2:19: +2:20
_10 = _9 as u8 (IntToInt); // scope 0 at $DIR/shifts.rs:+2:10: +2:20
_11 = Lt(move _10, const 8_u8); // scope 0 at $DIR/shifts.rs:+2:10: +2:20
assert(move _11, "attempt to shift right by `{}`, which would overflow", _9) -> [success: bb1, unwind: bb7]; // scope 0 at $DIR/shifts.rs:+2:10: +2:20
StorageLive(_6);
StorageLive(_7);
StorageLive(_8);
_8 = _1;
StorageLive(_9);
_9 = _3;
_10 = _9 as u8 (IntToInt);
_11 = Lt(move _10, const 8_u8);
assert(move _11, "attempt to shift right by `{}`, which would overflow", _9) -> [success: bb1, unwind: bb7];
}
bb1: {
_7 = Shr(move _8, move _9); // scope 0 at $DIR/shifts.rs:+2:10: +2:20
StorageDead(_9); // scope 0 at $DIR/shifts.rs:+2:19: +2:20
StorageDead(_8); // scope 0 at $DIR/shifts.rs:+2:19: +2:20
StorageLive(_12); // scope 0 at $DIR/shifts.rs:+2:22: +2:32
StorageLive(_13); // scope 0 at $DIR/shifts.rs:+2:22: +2:27
_13 = _1; // scope 0 at $DIR/shifts.rs:+2:22: +2:27
StorageLive(_14); // scope 0 at $DIR/shifts.rs:+2:31: +2:32
_14 = _4; // scope 0 at $DIR/shifts.rs:+2:31: +2:32
_15 = _14 as u32 (IntToInt); // scope 0 at $DIR/shifts.rs:+2:22: +2:32
_16 = Lt(move _15, const 8_u32); // scope 0 at $DIR/shifts.rs:+2:22: +2:32
assert(move _16, "attempt to shift right by `{}`, which would overflow", _14) -> [success: bb2, unwind: bb7]; // scope 0 at $DIR/shifts.rs:+2:22: +2:32
_7 = Shr(move _8, move _9);
StorageDead(_9);
StorageDead(_8);
StorageLive(_12);
StorageLive(_13);
_13 = _1;
StorageLive(_14);
_14 = _4;
_15 = _14 as u32 (IntToInt);
_16 = Lt(move _15, const 8_u32);
assert(move _16, "attempt to shift right by `{}`, which would overflow", _14) -> [success: bb2, unwind: bb7];
}
bb2: {
_12 = Shr(move _13, move _14); // scope 0 at $DIR/shifts.rs:+2:22: +2:32
StorageDead(_14); // scope 0 at $DIR/shifts.rs:+2:31: +2:32
StorageDead(_13); // scope 0 at $DIR/shifts.rs:+2:31: +2:32
StorageLive(_17); // scope 0 at $DIR/shifts.rs:+2:34: +2:44
StorageLive(_18); // scope 0 at $DIR/shifts.rs:+2:34: +2:39
_18 = _1; // scope 0 at $DIR/shifts.rs:+2:34: +2:39
StorageLive(_19); // scope 0 at $DIR/shifts.rs:+2:43: +2:44
_19 = _5; // scope 0 at $DIR/shifts.rs:+2:43: +2:44
_20 = _19 as u128 (IntToInt); // scope 0 at $DIR/shifts.rs:+2:34: +2:44
_21 = Lt(move _20, const 8_u128); // scope 0 at $DIR/shifts.rs:+2:34: +2:44
assert(move _21, "attempt to shift right by `{}`, which would overflow", _19) -> [success: bb3, unwind: bb7]; // scope 0 at $DIR/shifts.rs:+2:34: +2:44
_12 = Shr(move _13, move _14);
StorageDead(_14);
StorageDead(_13);
StorageLive(_17);
StorageLive(_18);
_18 = _1;
StorageLive(_19);
_19 = _5;
_20 = _19 as u128 (IntToInt);
_21 = Lt(move _20, const 8_u128);
assert(move _21, "attempt to shift right by `{}`, which would overflow", _19) -> [success: bb3, unwind: bb7];
}
bb3: {
_17 = Shr(move _18, move _19); // scope 0 at $DIR/shifts.rs:+2:34: +2:44
StorageDead(_19); // scope 0 at $DIR/shifts.rs:+2:43: +2:44
StorageDead(_18); // scope 0 at $DIR/shifts.rs:+2:43: +2:44
_6 = [move _7, move _12, move _17]; // scope 0 at $DIR/shifts.rs:+2:9: +2:45
StorageDead(_17); // scope 0 at $DIR/shifts.rs:+2:44: +2:45
StorageDead(_12); // scope 0 at $DIR/shifts.rs:+2:44: +2:45
StorageDead(_7); // scope 0 at $DIR/shifts.rs:+2:44: +2:45
StorageLive(_22); // scope 0 at $DIR/shifts.rs:+3:9: +3:39
StorageLive(_23); // scope 0 at $DIR/shifts.rs:+3:10: +3:18
StorageLive(_24); // scope 0 at $DIR/shifts.rs:+3:10: +3:13
_24 = _2; // scope 0 at $DIR/shifts.rs:+3:10: +3:13
StorageLive(_25); // scope 0 at $DIR/shifts.rs:+3:17: +3:18
_25 = _3; // scope 0 at $DIR/shifts.rs:+3:17: +3:18
_26 = _25 as u8 (IntToInt); // scope 0 at $DIR/shifts.rs:+3:10: +3:18
_27 = Lt(move _26, const 128_u8); // scope 0 at $DIR/shifts.rs:+3:10: +3:18
assert(move _27, "attempt to shift left by `{}`, which would overflow", _25) -> [success: bb4, unwind: bb7]; // scope 0 at $DIR/shifts.rs:+3:10: +3:18
_17 = Shr(move _18, move _19);
StorageDead(_19);
StorageDead(_18);
_6 = [move _7, move _12, move _17];
StorageDead(_17);
StorageDead(_12);
StorageDead(_7);
StorageLive(_22);
StorageLive(_23);
StorageLive(_24);
_24 = _2;
StorageLive(_25);
_25 = _3;
_26 = _25 as u8 (IntToInt);
_27 = Lt(move _26, const 128_u8);
assert(move _27, "attempt to shift left by `{}`, which would overflow", _25) -> [success: bb4, unwind: bb7];
}
bb4: {
_23 = Shl(move _24, move _25); // scope 0 at $DIR/shifts.rs:+3:10: +3:18
StorageDead(_25); // scope 0 at $DIR/shifts.rs:+3:17: +3:18
StorageDead(_24); // scope 0 at $DIR/shifts.rs:+3:17: +3:18
StorageLive(_28); // scope 0 at $DIR/shifts.rs:+3:20: +3:28
StorageLive(_29); // scope 0 at $DIR/shifts.rs:+3:20: +3:23
_29 = _2; // scope 0 at $DIR/shifts.rs:+3:20: +3:23
StorageLive(_30); // scope 0 at $DIR/shifts.rs:+3:27: +3:28
_30 = _4; // scope 0 at $DIR/shifts.rs:+3:27: +3:28
_31 = _30 as u32 (IntToInt); // scope 0 at $DIR/shifts.rs:+3:20: +3:28
_32 = Lt(move _31, const 128_u32); // scope 0 at $DIR/shifts.rs:+3:20: +3:28
assert(move _32, "attempt to shift left by `{}`, which would overflow", _30) -> [success: bb5, unwind: bb7]; // scope 0 at $DIR/shifts.rs:+3:20: +3:28
_23 = Shl(move _24, move _25);
StorageDead(_25);
StorageDead(_24);
StorageLive(_28);
StorageLive(_29);
_29 = _2;
StorageLive(_30);
_30 = _4;
_31 = _30 as u32 (IntToInt);
_32 = Lt(move _31, const 128_u32);
assert(move _32, "attempt to shift left by `{}`, which would overflow", _30) -> [success: bb5, unwind: bb7];
}
bb5: {
_28 = Shl(move _29, move _30); // scope 0 at $DIR/shifts.rs:+3:20: +3:28
StorageDead(_30); // scope 0 at $DIR/shifts.rs:+3:27: +3:28
StorageDead(_29); // scope 0 at $DIR/shifts.rs:+3:27: +3:28
StorageLive(_33); // scope 0 at $DIR/shifts.rs:+3:30: +3:38
StorageLive(_34); // scope 0 at $DIR/shifts.rs:+3:30: +3:33
_34 = _2; // scope 0 at $DIR/shifts.rs:+3:30: +3:33
StorageLive(_35); // scope 0 at $DIR/shifts.rs:+3:37: +3:38
_35 = _5; // scope 0 at $DIR/shifts.rs:+3:37: +3:38
_36 = _35 as u128 (IntToInt); // scope 0 at $DIR/shifts.rs:+3:30: +3:38
_37 = Lt(move _36, const 128_u128); // scope 0 at $DIR/shifts.rs:+3:30: +3:38
assert(move _37, "attempt to shift left by `{}`, which would overflow", _35) -> [success: bb6, unwind: bb7]; // scope 0 at $DIR/shifts.rs:+3:30: +3:38
_28 = Shl(move _29, move _30);
StorageDead(_30);
StorageDead(_29);
StorageLive(_33);
StorageLive(_34);
_34 = _2;
StorageLive(_35);
_35 = _5;
_36 = _35 as u128 (IntToInt);
_37 = Lt(move _36, const 128_u128);
assert(move _37, "attempt to shift left by `{}`, which would overflow", _35) -> [success: bb6, unwind: bb7];
}
bb6: {
_33 = Shl(move _34, move _35); // scope 0 at $DIR/shifts.rs:+3:30: +3:38
StorageDead(_35); // scope 0 at $DIR/shifts.rs:+3:37: +3:38
StorageDead(_34); // scope 0 at $DIR/shifts.rs:+3:37: +3:38
_22 = [move _23, move _28, move _33]; // scope 0 at $DIR/shifts.rs:+3:9: +3:39
StorageDead(_33); // scope 0 at $DIR/shifts.rs:+3:38: +3:39
StorageDead(_28); // scope 0 at $DIR/shifts.rs:+3:38: +3:39
StorageDead(_23); // scope 0 at $DIR/shifts.rs:+3:38: +3:39
_0 = (move _6, move _22); // scope 0 at $DIR/shifts.rs:+1:5: +4:6
StorageDead(_22); // scope 0 at $DIR/shifts.rs:+4:5: +4:6
StorageDead(_6); // scope 0 at $DIR/shifts.rs:+4:5: +4:6
return; // scope 0 at $DIR/shifts.rs:+5:2: +5:2
_33 = Shl(move _34, move _35);
StorageDead(_35);
StorageDead(_34);
_22 = [move _23, move _28, move _33];
StorageDead(_33);
StorageDead(_28);
StorageDead(_23);
_0 = (move _6, move _22);
StorageDead(_22);
StorageDead(_6);
return;
}
bb7 (cleanup): {
resume; // scope 0 at $DIR/shifts.rs:+0:1: +5:2
resume;
}
}

View File

@ -1,135 +1,135 @@
// MIR for `shift_unsigned` after built
fn shift_unsigned(_1: u8, _2: i128, _3: u8, _4: u32, _5: u128) -> ([u8; 3], [i128; 3]) {
debug small => _1; // in scope 0 at $DIR/shifts.rs:+0:19: +0:24
debug big => _2; // in scope 0 at $DIR/shifts.rs:+0:30: +0:33
debug a => _3; // in scope 0 at $DIR/shifts.rs:+0:41: +0:42
debug b => _4; // in scope 0 at $DIR/shifts.rs:+0:48: +0:49
debug c => _5; // in scope 0 at $DIR/shifts.rs:+0:56: +0:57
let mut _0: ([u8; 3], [i128; 3]); // return place in scope 0 at $DIR/shifts.rs:+0:68: +0:88
let mut _6: [u8; 3]; // in scope 0 at $DIR/shifts.rs:+2:9: +2:45
let mut _7: u8; // in scope 0 at $DIR/shifts.rs:+2:10: +2:20
let mut _8: u8; // in scope 0 at $DIR/shifts.rs:+2:10: +2:15
let mut _9: u8; // in scope 0 at $DIR/shifts.rs:+2:19: +2:20
let mut _10: bool; // in scope 0 at $DIR/shifts.rs:+2:10: +2:20
let mut _11: u8; // in scope 0 at $DIR/shifts.rs:+2:22: +2:32
let mut _12: u8; // in scope 0 at $DIR/shifts.rs:+2:22: +2:27
let mut _13: u32; // in scope 0 at $DIR/shifts.rs:+2:31: +2:32
let mut _14: bool; // in scope 0 at $DIR/shifts.rs:+2:22: +2:32
let mut _15: u8; // in scope 0 at $DIR/shifts.rs:+2:34: +2:44
let mut _16: u8; // in scope 0 at $DIR/shifts.rs:+2:34: +2:39
let mut _17: u128; // in scope 0 at $DIR/shifts.rs:+2:43: +2:44
let mut _18: bool; // in scope 0 at $DIR/shifts.rs:+2:34: +2:44
let mut _19: [i128; 3]; // in scope 0 at $DIR/shifts.rs:+3:9: +3:39
let mut _20: i128; // in scope 0 at $DIR/shifts.rs:+3:10: +3:18
let mut _21: i128; // in scope 0 at $DIR/shifts.rs:+3:10: +3:13
let mut _22: u8; // in scope 0 at $DIR/shifts.rs:+3:17: +3:18
let mut _23: bool; // in scope 0 at $DIR/shifts.rs:+3:10: +3:18
let mut _24: i128; // in scope 0 at $DIR/shifts.rs:+3:20: +3:28
let mut _25: i128; // in scope 0 at $DIR/shifts.rs:+3:20: +3:23
let mut _26: u32; // in scope 0 at $DIR/shifts.rs:+3:27: +3:28
let mut _27: bool; // in scope 0 at $DIR/shifts.rs:+3:20: +3:28
let mut _28: i128; // in scope 0 at $DIR/shifts.rs:+3:30: +3:38
let mut _29: i128; // in scope 0 at $DIR/shifts.rs:+3:30: +3:33
let mut _30: u128; // in scope 0 at $DIR/shifts.rs:+3:37: +3:38
let mut _31: bool; // in scope 0 at $DIR/shifts.rs:+3:30: +3:38
debug small => _1;
debug big => _2;
debug a => _3;
debug b => _4;
debug c => _5;
let mut _0: ([u8; 3], [i128; 3]);
let mut _6: [u8; 3];
let mut _7: u8;
let mut _8: u8;
let mut _9: u8;
let mut _10: bool;
let mut _11: u8;
let mut _12: u8;
let mut _13: u32;
let mut _14: bool;
let mut _15: u8;
let mut _16: u8;
let mut _17: u128;
let mut _18: bool;
let mut _19: [i128; 3];
let mut _20: i128;
let mut _21: i128;
let mut _22: u8;
let mut _23: bool;
let mut _24: i128;
let mut _25: i128;
let mut _26: u32;
let mut _27: bool;
let mut _28: i128;
let mut _29: i128;
let mut _30: u128;
let mut _31: bool;
bb0: {
StorageLive(_6); // scope 0 at $DIR/shifts.rs:+2:9: +2:45
StorageLive(_7); // scope 0 at $DIR/shifts.rs:+2:10: +2:20
StorageLive(_8); // scope 0 at $DIR/shifts.rs:+2:10: +2:15
_8 = _1; // scope 0 at $DIR/shifts.rs:+2:10: +2:15
StorageLive(_9); // scope 0 at $DIR/shifts.rs:+2:19: +2:20
_9 = _3; // scope 0 at $DIR/shifts.rs:+2:19: +2:20
_10 = Lt(_9, const 8_u8); // scope 0 at $DIR/shifts.rs:+2:10: +2:20
assert(move _10, "attempt to shift right by `{}`, which would overflow", _9) -> [success: bb1, unwind: bb7]; // scope 0 at $DIR/shifts.rs:+2:10: +2:20
StorageLive(_6);
StorageLive(_7);
StorageLive(_8);
_8 = _1;
StorageLive(_9);
_9 = _3;
_10 = Lt(_9, const 8_u8);
assert(move _10, "attempt to shift right by `{}`, which would overflow", _9) -> [success: bb1, unwind: bb7];
}
bb1: {
_7 = Shr(move _8, move _9); // scope 0 at $DIR/shifts.rs:+2:10: +2:20
StorageDead(_9); // scope 0 at $DIR/shifts.rs:+2:19: +2:20
StorageDead(_8); // scope 0 at $DIR/shifts.rs:+2:19: +2:20
StorageLive(_11); // scope 0 at $DIR/shifts.rs:+2:22: +2:32
StorageLive(_12); // scope 0 at $DIR/shifts.rs:+2:22: +2:27
_12 = _1; // scope 0 at $DIR/shifts.rs:+2:22: +2:27
StorageLive(_13); // scope 0 at $DIR/shifts.rs:+2:31: +2:32
_13 = _4; // scope 0 at $DIR/shifts.rs:+2:31: +2:32
_14 = Lt(_13, const 8_u32); // scope 0 at $DIR/shifts.rs:+2:22: +2:32
assert(move _14, "attempt to shift right by `{}`, which would overflow", _13) -> [success: bb2, unwind: bb7]; // scope 0 at $DIR/shifts.rs:+2:22: +2:32
_7 = Shr(move _8, move _9);
StorageDead(_9);
StorageDead(_8);
StorageLive(_11);
StorageLive(_12);
_12 = _1;
StorageLive(_13);
_13 = _4;
_14 = Lt(_13, const 8_u32);
assert(move _14, "attempt to shift right by `{}`, which would overflow", _13) -> [success: bb2, unwind: bb7];
}
bb2: {
_11 = Shr(move _12, move _13); // scope 0 at $DIR/shifts.rs:+2:22: +2:32
StorageDead(_13); // scope 0 at $DIR/shifts.rs:+2:31: +2:32
StorageDead(_12); // scope 0 at $DIR/shifts.rs:+2:31: +2:32
StorageLive(_15); // scope 0 at $DIR/shifts.rs:+2:34: +2:44
StorageLive(_16); // scope 0 at $DIR/shifts.rs:+2:34: +2:39
_16 = _1; // scope 0 at $DIR/shifts.rs:+2:34: +2:39
StorageLive(_17); // scope 0 at $DIR/shifts.rs:+2:43: +2:44
_17 = _5; // scope 0 at $DIR/shifts.rs:+2:43: +2:44
_18 = Lt(_17, const 8_u128); // scope 0 at $DIR/shifts.rs:+2:34: +2:44
assert(move _18, "attempt to shift right by `{}`, which would overflow", _17) -> [success: bb3, unwind: bb7]; // scope 0 at $DIR/shifts.rs:+2:34: +2:44
_11 = Shr(move _12, move _13);
StorageDead(_13);
StorageDead(_12);
StorageLive(_15);
StorageLive(_16);
_16 = _1;
StorageLive(_17);
_17 = _5;
_18 = Lt(_17, const 8_u128);
assert(move _18, "attempt to shift right by `{}`, which would overflow", _17) -> [success: bb3, unwind: bb7];
}
bb3: {
_15 = Shr(move _16, move _17); // scope 0 at $DIR/shifts.rs:+2:34: +2:44
StorageDead(_17); // scope 0 at $DIR/shifts.rs:+2:43: +2:44
StorageDead(_16); // scope 0 at $DIR/shifts.rs:+2:43: +2:44
_6 = [move _7, move _11, move _15]; // scope 0 at $DIR/shifts.rs:+2:9: +2:45
StorageDead(_15); // scope 0 at $DIR/shifts.rs:+2:44: +2:45
StorageDead(_11); // scope 0 at $DIR/shifts.rs:+2:44: +2:45
StorageDead(_7); // scope 0 at $DIR/shifts.rs:+2:44: +2:45
StorageLive(_19); // scope 0 at $DIR/shifts.rs:+3:9: +3:39
StorageLive(_20); // scope 0 at $DIR/shifts.rs:+3:10: +3:18
StorageLive(_21); // scope 0 at $DIR/shifts.rs:+3:10: +3:13
_21 = _2; // scope 0 at $DIR/shifts.rs:+3:10: +3:13
StorageLive(_22); // scope 0 at $DIR/shifts.rs:+3:17: +3:18
_22 = _3; // scope 0 at $DIR/shifts.rs:+3:17: +3:18
_23 = Lt(_22, const 128_u8); // scope 0 at $DIR/shifts.rs:+3:10: +3:18
assert(move _23, "attempt to shift left by `{}`, which would overflow", _22) -> [success: bb4, unwind: bb7]; // scope 0 at $DIR/shifts.rs:+3:10: +3:18
_15 = Shr(move _16, move _17);
StorageDead(_17);
StorageDead(_16);
_6 = [move _7, move _11, move _15];
StorageDead(_15);
StorageDead(_11);
StorageDead(_7);
StorageLive(_19);
StorageLive(_20);
StorageLive(_21);
_21 = _2;
StorageLive(_22);
_22 = _3;
_23 = Lt(_22, const 128_u8);
assert(move _23, "attempt to shift left by `{}`, which would overflow", _22) -> [success: bb4, unwind: bb7];
}
bb4: {
_20 = Shl(move _21, move _22); // scope 0 at $DIR/shifts.rs:+3:10: +3:18
StorageDead(_22); // scope 0 at $DIR/shifts.rs:+3:17: +3:18
StorageDead(_21); // scope 0 at $DIR/shifts.rs:+3:17: +3:18
StorageLive(_24); // scope 0 at $DIR/shifts.rs:+3:20: +3:28
StorageLive(_25); // scope 0 at $DIR/shifts.rs:+3:20: +3:23
_25 = _2; // scope 0 at $DIR/shifts.rs:+3:20: +3:23
StorageLive(_26); // scope 0 at $DIR/shifts.rs:+3:27: +3:28
_26 = _4; // scope 0 at $DIR/shifts.rs:+3:27: +3:28
_27 = Lt(_26, const 128_u32); // scope 0 at $DIR/shifts.rs:+3:20: +3:28
assert(move _27, "attempt to shift left by `{}`, which would overflow", _26) -> [success: bb5, unwind: bb7]; // scope 0 at $DIR/shifts.rs:+3:20: +3:28
_20 = Shl(move _21, move _22);
StorageDead(_22);
StorageDead(_21);
StorageLive(_24);
StorageLive(_25);
_25 = _2;
StorageLive(_26);
_26 = _4;
_27 = Lt(_26, const 128_u32);
assert(move _27, "attempt to shift left by `{}`, which would overflow", _26) -> [success: bb5, unwind: bb7];
}
bb5: {
_24 = Shl(move _25, move _26); // scope 0 at $DIR/shifts.rs:+3:20: +3:28
StorageDead(_26); // scope 0 at $DIR/shifts.rs:+3:27: +3:28
StorageDead(_25); // scope 0 at $DIR/shifts.rs:+3:27: +3:28
StorageLive(_28); // scope 0 at $DIR/shifts.rs:+3:30: +3:38
StorageLive(_29); // scope 0 at $DIR/shifts.rs:+3:30: +3:33
_29 = _2; // scope 0 at $DIR/shifts.rs:+3:30: +3:33
StorageLive(_30); // scope 0 at $DIR/shifts.rs:+3:37: +3:38
_30 = _5; // scope 0 at $DIR/shifts.rs:+3:37: +3:38
_31 = Lt(_30, const 128_u128); // scope 0 at $DIR/shifts.rs:+3:30: +3:38
assert(move _31, "attempt to shift left by `{}`, which would overflow", _30) -> [success: bb6, unwind: bb7]; // scope 0 at $DIR/shifts.rs:+3:30: +3:38
_24 = Shl(move _25, move _26);
StorageDead(_26);
StorageDead(_25);
StorageLive(_28);
StorageLive(_29);
_29 = _2;
StorageLive(_30);
_30 = _5;
_31 = Lt(_30, const 128_u128);
assert(move _31, "attempt to shift left by `{}`, which would overflow", _30) -> [success: bb6, unwind: bb7];
}
bb6: {
_28 = Shl(move _29, move _30); // scope 0 at $DIR/shifts.rs:+3:30: +3:38
StorageDead(_30); // scope 0 at $DIR/shifts.rs:+3:37: +3:38
StorageDead(_29); // scope 0 at $DIR/shifts.rs:+3:37: +3:38
_19 = [move _20, move _24, move _28]; // scope 0 at $DIR/shifts.rs:+3:9: +3:39
StorageDead(_28); // scope 0 at $DIR/shifts.rs:+3:38: +3:39
StorageDead(_24); // scope 0 at $DIR/shifts.rs:+3:38: +3:39
StorageDead(_20); // scope 0 at $DIR/shifts.rs:+3:38: +3:39
_0 = (move _6, move _19); // scope 0 at $DIR/shifts.rs:+1:5: +4:6
StorageDead(_19); // scope 0 at $DIR/shifts.rs:+4:5: +4:6
StorageDead(_6); // scope 0 at $DIR/shifts.rs:+4:5: +4:6
return; // scope 0 at $DIR/shifts.rs:+5:2: +5:2
_28 = Shl(move _29, move _30);
StorageDead(_30);
StorageDead(_29);
_19 = [move _20, move _24, move _28];
StorageDead(_28);
StorageDead(_24);
StorageDead(_20);
_0 = (move _6, move _19);
StorageDead(_19);
StorageDead(_6);
return;
}
bb7 (cleanup): {
resume; // scope 0 at $DIR/shifts.rs:+0:1: +5:2
resume;
}
}

View File

@ -1,29 +1,29 @@
// MIR for `match_bool` after built
fn match_bool(_1: bool) -> usize {
debug x => _1; // in scope 0 at $DIR/simple_match.rs:+0:15: +0:16
let mut _0: usize; // return place in scope 0 at $DIR/simple_match.rs:+0:27: +0:32
debug x => _1;
let mut _0: usize;
bb0: {
FakeRead(ForMatchedPlace(None), _1); // scope 0 at $DIR/simple_match.rs:+1:11: +1:12
switchInt(_1) -> [0: bb2, otherwise: bb1]; // scope 0 at $DIR/simple_match.rs:+1:5: +1:12
FakeRead(ForMatchedPlace(None), _1);
switchInt(_1) -> [0: bb2, otherwise: bb1];
}
bb1: {
falseEdge -> [real: bb3, imaginary: bb2]; // scope 0 at $DIR/simple_match.rs:+2:9: +2:13
falseEdge -> [real: bb3, imaginary: bb2];
}
bb2: {
_0 = const 20_usize; // scope 0 at $DIR/simple_match.rs:+3:14: +3:16
goto -> bb4; // scope 0 at $DIR/simple_match.rs:+3:14: +3:16
_0 = const 20_usize;
goto -> bb4;
}
bb3: {
_0 = const 10_usize; // scope 0 at $DIR/simple_match.rs:+2:17: +2:19
goto -> bb4; // scope 0 at $DIR/simple_match.rs:+2:17: +2:19
_0 = const 10_usize;
goto -> bb4;
}
bb4: {
return; // scope 0 at $DIR/simple_match.rs:+5:2: +5:2
return;
}
}

View File

@ -1,203 +1,200 @@
// MIR for `XXX` after built
static XXX: &Foo = {
let mut _0: &Foo; // return place in scope 0 at $DIR/storage_live_dead_in_statics.rs:+0:13: +0:25
let _1: &Foo; // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+0:28: +18:2
let _2: Foo; // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+0:29: +18:2
let mut _3: &[(u32, u32)]; // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+2:11: +17:6
let mut _4: &[(u32, u32); 42]; // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+2:11: +17:6
let _5: &[(u32, u32); 42]; // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+2:11: +17:6
let _6: [(u32, u32); 42]; // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+2:12: +17:6
let mut _7: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+3:9: +3:15
let mut _8: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+3:17: +3:23
let mut _9: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+3:25: +3:31
let mut _10: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+4:9: +4:15
let mut _11: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+4:17: +4:23
let mut _12: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+4:25: +4:31
let mut _13: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+5:9: +5:15
let mut _14: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+5:17: +5:23
let mut _15: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+5:25: +5:31
let mut _16: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+6:9: +6:15
let mut _17: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+6:17: +6:23
let mut _18: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+6:25: +6:31
let mut _19: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+7:9: +7:15
let mut _20: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+7:17: +7:23
let mut _21: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+7:25: +7:31
let mut _22: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+8:9: +8:15
let mut _23: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+8:17: +8:23
let mut _24: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+8:25: +8:31
let mut _25: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+9:9: +9:15
let mut _26: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+9:17: +9:23
let mut _27: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+9:25: +9:31
let mut _28: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+10:9: +10:15
let mut _29: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+10:17: +10:23
let mut _30: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+10:25: +10:31
let mut _31: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+11:9: +11:15
let mut _32: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+11:17: +11:23
let mut _33: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+11:25: +11:31
let mut _34: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+12:9: +12:15
let mut _35: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+12:17: +12:23
let mut _36: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+12:25: +12:31
let mut _37: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+13:9: +13:15
let mut _38: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+13:17: +13:23
let mut _39: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+13:25: +13:31
let mut _40: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+14:9: +14:15
let mut _41: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+14:17: +14:23
let mut _42: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+14:25: +14:31
let mut _43: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+15:9: +15:15
let mut _44: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+15:17: +15:23
let mut _45: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+15:25: +15:31
let mut _46: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+16:9: +16:15
let mut _47: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+16:17: +16:23
let mut _48: (u32, u32); // in scope 0 at $DIR/storage_live_dead_in_statics.rs:+16:25: +16:31
let mut _0: &Foo;
let _1: &Foo;
let _2: Foo;
let mut _3: &[(u32, u32)];
let mut _4: &[(u32, u32); 42];
let _5: &[(u32, u32); 42];
let _6: [(u32, u32); 42];
let mut _7: (u32, u32);
let mut _8: (u32, u32);
let mut _9: (u32, u32);
let mut _10: (u32, u32);
let mut _11: (u32, u32);
let mut _12: (u32, u32);
let mut _13: (u32, u32);
let mut _14: (u32, u32);
let mut _15: (u32, u32);
let mut _16: (u32, u32);
let mut _17: (u32, u32);
let mut _18: (u32, u32);
let mut _19: (u32, u32);
let mut _20: (u32, u32);
let mut _21: (u32, u32);
let mut _22: (u32, u32);
let mut _23: (u32, u32);
let mut _24: (u32, u32);
let mut _25: (u32, u32);
let mut _26: (u32, u32);
let mut _27: (u32, u32);
let mut _28: (u32, u32);
let mut _29: (u32, u32);
let mut _30: (u32, u32);
let mut _31: (u32, u32);
let mut _32: (u32, u32);
let mut _33: (u32, u32);
let mut _34: (u32, u32);
let mut _35: (u32, u32);
let mut _36: (u32, u32);
let mut _37: (u32, u32);
let mut _38: (u32, u32);
let mut _39: (u32, u32);
let mut _40: (u32, u32);
let mut _41: (u32, u32);
let mut _42: (u32, u32);
let mut _43: (u32, u32);
let mut _44: (u32, u32);
let mut _45: (u32, u32);
let mut _46: (u32, u32);
let mut _47: (u32, u32);
let mut _48: (u32, u32);
bb0: {
StorageLive(_1); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+0:28: +18:2
StorageLive(_2); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+0:29: +18:2
StorageLive(_3); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+2:11: +17:6
StorageLive(_4); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+2:11: +17:6
StorageLive(_5); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+2:11: +17:6
StorageLive(_6); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+2:12: +17:6
StorageLive(_7); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+3:9: +3:15
_7 = (const 0_u32, const 1_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+3:9: +3:15
StorageLive(_8); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+3:17: +3:23
_8 = (const 0_u32, const 2_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+3:17: +3:23
StorageLive(_9); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+3:25: +3:31
_9 = (const 0_u32, const 3_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+3:25: +3:31
StorageLive(_10); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+4:9: +4:15
_10 = (const 0_u32, const 1_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+4:9: +4:15
StorageLive(_11); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+4:17: +4:23
_11 = (const 0_u32, const 2_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+4:17: +4:23
StorageLive(_12); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+4:25: +4:31
_12 = (const 0_u32, const 3_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+4:25: +4:31
StorageLive(_13); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+5:9: +5:15
_13 = (const 0_u32, const 1_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+5:9: +5:15
StorageLive(_14); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+5:17: +5:23
_14 = (const 0_u32, const 2_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+5:17: +5:23
StorageLive(_15); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+5:25: +5:31
_15 = (const 0_u32, const 3_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+5:25: +5:31
StorageLive(_16); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+6:9: +6:15
_16 = (const 0_u32, const 1_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+6:9: +6:15
StorageLive(_17); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+6:17: +6:23
_17 = (const 0_u32, const 2_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+6:17: +6:23
StorageLive(_18); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+6:25: +6:31
_18 = (const 0_u32, const 3_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+6:25: +6:31
StorageLive(_19); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+7:9: +7:15
_19 = (const 0_u32, const 1_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+7:9: +7:15
StorageLive(_20); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+7:17: +7:23
_20 = (const 0_u32, const 2_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+7:17: +7:23
StorageLive(_21); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+7:25: +7:31
_21 = (const 0_u32, const 3_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+7:25: +7:31
StorageLive(_22); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+8:9: +8:15
_22 = (const 0_u32, const 1_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+8:9: +8:15
StorageLive(_23); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+8:17: +8:23
_23 = (const 0_u32, const 2_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+8:17: +8:23
StorageLive(_24); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+8:25: +8:31
_24 = (const 0_u32, const 3_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+8:25: +8:31
StorageLive(_25); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+9:9: +9:15
_25 = (const 0_u32, const 1_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+9:9: +9:15
StorageLive(_26); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+9:17: +9:23
_26 = (const 0_u32, const 2_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+9:17: +9:23
StorageLive(_27); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+9:25: +9:31
_27 = (const 0_u32, const 3_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+9:25: +9:31
StorageLive(_28); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+10:9: +10:15
_28 = (const 0_u32, const 1_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+10:9: +10:15
StorageLive(_29); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+10:17: +10:23
_29 = (const 0_u32, const 2_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+10:17: +10:23
StorageLive(_30); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+10:25: +10:31
_30 = (const 0_u32, const 3_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+10:25: +10:31
StorageLive(_31); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+11:9: +11:15
_31 = (const 0_u32, const 1_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+11:9: +11:15
StorageLive(_32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+11:17: +11:23
_32 = (const 0_u32, const 2_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+11:17: +11:23
StorageLive(_33); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+11:25: +11:31
_33 = (const 0_u32, const 3_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+11:25: +11:31
StorageLive(_34); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+12:9: +12:15
_34 = (const 0_u32, const 1_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+12:9: +12:15
StorageLive(_35); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+12:17: +12:23
_35 = (const 0_u32, const 2_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+12:17: +12:23
StorageLive(_36); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+12:25: +12:31
_36 = (const 0_u32, const 3_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+12:25: +12:31
StorageLive(_37); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+13:9: +13:15
_37 = (const 0_u32, const 1_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+13:9: +13:15
StorageLive(_38); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+13:17: +13:23
_38 = (const 0_u32, const 2_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+13:17: +13:23
StorageLive(_39); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+13:25: +13:31
_39 = (const 0_u32, const 3_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+13:25: +13:31
StorageLive(_40); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+14:9: +14:15
_40 = (const 0_u32, const 1_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+14:9: +14:15
StorageLive(_41); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+14:17: +14:23
_41 = (const 0_u32, const 2_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+14:17: +14:23
StorageLive(_42); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+14:25: +14:31
_42 = (const 0_u32, const 3_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+14:25: +14:31
StorageLive(_43); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+15:9: +15:15
_43 = (const 0_u32, const 1_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+15:9: +15:15
StorageLive(_44); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+15:17: +15:23
_44 = (const 0_u32, const 2_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+15:17: +15:23
StorageLive(_45); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+15:25: +15:31
_45 = (const 0_u32, const 3_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+15:25: +15:31
StorageLive(_46); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+16:9: +16:15
_46 = (const 0_u32, const 1_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+16:9: +16:15
StorageLive(_47); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+16:17: +16:23
_47 = (const 0_u32, const 2_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+16:17: +16:23
StorageLive(_48); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+16:25: +16:31
_48 = (const 0_u32, const 3_u32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+16:25: +16:31
_6 = [move _7, move _8, move _9, move _10, move _11, move _12, move _13, move _14, move _15, move _16, move _17, move _18, move _19, move _20, move _21, move _22, move _23, move _24, move _25, move _26, move _27, move _28, move _29, move _30, move _31, move _32, move _33, move _34, move _35, move _36, move _37, move _38, move _39, move _40, move _41, move _42, move _43, move _44, move _45, move _46, move _47, move _48]; // scope 0 at $DIR/storage_live_dead_in_statics.rs:+2:12: +17:6
StorageDead(_48); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_47); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_46); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_45); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_44); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_43); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_42); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_41); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_40); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_39); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_38); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_37); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_36); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_35); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_34); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_33); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_32); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_31); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_30); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_29); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_28); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_27); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_26); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_25); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_24); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_23); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_22); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_21); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_20); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_19); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_18); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_17); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_16); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_15); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_14); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_13); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_12); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_11); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_10); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_9); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_8); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
StorageDead(_7); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
_5 = &_6; // scope 0 at $DIR/storage_live_dead_in_statics.rs:+2:11: +17:6
_4 = &(*_5); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+2:11: +17:6
_3 = move _4 as &[(u32, u32)] (Pointer(Unsize)); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+2:11: +17:6
StorageDead(_4); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+17:5: +17:6
_2 = Foo { tup: const "hi", data: move _3 }; // scope 0 at $DIR/storage_live_dead_in_statics.rs:+0:29: +18:2
// mir::Constant
// + span: $DIR/storage_live_dead_in_statics.rs:6:10: 6:14
// + literal: Const { ty: &str, val: Value(Slice(..)) }
StorageDead(_3); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+18:1: +18:2
_1 = &_2; // scope 0 at $DIR/storage_live_dead_in_statics.rs:+0:28: +18:2
_0 = &(*_1); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+0:28: +18:2
StorageDead(_5); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+18:1: +18:2
StorageDead(_1); // scope 0 at $DIR/storage_live_dead_in_statics.rs:+18:1: +18:2
return; // scope 0 at $DIR/storage_live_dead_in_statics.rs:+0:1: +18:3
StorageLive(_1);
StorageLive(_2);
StorageLive(_3);
StorageLive(_4);
StorageLive(_5);
StorageLive(_6);
StorageLive(_7);
_7 = (const 0_u32, const 1_u32);
StorageLive(_8);
_8 = (const 0_u32, const 2_u32);
StorageLive(_9);
_9 = (const 0_u32, const 3_u32);
StorageLive(_10);
_10 = (const 0_u32, const 1_u32);
StorageLive(_11);
_11 = (const 0_u32, const 2_u32);
StorageLive(_12);
_12 = (const 0_u32, const 3_u32);
StorageLive(_13);
_13 = (const 0_u32, const 1_u32);
StorageLive(_14);
_14 = (const 0_u32, const 2_u32);
StorageLive(_15);
_15 = (const 0_u32, const 3_u32);
StorageLive(_16);
_16 = (const 0_u32, const 1_u32);
StorageLive(_17);
_17 = (const 0_u32, const 2_u32);
StorageLive(_18);
_18 = (const 0_u32, const 3_u32);
StorageLive(_19);
_19 = (const 0_u32, const 1_u32);
StorageLive(_20);
_20 = (const 0_u32, const 2_u32);
StorageLive(_21);
_21 = (const 0_u32, const 3_u32);
StorageLive(_22);
_22 = (const 0_u32, const 1_u32);
StorageLive(_23);
_23 = (const 0_u32, const 2_u32);
StorageLive(_24);
_24 = (const 0_u32, const 3_u32);
StorageLive(_25);
_25 = (const 0_u32, const 1_u32);
StorageLive(_26);
_26 = (const 0_u32, const 2_u32);
StorageLive(_27);
_27 = (const 0_u32, const 3_u32);
StorageLive(_28);
_28 = (const 0_u32, const 1_u32);
StorageLive(_29);
_29 = (const 0_u32, const 2_u32);
StorageLive(_30);
_30 = (const 0_u32, const 3_u32);
StorageLive(_31);
_31 = (const 0_u32, const 1_u32);
StorageLive(_32);
_32 = (const 0_u32, const 2_u32);
StorageLive(_33);
_33 = (const 0_u32, const 3_u32);
StorageLive(_34);
_34 = (const 0_u32, const 1_u32);
StorageLive(_35);
_35 = (const 0_u32, const 2_u32);
StorageLive(_36);
_36 = (const 0_u32, const 3_u32);
StorageLive(_37);
_37 = (const 0_u32, const 1_u32);
StorageLive(_38);
_38 = (const 0_u32, const 2_u32);
StorageLive(_39);
_39 = (const 0_u32, const 3_u32);
StorageLive(_40);
_40 = (const 0_u32, const 1_u32);
StorageLive(_41);
_41 = (const 0_u32, const 2_u32);
StorageLive(_42);
_42 = (const 0_u32, const 3_u32);
StorageLive(_43);
_43 = (const 0_u32, const 1_u32);
StorageLive(_44);
_44 = (const 0_u32, const 2_u32);
StorageLive(_45);
_45 = (const 0_u32, const 3_u32);
StorageLive(_46);
_46 = (const 0_u32, const 1_u32);
StorageLive(_47);
_47 = (const 0_u32, const 2_u32);
StorageLive(_48);
_48 = (const 0_u32, const 3_u32);
_6 = [move _7, move _8, move _9, move _10, move _11, move _12, move _13, move _14, move _15, move _16, move _17, move _18, move _19, move _20, move _21, move _22, move _23, move _24, move _25, move _26, move _27, move _28, move _29, move _30, move _31, move _32, move _33, move _34, move _35, move _36, move _37, move _38, move _39, move _40, move _41, move _42, move _43, move _44, move _45, move _46, move _47, move _48];
StorageDead(_48);
StorageDead(_47);
StorageDead(_46);
StorageDead(_45);
StorageDead(_44);
StorageDead(_43);
StorageDead(_42);
StorageDead(_41);
StorageDead(_40);
StorageDead(_39);
StorageDead(_38);
StorageDead(_37);
StorageDead(_36);
StorageDead(_35);
StorageDead(_34);
StorageDead(_33);
StorageDead(_32);
StorageDead(_31);
StorageDead(_30);
StorageDead(_29);
StorageDead(_28);
StorageDead(_27);
StorageDead(_26);
StorageDead(_25);
StorageDead(_24);
StorageDead(_23);
StorageDead(_22);
StorageDead(_21);
StorageDead(_20);
StorageDead(_19);
StorageDead(_18);
StorageDead(_17);
StorageDead(_16);
StorageDead(_15);
StorageDead(_14);
StorageDead(_13);
StorageDead(_12);
StorageDead(_11);
StorageDead(_10);
StorageDead(_9);
StorageDead(_8);
StorageDead(_7);
_5 = &_6;
_4 = &(*_5);
_3 = move _4 as &[(u32, u32)] (Pointer(Unsize));
StorageDead(_4);
_2 = Foo { tup: const "hi", data: move _3 };
StorageDead(_3);
_1 = &_2;
_0 = &(*_1);
StorageDead(_5);
StorageDead(_1);
return;
}
}

View File

@ -1,23 +1,23 @@
// MIR for `move_out_by_subslice` after built
fn move_out_by_subslice() -> () {
let mut _0: (); // return place in scope 0 at $DIR/uniform_array_move_out.rs:+0:27: +0:27
let _1: [std::boxed::Box<i32>; 2]; // in scope 0 at $DIR/uniform_array_move_out.rs:+1:9: +1:10
let mut _2: std::boxed::Box<i32>; // in scope 0 at $DIR/uniform_array_move_out.rs:+3:9: +3:20
let mut _3: usize; // in scope 0 at $DIR/uniform_array_move_out.rs:+3:9: +3:20
let mut _4: usize; // in scope 0 at $DIR/uniform_array_move_out.rs:+3:9: +3:20
let mut _5: *mut u8; // in scope 0 at $DIR/uniform_array_move_out.rs:+3:9: +3:20
let mut _6: std::boxed::Box<i32>; // in scope 0 at $DIR/uniform_array_move_out.rs:+3:9: +3:20
let mut _7: std::boxed::Box<i32>; // in scope 0 at $DIR/uniform_array_move_out.rs:+5:9: +5:20
let mut _8: usize; // in scope 0 at $DIR/uniform_array_move_out.rs:+5:9: +5:20
let mut _9: usize; // in scope 0 at $DIR/uniform_array_move_out.rs:+5:9: +5:20
let mut _10: *mut u8; // in scope 0 at $DIR/uniform_array_move_out.rs:+5:9: +5:20
let mut _11: std::boxed::Box<i32>; // in scope 0 at $DIR/uniform_array_move_out.rs:+5:9: +5:20
let mut _0: ();
let _1: [std::boxed::Box<i32>; 2];
let mut _2: std::boxed::Box<i32>;
let mut _3: usize;
let mut _4: usize;
let mut _5: *mut u8;
let mut _6: std::boxed::Box<i32>;
let mut _7: std::boxed::Box<i32>;
let mut _8: usize;
let mut _9: usize;
let mut _10: *mut u8;
let mut _11: std::boxed::Box<i32>;
scope 1 {
debug a => _1; // in scope 1 at $DIR/uniform_array_move_out.rs:+1:9: +1:10
let _12: [std::boxed::Box<i32>; 2]; // in scope 1 at $DIR/uniform_array_move_out.rs:+7:10: +7:12
debug a => _1;
let _12: [std::boxed::Box<i32>; 2];
scope 4 {
debug _y => _12; // in scope 4 at $DIR/uniform_array_move_out.rs:+7:10: +7:12
debug _y => _12;
}
}
scope 2 {
@ -26,87 +26,81 @@ fn move_out_by_subslice() -> () {
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/uniform_array_move_out.rs:+1:9: +1:10
StorageLive(_2); // scope 0 at $DIR/uniform_array_move_out.rs:+3:9: +3:20
_3 = SizeOf(i32); // scope 2 at $DIR/uniform_array_move_out.rs:+3:9: +3:20
_4 = AlignOf(i32); // scope 2 at $DIR/uniform_array_move_out.rs:+3:9: +3:20
_5 = alloc::alloc::exchange_malloc(move _3, move _4) -> [return: bb1, unwind: bb12]; // scope 2 at $DIR/uniform_array_move_out.rs:+3:9: +3:20
// mir::Constant
// + span: $DIR/uniform_array_move_out.rs:18:9: 18:20
// + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value(<ZST>) }
StorageLive(_1);
StorageLive(_2);
_3 = SizeOf(i32);
_4 = AlignOf(i32);
_5 = alloc::alloc::exchange_malloc(move _3, move _4) -> [return: bb1, unwind: bb12];
}
bb1: {
StorageLive(_6); // scope 0 at $DIR/uniform_array_move_out.rs:+3:9: +3:20
_6 = ShallowInitBox(move _5, i32); // scope 0 at $DIR/uniform_array_move_out.rs:+3:9: +3:20
(*_6) = const 1_i32; // scope 0 at $DIR/uniform_array_move_out.rs:+3:18: +3:19
_2 = move _6; // scope 0 at $DIR/uniform_array_move_out.rs:+3:9: +3:20
drop(_6) -> [return: bb2, unwind: bb11]; // scope 0 at $DIR/uniform_array_move_out.rs:+3:19: +3:20
StorageLive(_6);
_6 = ShallowInitBox(move _5, i32);
(*_6) = const 1_i32;
_2 = move _6;
drop(_6) -> [return: bb2, unwind: bb11];
}
bb2: {
StorageDead(_6); // scope 0 at $DIR/uniform_array_move_out.rs:+3:19: +3:20
StorageLive(_7); // scope 0 at $DIR/uniform_array_move_out.rs:+5:9: +5:20
_8 = SizeOf(i32); // scope 3 at $DIR/uniform_array_move_out.rs:+5:9: +5:20
_9 = AlignOf(i32); // scope 3 at $DIR/uniform_array_move_out.rs:+5:9: +5:20
_10 = alloc::alloc::exchange_malloc(move _8, move _9) -> [return: bb3, unwind: bb11]; // scope 3 at $DIR/uniform_array_move_out.rs:+5:9: +5:20
// mir::Constant
// + span: $DIR/uniform_array_move_out.rs:20:9: 20:20
// + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value(<ZST>) }
StorageDead(_6);
StorageLive(_7);
_8 = SizeOf(i32);
_9 = AlignOf(i32);
_10 = alloc::alloc::exchange_malloc(move _8, move _9) -> [return: bb3, unwind: bb11];
}
bb3: {
StorageLive(_11); // scope 0 at $DIR/uniform_array_move_out.rs:+5:9: +5:20
_11 = ShallowInitBox(move _10, i32); // scope 0 at $DIR/uniform_array_move_out.rs:+5:9: +5:20
(*_11) = const 2_i32; // scope 0 at $DIR/uniform_array_move_out.rs:+5:18: +5:19
_7 = move _11; // scope 0 at $DIR/uniform_array_move_out.rs:+5:9: +5:20
drop(_11) -> [return: bb4, unwind: bb10]; // scope 0 at $DIR/uniform_array_move_out.rs:+5:19: +5:20
StorageLive(_11);
_11 = ShallowInitBox(move _10, i32);
(*_11) = const 2_i32;
_7 = move _11;
drop(_11) -> [return: bb4, unwind: bb10];
}
bb4: {
StorageDead(_11); // scope 0 at $DIR/uniform_array_move_out.rs:+5:19: +5:20
_1 = [move _2, move _7]; // scope 0 at $DIR/uniform_array_move_out.rs:+1:13: +6:6
drop(_7) -> [return: bb5, unwind: bb11]; // scope 0 at $DIR/uniform_array_move_out.rs:+6:5: +6:6
StorageDead(_11);
_1 = [move _2, move _7];
drop(_7) -> [return: bb5, unwind: bb11];
}
bb5: {
StorageDead(_7); // scope 0 at $DIR/uniform_array_move_out.rs:+6:5: +6:6
drop(_2) -> [return: bb6, unwind: bb12]; // scope 0 at $DIR/uniform_array_move_out.rs:+6:5: +6:6
StorageDead(_7);
drop(_2) -> [return: bb6, unwind: bb12];
}
bb6: {
StorageDead(_2); // scope 0 at $DIR/uniform_array_move_out.rs:+6:5: +6:6
FakeRead(ForLet(None), _1); // scope 0 at $DIR/uniform_array_move_out.rs:+1:9: +1:10
PlaceMention(_1); // scope 1 at $DIR/uniform_array_move_out.rs:+7:21: +7:22
StorageLive(_12); // scope 1 at $DIR/uniform_array_move_out.rs:+7:10: +7:12
_12 = move _1[0..2]; // scope 1 at $DIR/uniform_array_move_out.rs:+7:10: +7:12
_0 = const (); // scope 0 at $DIR/uniform_array_move_out.rs:+0:27: +8:2
drop(_12) -> [return: bb7, unwind: bb9]; // scope 1 at $DIR/uniform_array_move_out.rs:+8:1: +8:2
StorageDead(_2);
FakeRead(ForLet(None), _1);
PlaceMention(_1);
StorageLive(_12);
_12 = move _1[0..2];
_0 = const ();
drop(_12) -> [return: bb7, unwind: bb9];
}
bb7: {
StorageDead(_12); // scope 1 at $DIR/uniform_array_move_out.rs:+8:1: +8:2
drop(_1) -> [return: bb8, unwind: bb12]; // scope 0 at $DIR/uniform_array_move_out.rs:+8:1: +8:2
StorageDead(_12);
drop(_1) -> [return: bb8, unwind: bb12];
}
bb8: {
StorageDead(_1); // scope 0 at $DIR/uniform_array_move_out.rs:+8:1: +8:2
return; // scope 0 at $DIR/uniform_array_move_out.rs:+8:2: +8:2
StorageDead(_1);
return;
}
bb9 (cleanup): {
drop(_1) -> [return: bb12, unwind terminate]; // scope 0 at $DIR/uniform_array_move_out.rs:+8:1: +8:2
drop(_1) -> [return: bb12, unwind terminate];
}
bb10 (cleanup): {
drop(_7) -> [return: bb11, unwind terminate]; // scope 0 at $DIR/uniform_array_move_out.rs:+6:5: +6:6
drop(_7) -> [return: bb11, unwind terminate];
}
bb11 (cleanup): {
drop(_2) -> [return: bb12, unwind terminate]; // scope 0 at $DIR/uniform_array_move_out.rs:+6:5: +6:6
drop(_2) -> [return: bb12, unwind terminate];
}
bb12 (cleanup): {
resume; // scope 0 at $DIR/uniform_array_move_out.rs:+0:1: +8:2
resume;
}
}

View File

@ -1,23 +1,23 @@
// MIR for `move_out_from_end` after built
fn move_out_from_end() -> () {
let mut _0: (); // return place in scope 0 at $DIR/uniform_array_move_out.rs:+0:24: +0:24
let _1: [std::boxed::Box<i32>; 2]; // in scope 0 at $DIR/uniform_array_move_out.rs:+1:9: +1:10
let mut _2: std::boxed::Box<i32>; // in scope 0 at $DIR/uniform_array_move_out.rs:+3:9: +3:20
let mut _3: usize; // in scope 0 at $DIR/uniform_array_move_out.rs:+3:9: +3:20
let mut _4: usize; // in scope 0 at $DIR/uniform_array_move_out.rs:+3:9: +3:20
let mut _5: *mut u8; // in scope 0 at $DIR/uniform_array_move_out.rs:+3:9: +3:20
let mut _6: std::boxed::Box<i32>; // in scope 0 at $DIR/uniform_array_move_out.rs:+3:9: +3:20
let mut _7: std::boxed::Box<i32>; // in scope 0 at $DIR/uniform_array_move_out.rs:+5:9: +5:20
let mut _8: usize; // in scope 0 at $DIR/uniform_array_move_out.rs:+5:9: +5:20
let mut _9: usize; // in scope 0 at $DIR/uniform_array_move_out.rs:+5:9: +5:20
let mut _10: *mut u8; // in scope 0 at $DIR/uniform_array_move_out.rs:+5:9: +5:20
let mut _11: std::boxed::Box<i32>; // in scope 0 at $DIR/uniform_array_move_out.rs:+5:9: +5:20
let mut _0: ();
let _1: [std::boxed::Box<i32>; 2];
let mut _2: std::boxed::Box<i32>;
let mut _3: usize;
let mut _4: usize;
let mut _5: *mut u8;
let mut _6: std::boxed::Box<i32>;
let mut _7: std::boxed::Box<i32>;
let mut _8: usize;
let mut _9: usize;
let mut _10: *mut u8;
let mut _11: std::boxed::Box<i32>;
scope 1 {
debug a => _1; // in scope 1 at $DIR/uniform_array_move_out.rs:+1:9: +1:10
let _12: std::boxed::Box<i32>; // in scope 1 at $DIR/uniform_array_move_out.rs:+7:14: +7:16
debug a => _1;
let _12: std::boxed::Box<i32>;
scope 4 {
debug _y => _12; // in scope 4 at $DIR/uniform_array_move_out.rs:+7:14: +7:16
debug _y => _12;
}
}
scope 2 {
@ -26,87 +26,81 @@ fn move_out_from_end() -> () {
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/uniform_array_move_out.rs:+1:9: +1:10
StorageLive(_2); // scope 0 at $DIR/uniform_array_move_out.rs:+3:9: +3:20
_3 = SizeOf(i32); // scope 2 at $DIR/uniform_array_move_out.rs:+3:9: +3:20
_4 = AlignOf(i32); // scope 2 at $DIR/uniform_array_move_out.rs:+3:9: +3:20
_5 = alloc::alloc::exchange_malloc(move _3, move _4) -> [return: bb1, unwind: bb12]; // scope 2 at $DIR/uniform_array_move_out.rs:+3:9: +3:20
// mir::Constant
// + span: $DIR/uniform_array_move_out.rs:7:9: 7:20
// + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value(<ZST>) }
StorageLive(_1);
StorageLive(_2);
_3 = SizeOf(i32);
_4 = AlignOf(i32);
_5 = alloc::alloc::exchange_malloc(move _3, move _4) -> [return: bb1, unwind: bb12];
}
bb1: {
StorageLive(_6); // scope 0 at $DIR/uniform_array_move_out.rs:+3:9: +3:20
_6 = ShallowInitBox(move _5, i32); // scope 0 at $DIR/uniform_array_move_out.rs:+3:9: +3:20
(*_6) = const 1_i32; // scope 0 at $DIR/uniform_array_move_out.rs:+3:18: +3:19
_2 = move _6; // scope 0 at $DIR/uniform_array_move_out.rs:+3:9: +3:20
drop(_6) -> [return: bb2, unwind: bb11]; // scope 0 at $DIR/uniform_array_move_out.rs:+3:19: +3:20
StorageLive(_6);
_6 = ShallowInitBox(move _5, i32);
(*_6) = const 1_i32;
_2 = move _6;
drop(_6) -> [return: bb2, unwind: bb11];
}
bb2: {
StorageDead(_6); // scope 0 at $DIR/uniform_array_move_out.rs:+3:19: +3:20
StorageLive(_7); // scope 0 at $DIR/uniform_array_move_out.rs:+5:9: +5:20
_8 = SizeOf(i32); // scope 3 at $DIR/uniform_array_move_out.rs:+5:9: +5:20
_9 = AlignOf(i32); // scope 3 at $DIR/uniform_array_move_out.rs:+5:9: +5:20
_10 = alloc::alloc::exchange_malloc(move _8, move _9) -> [return: bb3, unwind: bb11]; // scope 3 at $DIR/uniform_array_move_out.rs:+5:9: +5:20
// mir::Constant
// + span: $DIR/uniform_array_move_out.rs:9:9: 9:20
// + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value(<ZST>) }
StorageDead(_6);
StorageLive(_7);
_8 = SizeOf(i32);
_9 = AlignOf(i32);
_10 = alloc::alloc::exchange_malloc(move _8, move _9) -> [return: bb3, unwind: bb11];
}
bb3: {
StorageLive(_11); // scope 0 at $DIR/uniform_array_move_out.rs:+5:9: +5:20
_11 = ShallowInitBox(move _10, i32); // scope 0 at $DIR/uniform_array_move_out.rs:+5:9: +5:20
(*_11) = const 2_i32; // scope 0 at $DIR/uniform_array_move_out.rs:+5:18: +5:19
_7 = move _11; // scope 0 at $DIR/uniform_array_move_out.rs:+5:9: +5:20
drop(_11) -> [return: bb4, unwind: bb10]; // scope 0 at $DIR/uniform_array_move_out.rs:+5:19: +5:20
StorageLive(_11);
_11 = ShallowInitBox(move _10, i32);
(*_11) = const 2_i32;
_7 = move _11;
drop(_11) -> [return: bb4, unwind: bb10];
}
bb4: {
StorageDead(_11); // scope 0 at $DIR/uniform_array_move_out.rs:+5:19: +5:20
_1 = [move _2, move _7]; // scope 0 at $DIR/uniform_array_move_out.rs:+1:13: +6:6
drop(_7) -> [return: bb5, unwind: bb11]; // scope 0 at $DIR/uniform_array_move_out.rs:+6:5: +6:6
StorageDead(_11);
_1 = [move _2, move _7];
drop(_7) -> [return: bb5, unwind: bb11];
}
bb5: {
StorageDead(_7); // scope 0 at $DIR/uniform_array_move_out.rs:+6:5: +6:6
drop(_2) -> [return: bb6, unwind: bb12]; // scope 0 at $DIR/uniform_array_move_out.rs:+6:5: +6:6
StorageDead(_7);
drop(_2) -> [return: bb6, unwind: bb12];
}
bb6: {
StorageDead(_2); // scope 0 at $DIR/uniform_array_move_out.rs:+6:5: +6:6
FakeRead(ForLet(None), _1); // scope 0 at $DIR/uniform_array_move_out.rs:+1:9: +1:10
PlaceMention(_1); // scope 1 at $DIR/uniform_array_move_out.rs:+7:20: +7:21
StorageLive(_12); // scope 1 at $DIR/uniform_array_move_out.rs:+7:14: +7:16
_12 = move _1[1 of 2]; // scope 1 at $DIR/uniform_array_move_out.rs:+7:14: +7:16
_0 = const (); // scope 0 at $DIR/uniform_array_move_out.rs:+0:24: +8:2
drop(_12) -> [return: bb7, unwind: bb9]; // scope 1 at $DIR/uniform_array_move_out.rs:+8:1: +8:2
StorageDead(_2);
FakeRead(ForLet(None), _1);
PlaceMention(_1);
StorageLive(_12);
_12 = move _1[1 of 2];
_0 = const ();
drop(_12) -> [return: bb7, unwind: bb9];
}
bb7: {
StorageDead(_12); // scope 1 at $DIR/uniform_array_move_out.rs:+8:1: +8:2
drop(_1) -> [return: bb8, unwind: bb12]; // scope 0 at $DIR/uniform_array_move_out.rs:+8:1: +8:2
StorageDead(_12);
drop(_1) -> [return: bb8, unwind: bb12];
}
bb8: {
StorageDead(_1); // scope 0 at $DIR/uniform_array_move_out.rs:+8:1: +8:2
return; // scope 0 at $DIR/uniform_array_move_out.rs:+8:2: +8:2
StorageDead(_1);
return;
}
bb9 (cleanup): {
drop(_1) -> [return: bb12, unwind terminate]; // scope 0 at $DIR/uniform_array_move_out.rs:+8:1: +8:2
drop(_1) -> [return: bb12, unwind terminate];
}
bb10 (cleanup): {
drop(_7) -> [return: bb11, unwind terminate]; // scope 0 at $DIR/uniform_array_move_out.rs:+6:5: +6:6
drop(_7) -> [return: bb11, unwind terminate];
}
bb11 (cleanup): {
drop(_2) -> [return: bb12, unwind terminate]; // scope 0 at $DIR/uniform_array_move_out.rs:+6:5: +6:6
drop(_2) -> [return: bb12, unwind terminate];
}
bb12 (cleanup): {
resume; // scope 0 at $DIR/uniform_array_move_out.rs:+0:1: +8:2
resume;
}
}

View File

@ -1,28 +1,25 @@
// MIR for `main` after SimplifyCfg-elaborate-drops
fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/byte_slice.rs:+0:11: +0:11
let _1: &[u8; 3]; // in scope 0 at $DIR/byte_slice.rs:+1:9: +1:10
let mut _0: ();
let _1: &[u8; 3];
scope 1 {
debug x => _1; // in scope 1 at $DIR/byte_slice.rs:+1:9: +1:10
let _2: [u8; 2]; // in scope 1 at $DIR/byte_slice.rs:+2:9: +2:10
debug x => _1;
let _2: [u8; 2];
scope 2 {
debug y => _2; // in scope 2 at $DIR/byte_slice.rs:+2:9: +2:10
debug y => _2;
}
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/byte_slice.rs:+1:9: +1:10
_1 = const b"foo"; // scope 0 at $DIR/byte_slice.rs:+1:13: +1:19
// mir::Constant
// + span: $DIR/byte_slice.rs:5:13: 5:19
// + literal: Const { ty: &[u8; 3], val: Value(Scalar(alloc1)) }
StorageLive(_2); // scope 1 at $DIR/byte_slice.rs:+2:9: +2:10
_2 = [const 5_u8, const 120_u8]; // scope 1 at $DIR/byte_slice.rs:+2:13: +2:24
_0 = const (); // scope 0 at $DIR/byte_slice.rs:+0:11: +3:2
StorageDead(_2); // scope 1 at $DIR/byte_slice.rs:+3:1: +3:2
StorageDead(_1); // scope 0 at $DIR/byte_slice.rs:+3:1: +3:2
return; // scope 0 at $DIR/byte_slice.rs:+3:2: +3:2
StorageLive(_1);
_1 = const b"foo";
StorageLive(_2);
_2 = [const 5_u8, const 120_u8];
_0 = const ();
StorageDead(_2);
StorageDead(_1);
return;
}
}

View File

@ -2,24 +2,24 @@
+ // MIR for `redundant` after InstSimplify
fn redundant(_1: *const &u8) -> *const &u8 {
debug x => _1; // in scope 0 at $DIR/casts.rs:+0:30: +0:31
let mut _0: *const &u8; // return place in scope 0 at $DIR/casts.rs:+0:51: +0:64
let mut _2: *const &u8; // in scope 0 at $DIR/casts.rs:+1:5: +1:55
let mut _3: *const &u8; // in scope 0 at $DIR/casts.rs:+1:36: +1:37
scope 1 (inlined generic_cast::<&u8, &u8>) { // at $DIR/casts.rs:6:5: 6:38
debug x => _3; // in scope 1 at $DIR/casts.rs:10:23: 10:24
debug x => _1;
let mut _0: *const &u8;
let mut _2: *const &u8;
let mut _3: *const &u8;
scope 1 (inlined generic_cast::<&u8, &u8>) {
debug x => _3;
}
bb0: {
StorageLive(_2); // scope 0 at $DIR/casts.rs:+1:5: +1:55
StorageLive(_3); // scope 0 at $DIR/casts.rs:+1:36: +1:37
_3 = _1; // scope 0 at $DIR/casts.rs:+1:36: +1:37
- _2 = _3 as *const &u8 (PtrToPtr); // scope 1 at $DIR/casts.rs:11:5: 11:18
+ _2 = _3; // scope 1 at $DIR/casts.rs:11:5: 11:18
StorageDead(_3); // scope 0 at $DIR/casts.rs:+1:37: +1:38
_0 = _2; // scope 0 at $DIR/casts.rs:+1:5: +1:55
StorageDead(_2); // scope 0 at $DIR/casts.rs:+2:1: +2:2
return; // scope 0 at $DIR/casts.rs:+2:2: +2:2
StorageLive(_2);
StorageLive(_3);
_3 = _1;
- _2 = _3 as *const &u8 (PtrToPtr);
+ _2 = _3;
StorageDead(_3);
_0 = _2;
StorageDead(_2);
return;
}
}

View File

@ -1,14 +1,14 @@
// MIR for `redundant` after PreCodegen
fn redundant(_1: *const &u8) -> *const &u8 {
debug x => _1; // in scope 0 at $DIR/casts.rs:+0:30: +0:31
let mut _0: *const &u8; // return place in scope 0 at $DIR/casts.rs:+0:51: +0:64
scope 1 (inlined generic_cast::<&u8, &u8>) { // at $DIR/casts.rs:6:5: 6:38
debug x => _1; // in scope 1 at $DIR/casts.rs:10:23: 10:24
debug x => _1;
let mut _0: *const &u8;
scope 1 (inlined generic_cast::<&u8, &u8>) {
debug x => _1;
}
bb0: {
_0 = _1; // scope 0 at $DIR/casts.rs:+1:5: +1:55
return; // scope 0 at $DIR/casts.rs:+2:2: +2:2
_0 = _1;
return;
}
}

View File

@ -1,15 +1,15 @@
// MIR for `roundtrip` after PreCodegen
fn roundtrip(_1: *const u8) -> *const u8 {
debug x => _1; // in scope 0 at $DIR/casts.rs:+0:18: +0:19
let mut _0: *const u8; // return place in scope 0 at $DIR/casts.rs:+0:35: +0:44
let mut _2: *mut u8; // in scope 0 at $DIR/casts.rs:+1:5: +1:17
debug x => _1;
let mut _0: *const u8;
let mut _2: *mut u8;
bb0: {
StorageLive(_2); // scope 0 at $DIR/casts.rs:+1:5: +1:17
_2 = _1 as *mut u8 (PtrToPtr); // scope 0 at $DIR/casts.rs:+1:5: +1:17
_0 = move _2 as *const u8 (Pointer(MutToConstPointer)); // scope 0 at $DIR/casts.rs:+1:5: +1:17
StorageDead(_2); // scope 0 at $DIR/casts.rs:+1:16: +1:17
return; // scope 0 at $DIR/casts.rs:+2:2: +2:2
StorageLive(_2);
_2 = _1 as *mut u8 (PtrToPtr);
_0 = move _2 as *const u8 (Pointer(MutToConstPointer));
StorageDead(_2);
return;
}
}

View File

@ -2,76 +2,76 @@
+ // MIR for `norm2` after InstSimplify
fn norm2(_1: [f32; 2]) -> f32 {
debug x => _1; // in scope 0 at $DIR/combine_array_len.rs:+0:10: +0:11
let mut _0: f32; // return place in scope 0 at $DIR/combine_array_len.rs:+0:26: +0:29
let _2: f32; // in scope 0 at $DIR/combine_array_len.rs:+1:9: +1:10
let _3: usize; // in scope 0 at $DIR/combine_array_len.rs:+1:15: +1:16
let mut _4: usize; // in scope 0 at $DIR/combine_array_len.rs:+1:13: +1:17
let mut _5: bool; // in scope 0 at $DIR/combine_array_len.rs:+1:13: +1:17
let _7: usize; // in scope 0 at $DIR/combine_array_len.rs:+2:15: +2:16
let mut _8: usize; // in scope 0 at $DIR/combine_array_len.rs:+2:13: +2:17
let mut _9: bool; // in scope 0 at $DIR/combine_array_len.rs:+2:13: +2:17
let mut _10: f32; // in scope 0 at $DIR/combine_array_len.rs:+3:5: +3:8
let mut _11: f32; // in scope 0 at $DIR/combine_array_len.rs:+3:5: +3:6
let mut _12: f32; // in scope 0 at $DIR/combine_array_len.rs:+3:7: +3:8
let mut _13: f32; // in scope 0 at $DIR/combine_array_len.rs:+3:11: +3:14
let mut _14: f32; // in scope 0 at $DIR/combine_array_len.rs:+3:11: +3:12
let mut _15: f32; // in scope 0 at $DIR/combine_array_len.rs:+3:13: +3:14
debug x => _1;
let mut _0: f32;
let _2: f32;
let _3: usize;
let mut _4: usize;
let mut _5: bool;
let _7: usize;
let mut _8: usize;
let mut _9: bool;
let mut _10: f32;
let mut _11: f32;
let mut _12: f32;
let mut _13: f32;
let mut _14: f32;
let mut _15: f32;
scope 1 {
debug a => _2; // in scope 1 at $DIR/combine_array_len.rs:+1:9: +1:10
let _6: f32; // in scope 1 at $DIR/combine_array_len.rs:+2:9: +2:10
debug a => _2;
let _6: f32;
scope 2 {
debug b => _6; // in scope 2 at $DIR/combine_array_len.rs:+2:9: +2:10
debug b => _6;
}
}
bb0: {
StorageLive(_2); // scope 0 at $DIR/combine_array_len.rs:+1:9: +1:10
StorageLive(_3); // scope 0 at $DIR/combine_array_len.rs:+1:15: +1:16
_3 = const 0_usize; // scope 0 at $DIR/combine_array_len.rs:+1:15: +1:16
- _4 = Len(_1); // scope 0 at $DIR/combine_array_len.rs:+1:13: +1:17
+ _4 = const 2_usize; // scope 0 at $DIR/combine_array_len.rs:+1:13: +1:17
_5 = Lt(_3, _4); // scope 0 at $DIR/combine_array_len.rs:+1:13: +1:17
assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> [success: bb1, unwind unreachable]; // scope 0 at $DIR/combine_array_len.rs:+1:13: +1:17
StorageLive(_2);
StorageLive(_3);
_3 = const 0_usize;
- _4 = Len(_1);
+ _4 = const 2_usize;
_5 = Lt(_3, _4);
assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> [success: bb1, unwind unreachable];
}
bb1: {
_2 = _1[_3]; // scope 0 at $DIR/combine_array_len.rs:+1:13: +1:17
StorageDead(_3); // scope 0 at $DIR/combine_array_len.rs:+1:17: +1:18
StorageLive(_6); // scope 1 at $DIR/combine_array_len.rs:+2:9: +2:10
StorageLive(_7); // scope 1 at $DIR/combine_array_len.rs:+2:15: +2:16
_7 = const 1_usize; // scope 1 at $DIR/combine_array_len.rs:+2:15: +2:16
- _8 = Len(_1); // scope 1 at $DIR/combine_array_len.rs:+2:13: +2:17
+ _8 = const 2_usize; // scope 1 at $DIR/combine_array_len.rs:+2:13: +2:17
_9 = Lt(_7, _8); // scope 1 at $DIR/combine_array_len.rs:+2:13: +2:17
assert(move _9, "index out of bounds: the length is {} but the index is {}", move _8, _7) -> [success: bb2, unwind unreachable]; // scope 1 at $DIR/combine_array_len.rs:+2:13: +2:17
_2 = _1[_3];
StorageDead(_3);
StorageLive(_6);
StorageLive(_7);
_7 = const 1_usize;
- _8 = Len(_1);
+ _8 = const 2_usize;
_9 = Lt(_7, _8);
assert(move _9, "index out of bounds: the length is {} but the index is {}", move _8, _7) -> [success: bb2, unwind unreachable];
}
bb2: {
_6 = _1[_7]; // scope 1 at $DIR/combine_array_len.rs:+2:13: +2:17
StorageDead(_7); // scope 1 at $DIR/combine_array_len.rs:+2:17: +2:18
StorageLive(_10); // scope 2 at $DIR/combine_array_len.rs:+3:5: +3:8
StorageLive(_11); // scope 2 at $DIR/combine_array_len.rs:+3:5: +3:6
_11 = _2; // scope 2 at $DIR/combine_array_len.rs:+3:5: +3:6
StorageLive(_12); // scope 2 at $DIR/combine_array_len.rs:+3:7: +3:8
_12 = _2; // scope 2 at $DIR/combine_array_len.rs:+3:7: +3:8
_10 = Mul(move _11, move _12); // scope 2 at $DIR/combine_array_len.rs:+3:5: +3:8
StorageDead(_12); // scope 2 at $DIR/combine_array_len.rs:+3:7: +3:8
StorageDead(_11); // scope 2 at $DIR/combine_array_len.rs:+3:7: +3:8
StorageLive(_13); // scope 2 at $DIR/combine_array_len.rs:+3:11: +3:14
StorageLive(_14); // scope 2 at $DIR/combine_array_len.rs:+3:11: +3:12
_14 = _6; // scope 2 at $DIR/combine_array_len.rs:+3:11: +3:12
StorageLive(_15); // scope 2 at $DIR/combine_array_len.rs:+3:13: +3:14
_15 = _6; // scope 2 at $DIR/combine_array_len.rs:+3:13: +3:14
_13 = Mul(move _14, move _15); // scope 2 at $DIR/combine_array_len.rs:+3:11: +3:14
StorageDead(_15); // scope 2 at $DIR/combine_array_len.rs:+3:13: +3:14
StorageDead(_14); // scope 2 at $DIR/combine_array_len.rs:+3:13: +3:14
_0 = Add(move _10, move _13); // scope 2 at $DIR/combine_array_len.rs:+3:5: +3:14
StorageDead(_13); // scope 2 at $DIR/combine_array_len.rs:+3:13: +3:14
StorageDead(_10); // scope 2 at $DIR/combine_array_len.rs:+3:13: +3:14
StorageDead(_6); // scope 1 at $DIR/combine_array_len.rs:+4:1: +4:2
StorageDead(_2); // scope 0 at $DIR/combine_array_len.rs:+4:1: +4:2
return; // scope 0 at $DIR/combine_array_len.rs:+4:2: +4:2
_6 = _1[_7];
StorageDead(_7);
StorageLive(_10);
StorageLive(_11);
_11 = _2;
StorageLive(_12);
_12 = _2;
_10 = Mul(move _11, move _12);
StorageDead(_12);
StorageDead(_11);
StorageLive(_13);
StorageLive(_14);
_14 = _6;
StorageLive(_15);
_15 = _6;
_13 = Mul(move _14, move _15);
StorageDead(_15);
StorageDead(_14);
_0 = Add(move _10, move _13);
StorageDead(_13);
StorageDead(_10);
StorageDead(_6);
StorageDead(_2);
return;
}
}

View File

@ -2,76 +2,76 @@
+ // MIR for `norm2` after InstSimplify
fn norm2(_1: [f32; 2]) -> f32 {
debug x => _1; // in scope 0 at $DIR/combine_array_len.rs:+0:10: +0:11
let mut _0: f32; // return place in scope 0 at $DIR/combine_array_len.rs:+0:26: +0:29
let _2: f32; // in scope 0 at $DIR/combine_array_len.rs:+1:9: +1:10
let _3: usize; // in scope 0 at $DIR/combine_array_len.rs:+1:15: +1:16
let mut _4: usize; // in scope 0 at $DIR/combine_array_len.rs:+1:13: +1:17
let mut _5: bool; // in scope 0 at $DIR/combine_array_len.rs:+1:13: +1:17
let _7: usize; // in scope 0 at $DIR/combine_array_len.rs:+2:15: +2:16
let mut _8: usize; // in scope 0 at $DIR/combine_array_len.rs:+2:13: +2:17
let mut _9: bool; // in scope 0 at $DIR/combine_array_len.rs:+2:13: +2:17
let mut _10: f32; // in scope 0 at $DIR/combine_array_len.rs:+3:5: +3:8
let mut _11: f32; // in scope 0 at $DIR/combine_array_len.rs:+3:5: +3:6
let mut _12: f32; // in scope 0 at $DIR/combine_array_len.rs:+3:7: +3:8
let mut _13: f32; // in scope 0 at $DIR/combine_array_len.rs:+3:11: +3:14
let mut _14: f32; // in scope 0 at $DIR/combine_array_len.rs:+3:11: +3:12
let mut _15: f32; // in scope 0 at $DIR/combine_array_len.rs:+3:13: +3:14
debug x => _1;
let mut _0: f32;
let _2: f32;
let _3: usize;
let mut _4: usize;
let mut _5: bool;
let _7: usize;
let mut _8: usize;
let mut _9: bool;
let mut _10: f32;
let mut _11: f32;
let mut _12: f32;
let mut _13: f32;
let mut _14: f32;
let mut _15: f32;
scope 1 {
debug a => _2; // in scope 1 at $DIR/combine_array_len.rs:+1:9: +1:10
let _6: f32; // in scope 1 at $DIR/combine_array_len.rs:+2:9: +2:10
debug a => _2;
let _6: f32;
scope 2 {
debug b => _6; // in scope 2 at $DIR/combine_array_len.rs:+2:9: +2:10
debug b => _6;
}
}
bb0: {
StorageLive(_2); // scope 0 at $DIR/combine_array_len.rs:+1:9: +1:10
StorageLive(_3); // scope 0 at $DIR/combine_array_len.rs:+1:15: +1:16
_3 = const 0_usize; // scope 0 at $DIR/combine_array_len.rs:+1:15: +1:16
- _4 = Len(_1); // scope 0 at $DIR/combine_array_len.rs:+1:13: +1:17
+ _4 = const 2_usize; // scope 0 at $DIR/combine_array_len.rs:+1:13: +1:17
_5 = Lt(_3, _4); // scope 0 at $DIR/combine_array_len.rs:+1:13: +1:17
assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/combine_array_len.rs:+1:13: +1:17
StorageLive(_2);
StorageLive(_3);
_3 = const 0_usize;
- _4 = Len(_1);
+ _4 = const 2_usize;
_5 = Lt(_3, _4);
assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> bb1;
}
bb1: {
_2 = _1[_3]; // scope 0 at $DIR/combine_array_len.rs:+1:13: +1:17
StorageDead(_3); // scope 0 at $DIR/combine_array_len.rs:+1:17: +1:18
StorageLive(_6); // scope 1 at $DIR/combine_array_len.rs:+2:9: +2:10
StorageLive(_7); // scope 1 at $DIR/combine_array_len.rs:+2:15: +2:16
_7 = const 1_usize; // scope 1 at $DIR/combine_array_len.rs:+2:15: +2:16
- _8 = Len(_1); // scope 1 at $DIR/combine_array_len.rs:+2:13: +2:17
+ _8 = const 2_usize; // scope 1 at $DIR/combine_array_len.rs:+2:13: +2:17
_9 = Lt(_7, _8); // scope 1 at $DIR/combine_array_len.rs:+2:13: +2:17
assert(move _9, "index out of bounds: the length is {} but the index is {}", move _8, _7) -> bb2; // scope 1 at $DIR/combine_array_len.rs:+2:13: +2:17
_2 = _1[_3];
StorageDead(_3);
StorageLive(_6);
StorageLive(_7);
_7 = const 1_usize;
- _8 = Len(_1);
+ _8 = const 2_usize;
_9 = Lt(_7, _8);
assert(move _9, "index out of bounds: the length is {} but the index is {}", move _8, _7) -> bb2;
}
bb2: {
_6 = _1[_7]; // scope 1 at $DIR/combine_array_len.rs:+2:13: +2:17
StorageDead(_7); // scope 1 at $DIR/combine_array_len.rs:+2:17: +2:18
StorageLive(_10); // scope 2 at $DIR/combine_array_len.rs:+3:5: +3:8
StorageLive(_11); // scope 2 at $DIR/combine_array_len.rs:+3:5: +3:6
_11 = _2; // scope 2 at $DIR/combine_array_len.rs:+3:5: +3:6
StorageLive(_12); // scope 2 at $DIR/combine_array_len.rs:+3:7: +3:8
_12 = _2; // scope 2 at $DIR/combine_array_len.rs:+3:7: +3:8
_10 = Mul(move _11, move _12); // scope 2 at $DIR/combine_array_len.rs:+3:5: +3:8
StorageDead(_12); // scope 2 at $DIR/combine_array_len.rs:+3:7: +3:8
StorageDead(_11); // scope 2 at $DIR/combine_array_len.rs:+3:7: +3:8
StorageLive(_13); // scope 2 at $DIR/combine_array_len.rs:+3:11: +3:14
StorageLive(_14); // scope 2 at $DIR/combine_array_len.rs:+3:11: +3:12
_14 = _6; // scope 2 at $DIR/combine_array_len.rs:+3:11: +3:12
StorageLive(_15); // scope 2 at $DIR/combine_array_len.rs:+3:13: +3:14
_15 = _6; // scope 2 at $DIR/combine_array_len.rs:+3:13: +3:14
_13 = Mul(move _14, move _15); // scope 2 at $DIR/combine_array_len.rs:+3:11: +3:14
StorageDead(_15); // scope 2 at $DIR/combine_array_len.rs:+3:13: +3:14
StorageDead(_14); // scope 2 at $DIR/combine_array_len.rs:+3:13: +3:14
_0 = Add(move _10, move _13); // scope 2 at $DIR/combine_array_len.rs:+3:5: +3:14
StorageDead(_13); // scope 2 at $DIR/combine_array_len.rs:+3:13: +3:14
StorageDead(_10); // scope 2 at $DIR/combine_array_len.rs:+3:13: +3:14
StorageDead(_6); // scope 1 at $DIR/combine_array_len.rs:+4:1: +4:2
StorageDead(_2); // scope 0 at $DIR/combine_array_len.rs:+4:1: +4:2
return; // scope 0 at $DIR/combine_array_len.rs:+4:2: +4:2
_6 = _1[_7];
StorageDead(_7);
StorageLive(_10);
StorageLive(_11);
_11 = _2;
StorageLive(_12);
_12 = _2;
_10 = Mul(move _11, move _12);
StorageDead(_12);
StorageDead(_11);
StorageLive(_13);
StorageLive(_14);
_14 = _6;
StorageLive(_15);
_15 = _6;
_13 = Mul(move _14, move _15);
StorageDead(_15);
StorageDead(_14);
_0 = Add(move _10, move _13);
StorageDead(_13);
StorageDead(_10);
StorageDead(_6);
StorageDead(_2);
return;
}
}

View File

@ -2,73 +2,64 @@
+ // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:6:10: 6:15>::clone` after InstSimplify
fn <impl at $DIR/combine_clone_of_primitives.rs:6:10: 6:15>::clone(_1: &MyThing<T>) -> MyThing<T> {
debug self => _1; // in scope 0 at $DIR/combine_clone_of_primitives.rs:+0:10: +0:15
let mut _0: MyThing<T>; // return place in scope 0 at $DIR/combine_clone_of_primitives.rs:+0:10: +0:15
let mut _2: T; // in scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
let mut _3: &T; // in scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
let _4: &T; // in scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
let mut _5: u64; // in scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
let mut _6: &u64; // in scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
let _7: &u64; // in scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
let mut _8: [f32; 3]; // in scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
let mut _9: &[f32; 3]; // in scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
let _10: &[f32; 3]; // in scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
debug self => _1;
let mut _0: MyThing<T>;
let mut _2: T;
let mut _3: &T;
let _4: &T;
let mut _5: u64;
let mut _6: &u64;
let _7: &u64;
let mut _8: [f32; 3];
let mut _9: &[f32; 3];
let _10: &[f32; 3];
bb0: {
StorageLive(_2); // scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
StorageLive(_3); // scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
StorageLive(_4); // scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
_4 = &((*_1).0: T); // scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
- _3 = &(*_4); // scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
+ _3 = _4; // scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
_2 = <T as Clone>::clone(move _3) -> [return: bb1, unwind unreachable]; // scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
// mir::Constant
// + span: $DIR/combine_clone_of_primitives.rs:8:5: 8:9
// + literal: Const { ty: for<'a> fn(&'a T) -> T {<T as Clone>::clone}, val: Value(<ZST>) }
StorageLive(_2);
StorageLive(_3);
StorageLive(_4);
_4 = &((*_1).0: T);
- _3 = &(*_4);
+ _3 = _4;
_2 = <T as Clone>::clone(move _3) -> [return: bb1, unwind unreachable];
}
bb1: {
StorageDead(_3); // scope 0 at $DIR/combine_clone_of_primitives.rs:8:8: 8:9
StorageLive(_5); // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
StorageLive(_6); // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
StorageLive(_7); // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
_7 = &((*_1).1: u64); // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
- _6 = &(*_7); // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
- _5 = <u64 as Clone>::clone(move _6) -> [return: bb2, unwind unreachable]; // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
- // mir::Constant
- // + span: $DIR/combine_clone_of_primitives.rs:9:5: 9:11
- // + literal: Const { ty: for<'a> fn(&'a u64) -> u64 {<u64 as Clone>::clone}, val: Value(<ZST>) }
+ _6 = _7; // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
+ _5 = (*_6); // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
+ goto -> bb2; // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
StorageDead(_3);
StorageLive(_5);
StorageLive(_6);
StorageLive(_7);
_7 = &((*_1).1: u64);
- _6 = &(*_7);
- _5 = <u64 as Clone>::clone(move _6) -> [return: bb2, unwind unreachable];
+ _6 = _7;
+ _5 = (*_6);
+ goto -> bb2;
}
bb2: {
StorageDead(_6); // scope 0 at $DIR/combine_clone_of_primitives.rs:9:10: 9:11
StorageLive(_8); // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
StorageLive(_9); // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
StorageLive(_10); // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
_10 = &((*_1).2: [f32; 3]); // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
- _9 = &(*_10); // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
- _8 = <[f32; 3] as Clone>::clone(move _9) -> [return: bb3, unwind unreachable]; // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
- // mir::Constant
- // + span: $DIR/combine_clone_of_primitives.rs:10:5: 10:16
- // + literal: Const { ty: for<'a> fn(&'a [f32; 3]) -> [f32; 3] {<[f32; 3] as Clone>::clone}, val: Value(<ZST>) }
+ _9 = _10; // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
+ _8 = (*_9); // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
+ goto -> bb3; // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
StorageDead(_6);
StorageLive(_8);
StorageLive(_9);
StorageLive(_10);
_10 = &((*_1).2: [f32; 3]);
- _9 = &(*_10);
- _8 = <[f32; 3] as Clone>::clone(move _9) -> [return: bb3, unwind unreachable];
+ _9 = _10;
+ _8 = (*_9);
+ goto -> bb3;
}
bb3: {
StorageDead(_9); // scope 0 at $DIR/combine_clone_of_primitives.rs:10:15: 10:16
_0 = MyThing::<T> { v: move _2, i: move _5, a: move _8 }; // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:10: +0:15
StorageDead(_8); // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:14: +0:15
StorageDead(_5); // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:14: +0:15
StorageDead(_2); // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:14: +0:15
StorageDead(_10); // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:14: +0:15
StorageDead(_7); // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:14: +0:15
StorageDead(_4); // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:14: +0:15
return; // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:15: +0:15
StorageDead(_9);
_0 = MyThing::<T> { v: move _2, i: move _5, a: move _8 };
StorageDead(_8);
StorageDead(_5);
StorageDead(_2);
StorageDead(_10);
StorageDead(_7);
StorageDead(_4);
return;
}
}

View File

@ -2,81 +2,72 @@
+ // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:6:10: 6:15>::clone` after InstSimplify
fn <impl at $DIR/combine_clone_of_primitives.rs:6:10: 6:15>::clone(_1: &MyThing<T>) -> MyThing<T> {
debug self => _1; // in scope 0 at $DIR/combine_clone_of_primitives.rs:+0:10: +0:15
let mut _0: MyThing<T>; // return place in scope 0 at $DIR/combine_clone_of_primitives.rs:+0:10: +0:15
let mut _2: T; // in scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
let mut _3: &T; // in scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
let _4: &T; // in scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
let mut _5: u64; // in scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
let mut _6: &u64; // in scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
let _7: &u64; // in scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
let mut _8: [f32; 3]; // in scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
let mut _9: &[f32; 3]; // in scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
let _10: &[f32; 3]; // in scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
debug self => _1;
let mut _0: MyThing<T>;
let mut _2: T;
let mut _3: &T;
let _4: &T;
let mut _5: u64;
let mut _6: &u64;
let _7: &u64;
let mut _8: [f32; 3];
let mut _9: &[f32; 3];
let _10: &[f32; 3];
bb0: {
StorageLive(_2); // scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
StorageLive(_3); // scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
StorageLive(_4); // scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
_4 = &((*_1).0: T); // scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
- _3 = &(*_4); // scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
+ _3 = _4; // scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
_2 = <T as Clone>::clone(move _3) -> bb1; // scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
// mir::Constant
// + span: $DIR/combine_clone_of_primitives.rs:8:5: 8:9
// + literal: Const { ty: for<'a> fn(&'a T) -> T {<T as Clone>::clone}, val: Value(<ZST>) }
StorageLive(_2);
StorageLive(_3);
StorageLive(_4);
_4 = &((*_1).0: T);
- _3 = &(*_4);
+ _3 = _4;
_2 = <T as Clone>::clone(move _3) -> bb1;
}
bb1: {
StorageDead(_3); // scope 0 at $DIR/combine_clone_of_primitives.rs:8:8: 8:9
StorageLive(_5); // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
StorageLive(_6); // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
StorageLive(_7); // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
_7 = &((*_1).1: u64); // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
- _6 = &(*_7); // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
- _5 = <u64 as Clone>::clone(move _6) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
- // mir::Constant
- // + span: $DIR/combine_clone_of_primitives.rs:9:5: 9:11
- // + literal: Const { ty: for<'a> fn(&'a u64) -> u64 {<u64 as Clone>::clone}, val: Value(<ZST>) }
+ _6 = _7; // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
+ _5 = (*_6); // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
+ goto -> bb2; // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
StorageDead(_3);
StorageLive(_5);
StorageLive(_6);
StorageLive(_7);
_7 = &((*_1).1: u64);
- _6 = &(*_7);
- _5 = <u64 as Clone>::clone(move _6) -> [return: bb2, unwind: bb4];
+ _6 = _7;
+ _5 = (*_6);
+ goto -> bb2;
}
bb2: {
StorageDead(_6); // scope 0 at $DIR/combine_clone_of_primitives.rs:9:10: 9:11
StorageLive(_8); // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
StorageLive(_9); // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
StorageLive(_10); // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
_10 = &((*_1).2: [f32; 3]); // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
- _9 = &(*_10); // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
- _8 = <[f32; 3] as Clone>::clone(move _9) -> [return: bb3, unwind: bb4]; // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
- // mir::Constant
- // + span: $DIR/combine_clone_of_primitives.rs:10:5: 10:16
- // + literal: Const { ty: for<'a> fn(&'a [f32; 3]) -> [f32; 3] {<[f32; 3] as Clone>::clone}, val: Value(<ZST>) }
+ _9 = _10; // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
+ _8 = (*_9); // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
+ goto -> bb3; // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
StorageDead(_6);
StorageLive(_8);
StorageLive(_9);
StorageLive(_10);
_10 = &((*_1).2: [f32; 3]);
- _9 = &(*_10);
- _8 = <[f32; 3] as Clone>::clone(move _9) -> [return: bb3, unwind: bb4];
+ _9 = _10;
+ _8 = (*_9);
+ goto -> bb3;
}
bb3: {
StorageDead(_9); // scope 0 at $DIR/combine_clone_of_primitives.rs:10:15: 10:16
_0 = MyThing::<T> { v: move _2, i: move _5, a: move _8 }; // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:10: +0:15
StorageDead(_8); // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:14: +0:15
StorageDead(_5); // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:14: +0:15
StorageDead(_2); // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:14: +0:15
StorageDead(_10); // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:14: +0:15
StorageDead(_7); // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:14: +0:15
StorageDead(_4); // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:14: +0:15
return; // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:15: +0:15
StorageDead(_9);
_0 = MyThing::<T> { v: move _2, i: move _5, a: move _8 };
StorageDead(_8);
StorageDead(_5);
StorageDead(_2);
StorageDead(_10);
StorageDead(_7);
StorageDead(_4);
return;
}
bb4 (cleanup): {
drop(_2) -> [return: bb5, unwind terminate]; // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:14: +0:15
drop(_2) -> [return: bb5, unwind terminate];
}
bb5 (cleanup): {
resume; // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:10: +0:15
resume;
}
}

View File

@ -2,31 +2,31 @@
+ // MIR for `adt_transmutes` after InstSimplify
fn adt_transmutes() -> () {
let mut _0: (); // return place in scope 0 at $DIR/combine_transmutes.rs:+0:32: +0:32
let _1: u8; // in scope 0 at $DIR/combine_transmutes.rs:+1:9: +1:11
let mut _2: std::option::Option<std::num::NonZeroU8>; // in scope 0 at $DIR/combine_transmutes.rs:+1:28: +1:58
let mut _4: std::num::Wrapping<i16>; // in scope 0 at $DIR/combine_transmutes.rs:+2:29: +2:54
let mut _6: std::num::Wrapping<i16>; // in scope 0 at $DIR/combine_transmutes.rs:+3:29: +3:54
let mut _8: Union32; // in scope 0 at $DIR/combine_transmutes.rs:+4:29: +4:47
let mut _10: Union32; // in scope 0 at $DIR/combine_transmutes.rs:+5:29: +5:47
let mut _12: std::mem::MaybeUninit<std::string::String>; // in scope 0 at $DIR/combine_transmutes.rs:+6:46: +6:77
let mut _0: ();
let _1: u8;
let mut _2: std::option::Option<std::num::NonZeroU8>;
let mut _4: std::num::Wrapping<i16>;
let mut _6: std::num::Wrapping<i16>;
let mut _8: Union32;
let mut _10: Union32;
let mut _12: std::mem::MaybeUninit<std::string::String>;
scope 1 {
debug _a => _1; // in scope 1 at $DIR/combine_transmutes.rs:+1:9: +1:11
let _3: i16; // in scope 1 at $DIR/combine_transmutes.rs:+2:9: +2:11
debug _a => _1;
let _3: i16;
scope 2 {
debug _a => _3; // in scope 2 at $DIR/combine_transmutes.rs:+2:9: +2:11
let _5: u16; // in scope 2 at $DIR/combine_transmutes.rs:+3:9: +3:11
debug _a => _3;
let _5: u16;
scope 3 {
debug _a => _5; // in scope 3 at $DIR/combine_transmutes.rs:+3:9: +3:11
let _7: u32; // in scope 3 at $DIR/combine_transmutes.rs:+4:9: +4:11
debug _a => _5;
let _7: u32;
scope 4 {
debug _a => _7; // in scope 4 at $DIR/combine_transmutes.rs:+4:9: +4:11
let _9: i32; // in scope 4 at $DIR/combine_transmutes.rs:+5:9: +5:11
debug _a => _7;
let _9: i32;
scope 5 {
debug _a => _9; // in scope 5 at $DIR/combine_transmutes.rs:+5:9: +5:11
let _11: std::mem::ManuallyDrop<std::string::String>; // in scope 5 at $DIR/combine_transmutes.rs:+6:9: +6:11
debug _a => _9;
let _11: std::mem::ManuallyDrop<std::string::String>;
scope 6 {
debug _a => _11; // in scope 6 at $DIR/combine_transmutes.rs:+6:9: +6:11
debug _a => _11;
}
}
}
@ -35,56 +35,49 @@
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/combine_transmutes.rs:+1:9: +1:11
StorageLive(_2); // scope 0 at $DIR/combine_transmutes.rs:+1:28: +1:58
_2 = Option::<NonZeroU8>::Some(const _); // scope 0 at $DIR/combine_transmutes.rs:+1:28: +1:58
// mir::Constant
// + span: $DIR/combine_transmutes.rs:35:33: 35:57
// + literal: Const { ty: NonZeroU8, val: Unevaluated(NonZeroU8::MAX, [], None) }
_1 = move _2 as u8 (Transmute); // scope 0 at $DIR/combine_transmutes.rs:+1:18: +1:59
StorageDead(_2); // scope 0 at $DIR/combine_transmutes.rs:+1:58: +1:59
StorageLive(_3); // scope 1 at $DIR/combine_transmutes.rs:+2:9: +2:11
StorageLive(_4); // scope 1 at $DIR/combine_transmutes.rs:+2:29: +2:54
_4 = Wrapping::<i16>(const 0_i16); // scope 1 at $DIR/combine_transmutes.rs:+2:29: +2:54
- _3 = move _4 as i16 (Transmute); // scope 1 at $DIR/combine_transmutes.rs:+2:19: +2:55
+ _3 = move (_4.0: i16); // scope 1 at $DIR/combine_transmutes.rs:+2:19: +2:55
StorageDead(_4); // scope 1 at $DIR/combine_transmutes.rs:+2:54: +2:55
StorageLive(_5); // scope 2 at $DIR/combine_transmutes.rs:+3:9: +3:11
StorageLive(_6); // scope 2 at $DIR/combine_transmutes.rs:+3:29: +3:54
_6 = Wrapping::<i16>(const 0_i16); // scope 2 at $DIR/combine_transmutes.rs:+3:29: +3:54
_5 = move _6 as u16 (Transmute); // scope 2 at $DIR/combine_transmutes.rs:+3:19: +3:55
StorageDead(_6); // scope 2 at $DIR/combine_transmutes.rs:+3:54: +3:55
StorageLive(_7); // scope 3 at $DIR/combine_transmutes.rs:+4:9: +4:11
StorageLive(_8); // scope 3 at $DIR/combine_transmutes.rs:+4:29: +4:47
_8 = Union32 { u32: const 0_i32 }; // scope 3 at $DIR/combine_transmutes.rs:+4:29: +4:47
_7 = move _8 as u32 (Transmute); // scope 3 at $DIR/combine_transmutes.rs:+4:19: +4:48
StorageDead(_8); // scope 3 at $DIR/combine_transmutes.rs:+4:47: +4:48
StorageLive(_9); // scope 4 at $DIR/combine_transmutes.rs:+5:9: +5:11
StorageLive(_10); // scope 4 at $DIR/combine_transmutes.rs:+5:29: +5:47
_10 = Union32 { u32: const 0_u32 }; // scope 4 at $DIR/combine_transmutes.rs:+5:29: +5:47
_9 = move _10 as i32 (Transmute); // scope 4 at $DIR/combine_transmutes.rs:+5:19: +5:48
StorageDead(_10); // scope 4 at $DIR/combine_transmutes.rs:+5:47: +5:48
StorageLive(_11); // scope 5 at $DIR/combine_transmutes.rs:+6:9: +6:11
StorageLive(_12); // scope 5 at $DIR/combine_transmutes.rs:+6:46: +6:77
_12 = MaybeUninit::<String>::uninit() -> [return: bb1, unwind unreachable]; // scope 5 at $DIR/combine_transmutes.rs:+6:46: +6:77
// mir::Constant
// + span: $DIR/combine_transmutes.rs:40:46: 40:75
// + user_ty: UserType(11)
// + literal: Const { ty: fn() -> MaybeUninit<String> {MaybeUninit::<String>::uninit}, val: Value(<ZST>) }
StorageLive(_1);
StorageLive(_2);
_2 = Option::<NonZeroU8>::Some(const _);
_1 = move _2 as u8 (Transmute);
StorageDead(_2);
StorageLive(_3);
StorageLive(_4);
_4 = Wrapping::<i16>(const 0_i16);
- _3 = move _4 as i16 (Transmute);
+ _3 = move (_4.0: i16);
StorageDead(_4);
StorageLive(_5);
StorageLive(_6);
_6 = Wrapping::<i16>(const 0_i16);
_5 = move _6 as u16 (Transmute);
StorageDead(_6);
StorageLive(_7);
StorageLive(_8);
_8 = Union32 { u32: const 0_i32 };
_7 = move _8 as u32 (Transmute);
StorageDead(_8);
StorageLive(_9);
StorageLive(_10);
_10 = Union32 { u32: const 0_u32 };
_9 = move _10 as i32 (Transmute);
StorageDead(_10);
StorageLive(_11);
StorageLive(_12);
_12 = MaybeUninit::<String>::uninit() -> [return: bb1, unwind unreachable];
}
bb1: {
- _11 = move _12 as std::mem::ManuallyDrop<std::string::String> (Transmute); // scope 5 at $DIR/combine_transmutes.rs:+6:36: +6:78
+ _11 = move (_12.1: std::mem::ManuallyDrop<std::string::String>); // scope 5 at $DIR/combine_transmutes.rs:+6:36: +6:78
StorageDead(_12); // scope 5 at $DIR/combine_transmutes.rs:+6:77: +6:78
_0 = const (); // scope 0 at $DIR/combine_transmutes.rs:+0:32: +7:2
StorageDead(_11); // scope 5 at $DIR/combine_transmutes.rs:+7:1: +7:2
StorageDead(_9); // scope 4 at $DIR/combine_transmutes.rs:+7:1: +7:2
StorageDead(_7); // scope 3 at $DIR/combine_transmutes.rs:+7:1: +7:2
StorageDead(_5); // scope 2 at $DIR/combine_transmutes.rs:+7:1: +7:2
StorageDead(_3); // scope 1 at $DIR/combine_transmutes.rs:+7:1: +7:2
StorageDead(_1); // scope 0 at $DIR/combine_transmutes.rs:+7:1: +7:2
return; // scope 0 at $DIR/combine_transmutes.rs:+7:2: +7:2
- _11 = move _12 as std::mem::ManuallyDrop<std::string::String> (Transmute);
+ _11 = move (_12.1: std::mem::ManuallyDrop<std::string::String>);
StorageDead(_12);
_0 = const ();
StorageDead(_11);
StorageDead(_9);
StorageDead(_7);
StorageDead(_5);
StorageDead(_3);
StorageDead(_1);
return;
}
}

View File

@ -2,42 +2,38 @@
+ // MIR for `identity_transmutes` after InstSimplify
fn identity_transmutes() -> () {
let mut _0: (); // return place in scope 0 at $DIR/combine_transmutes.rs:+0:37: +0:37
let _1: i32; // in scope 0 at $DIR/combine_transmutes.rs:+2:9: +2:11
let mut _3: std::vec::Vec<i32>; // in scope 0 at $DIR/combine_transmutes.rs:+3:46: +3:56
let mut _0: ();
let _1: i32;
let mut _3: std::vec::Vec<i32>;
scope 1 {
debug _a => _1; // in scope 1 at $DIR/combine_transmutes.rs:+2:9: +2:11
let _2: std::vec::Vec<i32>; // in scope 1 at $DIR/combine_transmutes.rs:+3:9: +3:11
debug _a => _1;
let _2: std::vec::Vec<i32>;
scope 2 {
debug _a => _2; // in scope 2 at $DIR/combine_transmutes.rs:+3:9: +3:11
debug _a => _2;
}
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/combine_transmutes.rs:+2:9: +2:11
- _1 = const 1_i32 as i32 (Transmute); // scope 0 at $DIR/combine_transmutes.rs:+2:14: +2:38
+ _1 = const 1_i32; // scope 0 at $DIR/combine_transmutes.rs:+2:14: +2:38
StorageLive(_2); // scope 1 at $DIR/combine_transmutes.rs:+3:9: +3:11
StorageLive(_3); // scope 1 at $DIR/combine_transmutes.rs:+3:46: +3:56
_3 = Vec::<i32>::new() -> [return: bb1, unwind unreachable]; // scope 1 at $DIR/combine_transmutes.rs:+3:46: +3:56
// mir::Constant
// + span: $DIR/combine_transmutes.rs:15:46: 15:54
// + user_ty: UserType(0)
// + literal: Const { ty: fn() -> Vec<i32> {Vec::<i32>::new}, val: Value(<ZST>) }
StorageLive(_1);
- _1 = const 1_i32 as i32 (Transmute);
+ _1 = const 1_i32;
StorageLive(_2);
StorageLive(_3);
_3 = Vec::<i32>::new() -> [return: bb1, unwind unreachable];
}
bb1: {
- _2 = move _3 as std::vec::Vec<i32> (Transmute); // scope 1 at $DIR/combine_transmutes.rs:+3:14: +3:57
+ _2 = move _3; // scope 1 at $DIR/combine_transmutes.rs:+3:14: +3:57
StorageDead(_3); // scope 1 at $DIR/combine_transmutes.rs:+3:56: +3:57
_0 = const (); // scope 0 at $DIR/combine_transmutes.rs:+0:37: +4:2
drop(_2) -> [return: bb2, unwind unreachable]; // scope 1 at $DIR/combine_transmutes.rs:+4:1: +4:2
- _2 = move _3 as std::vec::Vec<i32> (Transmute);
+ _2 = move _3;
StorageDead(_3);
_0 = const ();
drop(_2) -> [return: bb2, unwind unreachable];
}
bb2: {
StorageDead(_2); // scope 1 at $DIR/combine_transmutes.rs:+4:1: +4:2
StorageDead(_1); // scope 0 at $DIR/combine_transmutes.rs:+4:1: +4:2
return; // scope 0 at $DIR/combine_transmutes.rs:+4:2: +4:2
StorageDead(_2);
StorageDead(_1);
return;
}
}

View File

@ -2,23 +2,23 @@
+ // MIR for `integer_transmutes` after InstSimplify
fn integer_transmutes() -> () {
let mut _0: (); // return place in scope 0 at $DIR/combine_transmutes.rs:+0:36: +0:36
let mut _1: u32; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
let mut _2: i64; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
let mut _3: i64; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
let mut _4: u32; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
let mut _5: usize; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
let mut _0: ();
let mut _1: u32;
let mut _2: i64;
let mut _3: i64;
let mut _4: u32;
let mut _5: usize;
bb0: {
- _1 = const 1_i32 as u32 (Transmute); // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+ _1 = const 1_i32 as u32 (IntToInt); // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
_2 = const 1_i32 as i64 (Transmute); // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
- _3 = const 1_u64 as i64 (Transmute); // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+ _3 = const 1_u64 as i64 (IntToInt); // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
_4 = const 1_u64 as u32 (Transmute); // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
- _5 = const 1_isize as usize (Transmute); // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+ _5 = const 1_isize as usize (IntToInt); // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
return; // scope 0 at $DIR/combine_transmutes.rs:+8:13: +8:21
- _1 = const 1_i32 as u32 (Transmute);
+ _1 = const 1_i32 as u32 (IntToInt);
_2 = const 1_i32 as i64 (Transmute);
- _3 = const 1_u64 as i64 (Transmute);
+ _3 = const 1_u64 as i64 (IntToInt);
_4 = const 1_u64 as u32 (Transmute);
- _5 = const 1_isize as usize (Transmute);
+ _5 = const 1_isize as usize (IntToInt);
return;
}
}

View File

@ -1,22 +1,19 @@
// MIR for `main` after ConstProp
fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/const_allocation.rs:+0:11: +0:11
let _1: &[(std::option::Option<i32>, &[&str])]; // in scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
let mut _2: &&[(std::option::Option<i32>, &[&str])]; // in scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
let mut _0: ();
let _1: &[(std::option::Option<i32>, &[&str])];
let mut _2: &&[(std::option::Option<i32>, &[&str])];
bb0: {
StorageLive(_1); // scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
StorageLive(_2); // scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
_2 = const {alloc1: &&[(Option<i32>, &[&str])]}; // scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
// mir::Constant
// + span: $DIR/const_allocation.rs:9:5: 9:8
// + literal: Const { ty: &&[(Option<i32>, &[&str])], val: Value(Scalar(alloc1)) }
_1 = (*_2); // scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
StorageDead(_2); // scope 0 at $DIR/const_allocation.rs:+1:8: +1:9
StorageDead(_1); // scope 0 at $DIR/const_allocation.rs:+1:8: +1:9
_0 = const (); // scope 0 at $DIR/const_allocation.rs:+0:11: +2:2
return; // scope 0 at $DIR/const_allocation.rs:+2:2: +2:2
StorageLive(_1);
StorageLive(_2);
_2 = const {alloc1: &&[(Option<i32>, &[&str])]};
_1 = (*_2);
StorageDead(_2);
StorageDead(_1);
_0 = const ();
return;
}
}

View File

@ -1,22 +1,19 @@
// MIR for `main` after ConstProp
fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/const_allocation.rs:+0:11: +0:11
let _1: &[(std::option::Option<i32>, &[&str])]; // in scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
let mut _2: &&[(std::option::Option<i32>, &[&str])]; // in scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
let mut _0: ();
let _1: &[(std::option::Option<i32>, &[&str])];
let mut _2: &&[(std::option::Option<i32>, &[&str])];
bb0: {
StorageLive(_1); // scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
StorageLive(_2); // scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
_2 = const {alloc1: &&[(Option<i32>, &[&str])]}; // scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
// mir::Constant
// + span: $DIR/const_allocation.rs:9:5: 9:8
// + literal: Const { ty: &&[(Option<i32>, &[&str])], val: Value(Scalar(alloc1)) }
_1 = (*_2); // scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
StorageDead(_2); // scope 0 at $DIR/const_allocation.rs:+1:8: +1:9
StorageDead(_1); // scope 0 at $DIR/const_allocation.rs:+1:8: +1:9
_0 = const (); // scope 0 at $DIR/const_allocation.rs:+0:11: +2:2
return; // scope 0 at $DIR/const_allocation.rs:+2:2: +2:2
StorageLive(_1);
StorageLive(_2);
_2 = const {alloc1: &&[(Option<i32>, &[&str])]};
_1 = (*_2);
StorageDead(_2);
StorageDead(_1);
_0 = const ();
return;
}
}

View File

@ -1,22 +1,19 @@
// MIR for `main` after ConstProp
fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/const_allocation2.rs:+0:11: +0:11
let _1: &[(std::option::Option<i32>, &[&u8])]; // in scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
let mut _2: &&[(std::option::Option<i32>, &[&u8])]; // in scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
let mut _0: ();
let _1: &[(std::option::Option<i32>, &[&u8])];
let mut _2: &&[(std::option::Option<i32>, &[&u8])];
bb0: {
StorageLive(_1); // scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
StorageLive(_2); // scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
_2 = const {alloc1: &&[(Option<i32>, &[&u8])]}; // scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
// mir::Constant
// + span: $DIR/const_allocation2.rs:6:5: 6:8
// + literal: Const { ty: &&[(Option<i32>, &[&u8])], val: Value(Scalar(alloc1)) }
_1 = (*_2); // scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
StorageDead(_2); // scope 0 at $DIR/const_allocation2.rs:+1:8: +1:9
StorageDead(_1); // scope 0 at $DIR/const_allocation2.rs:+1:8: +1:9
_0 = const (); // scope 0 at $DIR/const_allocation2.rs:+0:11: +2:2
return; // scope 0 at $DIR/const_allocation2.rs:+2:2: +2:2
StorageLive(_1);
StorageLive(_2);
_2 = const {alloc1: &&[(Option<i32>, &[&u8])]};
_1 = (*_2);
StorageDead(_2);
StorageDead(_1);
_0 = const ();
return;
}
}

View File

@ -1,22 +1,19 @@
// MIR for `main` after ConstProp
fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/const_allocation2.rs:+0:11: +0:11
let _1: &[(std::option::Option<i32>, &[&u8])]; // in scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
let mut _2: &&[(std::option::Option<i32>, &[&u8])]; // in scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
let mut _0: ();
let _1: &[(std::option::Option<i32>, &[&u8])];
let mut _2: &&[(std::option::Option<i32>, &[&u8])];
bb0: {
StorageLive(_1); // scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
StorageLive(_2); // scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
_2 = const {alloc1: &&[(Option<i32>, &[&u8])]}; // scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
// mir::Constant
// + span: $DIR/const_allocation2.rs:6:5: 6:8
// + literal: Const { ty: &&[(Option<i32>, &[&u8])], val: Value(Scalar(alloc1)) }
_1 = (*_2); // scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
StorageDead(_2); // scope 0 at $DIR/const_allocation2.rs:+1:8: +1:9
StorageDead(_1); // scope 0 at $DIR/const_allocation2.rs:+1:8: +1:9
_0 = const (); // scope 0 at $DIR/const_allocation2.rs:+0:11: +2:2
return; // scope 0 at $DIR/const_allocation2.rs:+2:2: +2:2
StorageLive(_1);
StorageLive(_2);
_2 = const {alloc1: &&[(Option<i32>, &[&u8])]};
_1 = (*_2);
StorageDead(_2);
StorageDead(_1);
_0 = const ();
return;
}
}

View File

@ -1,22 +1,19 @@
// MIR for `main` after ConstProp
fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/const_allocation3.rs:+0:11: +0:11
let _1: &Packed; // in scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
let mut _2: &&Packed; // in scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
let mut _0: ();
let _1: &Packed;
let mut _2: &&Packed;
bb0: {
StorageLive(_1); // scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
StorageLive(_2); // scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
_2 = const {alloc1: &&Packed}; // scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
// mir::Constant
// + span: $DIR/const_allocation3.rs:6:5: 6:8
// + literal: Const { ty: &&Packed, val: Value(Scalar(alloc1)) }
_1 = (*_2); // scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
StorageDead(_2); // scope 0 at $DIR/const_allocation3.rs:+1:8: +1:9
StorageDead(_1); // scope 0 at $DIR/const_allocation3.rs:+1:8: +1:9
_0 = const (); // scope 0 at $DIR/const_allocation3.rs:+0:11: +2:2
return; // scope 0 at $DIR/const_allocation3.rs:+2:2: +2:2
StorageLive(_1);
StorageLive(_2);
_2 = const {alloc1: &&Packed};
_1 = (*_2);
StorageDead(_2);
StorageDead(_1);
_0 = const ();
return;
}
}

View File

@ -1,22 +1,19 @@
// MIR for `main` after ConstProp
fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/const_allocation3.rs:+0:11: +0:11
let _1: &Packed; // in scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
let mut _2: &&Packed; // in scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
let mut _0: ();
let _1: &Packed;
let mut _2: &&Packed;
bb0: {
StorageLive(_1); // scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
StorageLive(_2); // scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
_2 = const {alloc1: &&Packed}; // scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
// mir::Constant
// + span: $DIR/const_allocation3.rs:6:5: 6:8
// + literal: Const { ty: &&Packed, val: Value(Scalar(alloc1)) }
_1 = (*_2); // scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
StorageDead(_2); // scope 0 at $DIR/const_allocation3.rs:+1:8: +1:9
StorageDead(_1); // scope 0 at $DIR/const_allocation3.rs:+1:8: +1:9
_0 = const (); // scope 0 at $DIR/const_allocation3.rs:+0:11: +2:2
return; // scope 0 at $DIR/const_allocation3.rs:+2:2: +2:2
StorageLive(_1);
StorageLive(_2);
_2 = const {alloc1: &&Packed};
_1 = (*_2);
StorageDead(_2);
StorageDead(_1);
_0 = const ();
return;
}
}

View File

@ -2,49 +2,49 @@
+ // MIR for `main` after ConstDebugInfo
fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/const_debuginfo.rs:+0:11: +0:11
let _1: u8; // in scope 0 at $DIR/const_debuginfo.rs:+1:9: +1:10
let mut _5: u8; // in scope 0 at $DIR/const_debuginfo.rs:+4:15: +4:20
let mut _6: u8; // in scope 0 at $DIR/const_debuginfo.rs:+4:15: +4:16
let mut _7: u8; // in scope 0 at $DIR/const_debuginfo.rs:+4:19: +4:20
let mut _8: u8; // in scope 0 at $DIR/const_debuginfo.rs:+4:23: +4:24
let mut _12: u32; // in scope 0 at $DIR/const_debuginfo.rs:+13:13: +13:16
let mut _13: u32; // in scope 0 at $DIR/const_debuginfo.rs:+13:19: +13:22
let mut _0: ();
let _1: u8;
let mut _5: u8;
let mut _6: u8;
let mut _7: u8;
let mut _8: u8;
let mut _12: u32;
let mut _13: u32;
scope 1 {
- debug x => _1; // in scope 1 at $DIR/const_debuginfo.rs:+1:9: +1:10
+ debug x => const 1_u8; // in scope 1 at $DIR/const_debuginfo.rs:+1:9: +1:10
let _2: u8; // in scope 1 at $DIR/const_debuginfo.rs:+2:9: +2:10
- debug x => _1;
+ debug x => const 1_u8;
let _2: u8;
scope 2 {
- debug y => _2; // in scope 2 at $DIR/const_debuginfo.rs:+2:9: +2:10
+ debug y => const 2_u8; // in scope 2 at $DIR/const_debuginfo.rs:+2:9: +2:10
let _3: u8; // in scope 2 at $DIR/const_debuginfo.rs:+3:9: +3:10
- debug y => _2;
+ debug y => const 2_u8;
let _3: u8;
scope 3 {
- debug z => _3; // in scope 3 at $DIR/const_debuginfo.rs:+3:9: +3:10
+ debug z => const 3_u8; // in scope 3 at $DIR/const_debuginfo.rs:+3:9: +3:10
let _4: u8; // in scope 3 at $DIR/const_debuginfo.rs:+4:9: +4:12
- debug z => _3;
+ debug z => const 3_u8;
let _4: u8;
scope 4 {
- debug sum => _4; // in scope 4 at $DIR/const_debuginfo.rs:+4:9: +4:12
+ debug sum => const 6_u8; // in scope 4 at $DIR/const_debuginfo.rs:+4:9: +4:12
let _9: &str; // in scope 4 at $DIR/const_debuginfo.rs:+6:9: +6:10
- debug sum => _4;
+ debug sum => const 6_u8;
let _9: &str;
scope 5 {
- debug s => _9; // in scope 5 at $DIR/const_debuginfo.rs:+6:9: +6:10
+ debug s => const "hello, world!"; // in scope 5 at $DIR/const_debuginfo.rs:+6:9: +6:10
let _14: bool; // in scope 5 at $DIR/const_debuginfo.rs:+8:9: +8:10
let _15: bool; // in scope 5 at $DIR/const_debuginfo.rs:+8:9: +8:10
let _16: u32; // in scope 5 at $DIR/const_debuginfo.rs:+8:9: +8:10
- debug s => _9;
+ debug s => const "hello, world!";
let _14: bool;
let _15: bool;
let _16: u32;
scope 6 {
debug f => (bool, bool, u32){ .0 => _14, .1 => _15, .2 => _16, }; // in scope 6 at $DIR/const_debuginfo.rs:+8:9: +8:10
let _10: std::option::Option<u16>; // in scope 6 at $DIR/const_debuginfo.rs:+10:9: +10:10
debug f => (bool, bool, u32){ .0 => _14, .1 => _15, .2 => _16, };
let _10: std::option::Option<u16>;
scope 7 {
debug o => _10; // in scope 7 at $DIR/const_debuginfo.rs:+10:9: +10:10
let _17: u32; // in scope 7 at $DIR/const_debuginfo.rs:+12:9: +12:10
let _18: u32; // in scope 7 at $DIR/const_debuginfo.rs:+12:9: +12:10
debug o => _10;
let _17: u32;
let _18: u32;
scope 8 {
debug p => Point{ .0 => _17, .1 => _18, }; // in scope 8 at $DIR/const_debuginfo.rs:+12:9: +12:10
let _11: u32; // in scope 8 at $DIR/const_debuginfo.rs:+13:9: +13:10
debug p => Point{ .0 => _17, .1 => _18, };
let _11: u32;
scope 9 {
- debug a => _11; // in scope 9 at $DIR/const_debuginfo.rs:+13:9: +13:10
+ debug a => const 64_u32; // in scope 9 at $DIR/const_debuginfo.rs:+13:9: +13:10
- debug a => _11;
+ debug a => const 64_u32;
}
}
}
@ -56,39 +56,36 @@
}
bb0: {
_1 = const 1_u8; // scope 0 at $DIR/const_debuginfo.rs:+1:13: +1:16
_2 = const 2_u8; // scope 1 at $DIR/const_debuginfo.rs:+2:13: +2:16
_3 = const 3_u8; // scope 2 at $DIR/const_debuginfo.rs:+3:13: +3:16
StorageLive(_4); // scope 3 at $DIR/const_debuginfo.rs:+4:9: +4:12
StorageLive(_5); // scope 3 at $DIR/const_debuginfo.rs:+4:15: +4:20
_5 = const 3_u8; // scope 3 at $DIR/const_debuginfo.rs:+4:15: +4:20
_4 = const 6_u8; // scope 3 at $DIR/const_debuginfo.rs:+4:15: +4:24
StorageDead(_5); // scope 3 at $DIR/const_debuginfo.rs:+4:23: +4:24
StorageLive(_9); // scope 4 at $DIR/const_debuginfo.rs:+6:9: +6:10
_9 = const "hello, world!"; // scope 4 at $DIR/const_debuginfo.rs:+6:13: +6:28
// mir::Constant
// + span: $DIR/const_debuginfo.rs:14:13: 14:28
// + literal: Const { ty: &str, val: Value(Slice(..)) }
StorageLive(_14); // scope 5 at $DIR/const_debuginfo.rs:+8:9: +8:10
StorageLive(_15); // scope 5 at $DIR/const_debuginfo.rs:+8:9: +8:10
StorageLive(_16); // scope 5 at $DIR/const_debuginfo.rs:+8:9: +8:10
_14 = const true; // scope 5 at $DIR/const_debuginfo.rs:+8:13: +8:34
_15 = const false; // scope 5 at $DIR/const_debuginfo.rs:+8:13: +8:34
_16 = const 123_u32; // scope 5 at $DIR/const_debuginfo.rs:+8:13: +8:34
StorageLive(_10); // scope 6 at $DIR/const_debuginfo.rs:+10:9: +10:10
_10 = Option::<u16>::Some(const 99_u16); // scope 6 at $DIR/const_debuginfo.rs:+10:13: +10:24
_17 = const 32_u32; // scope 7 at $DIR/const_debuginfo.rs:+12:13: +12:35
_18 = const 32_u32; // scope 7 at $DIR/const_debuginfo.rs:+12:13: +12:35
StorageLive(_11); // scope 8 at $DIR/const_debuginfo.rs:+13:9: +13:10
_11 = const 64_u32; // scope 8 at $DIR/const_debuginfo.rs:+13:13: +13:22
StorageDead(_11); // scope 8 at $DIR/const_debuginfo.rs:+14:1: +14:2
StorageDead(_10); // scope 6 at $DIR/const_debuginfo.rs:+14:1: +14:2
StorageDead(_14); // scope 5 at $DIR/const_debuginfo.rs:+14:1: +14:2
StorageDead(_15); // scope 5 at $DIR/const_debuginfo.rs:+14:1: +14:2
StorageDead(_16); // scope 5 at $DIR/const_debuginfo.rs:+14:1: +14:2
StorageDead(_9); // scope 4 at $DIR/const_debuginfo.rs:+14:1: +14:2
StorageDead(_4); // scope 3 at $DIR/const_debuginfo.rs:+14:1: +14:2
return; // scope 0 at $DIR/const_debuginfo.rs:+14:2: +14:2
_1 = const 1_u8;
_2 = const 2_u8;
_3 = const 3_u8;
StorageLive(_4);
StorageLive(_5);
_5 = const 3_u8;
_4 = const 6_u8;
StorageDead(_5);
StorageLive(_9);
_9 = const "hello, world!";
StorageLive(_14);
StorageLive(_15);
StorageLive(_16);
_14 = const true;
_15 = const false;
_16 = const 123_u32;
StorageLive(_10);
_10 = Option::<u16>::Some(const 99_u16);
_17 = const 32_u32;
_18 = const 32_u32;
StorageLive(_11);
_11 = const 64_u32;
StorageDead(_11);
StorageDead(_10);
StorageDead(_14);
StorageDead(_15);
StorageDead(_16);
StorageDead(_9);
StorageDead(_4);
return;
}
}

View File

@ -2,51 +2,49 @@
+ // MIR for `issue_77355_opt` after ConstGoto
fn issue_77355_opt(_1: Foo) -> u64 {
debug num => _1; // in scope 0 at $DIR/const_goto.rs:+0:20: +0:23
let mut _0: u64; // return place in scope 0 at $DIR/const_goto.rs:+0:33: +0:36
- let mut _2: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
- let mut _3: isize; // in scope 0 at $DIR/const_goto.rs:+1:22: +1:28
+ let mut _2: isize; // in scope 0 at $DIR/const_goto.rs:+1:22: +1:28
debug num => _1;
let mut _0: u64;
- let mut _2: bool;
- let mut _3: isize;
+ let mut _2: isize;
bb0: {
- StorageLive(_2); // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
- _3 = discriminant(_1); // scope 0 at $DIR/const_goto.rs:+1:17: +1:20
- switchInt(move _3) -> [1: bb2, 2: bb2, otherwise: bb1]; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
+ _2 = discriminant(_1); // scope 0 at $DIR/const_goto.rs:+1:17: +1:20
+ switchInt(move _2) -> [1: bb2, 2: bb2, otherwise: bb1]; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
- StorageLive(_2);
- _3 = discriminant(_1);
- switchInt(move _3) -> [1: bb2, 2: bb2, otherwise: bb1];
+ _2 = discriminant(_1);
+ switchInt(move _2) -> [1: bb2, 2: bb2, otherwise: bb1];
}
bb1: {
- _2 = const false; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
- goto -> bb3; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
+ _0 = const 42_u64; // scope 0 at $DIR/const_goto.rs:+1:53: +1:55
+ goto -> bb3; // scope 0 at $DIR/const_goto.rs:+1:5: +1:57
- _2 = const false;
+ _0 = const 42_u64;
goto -> bb3;
}
bb2: {
- _2 = const true; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
- goto -> bb3; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
- }
-
- bb3: {
- switchInt(move _2) -> [0: bb5, otherwise: bb4]; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
- _2 = const true;
+ _0 = const 23_u64;
goto -> bb3;
}
bb3: {
- switchInt(move _2) -> [0: bb5, otherwise: bb4];
- }
-
- bb4: {
_0 = const 23_u64; // scope 0 at $DIR/const_goto.rs:+1:41: +1:43
- goto -> bb6; // scope 0 at $DIR/const_goto.rs:+1:5: +1:57
+ goto -> bb3; // scope 0 at $DIR/const_goto.rs:+1:5: +1:57
}
- _0 = const 23_u64;
- goto -> bb6;
- }
-
- bb5: {
- _0 = const 42_u64; // scope 0 at $DIR/const_goto.rs:+1:53: +1:55
- goto -> bb6; // scope 0 at $DIR/const_goto.rs:+1:5: +1:57
- _0 = const 42_u64;
- goto -> bb6;
- }
-
- bb6: {
- StorageDead(_2); // scope 0 at $DIR/const_goto.rs:+1:56: +1:57
+ bb3: {
return; // scope 0 at $DIR/const_goto.rs:+2:2: +2:2
- StorageDead(_2);
return;
}
}

View File

@ -2,50 +2,50 @@
+ // MIR for `f` after ConstGoto
fn f() -> u64 {
let mut _0: u64; // return place in scope 0 at $DIR/const_goto_const_eval_fail.rs:+0:44: +0:47
let mut _1: bool; // in scope 0 at $DIR/const_goto_const_eval_fail.rs:+1:11: +6:6
let mut _2: i32; // in scope 0 at $DIR/const_goto_const_eval_fail.rs:+2:15: +2:16
let mut _0: u64;
let mut _1: bool;
let mut _2: i32;
bb0: {
StorageLive(_1); // scope 0 at $DIR/const_goto_const_eval_fail.rs:+1:11: +6:6
StorageLive(_2); // scope 0 at $DIR/const_goto_const_eval_fail.rs:+2:15: +2:16
_2 = const A; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+2:15: +2:16
switchInt(_2) -> [1: bb2, 2: bb2, 3: bb2, otherwise: bb1]; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+2:9: +2:16
StorageLive(_1);
StorageLive(_2);
_2 = const A;
switchInt(_2) -> [1: bb2, 2: bb2, 3: bb2, otherwise: bb1];
}
bb1: {
_1 = const true; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+4:18: +4:22
goto -> bb3; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+4:18: +4:22
_1 = const true;
goto -> bb3;
}
bb2: {
_1 = const B; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+3:26: +3:27
- goto -> bb3; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+3:26: +3:27
+ switchInt(_1) -> [0: bb4, otherwise: bb3]; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+1:5: +6:6
_1 = const B;
- goto -> bb3;
+ switchInt(_1) -> [0: bb4, otherwise: bb3];
}
bb3: {
- switchInt(_1) -> [0: bb5, otherwise: bb4]; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+1:5: +6:6
- switchInt(_1) -> [0: bb5, otherwise: bb4];
- }
-
- bb4: {
_0 = const 2_u64; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+8:17: +8:18
- goto -> bb6; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+8:17: +8:18
+ goto -> bb5; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+8:17: +8:18
_0 = const 2_u64;
- goto -> bb6;
+ goto -> bb5;
}
- bb5: {
+ bb4: {
_0 = const 1_u64; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+7:18: +7:19
- goto -> bb6; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+7:18: +7:19
+ goto -> bb5; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+7:18: +7:19
_0 = const 1_u64;
- goto -> bb6;
+ goto -> bb5;
}
- bb6: {
+ bb5: {
StorageDead(_2); // scope 0 at $DIR/const_goto_const_eval_fail.rs:+10:1: +10:2
StorageDead(_1); // scope 0 at $DIR/const_goto_const_eval_fail.rs:+10:1: +10:2
return; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+10:2: +10:2
StorageDead(_2);
StorageDead(_1);
return;
}
}

View File

@ -2,102 +2,99 @@
+ // MIR for `match_nested_if` after ConstGoto
fn match_nested_if() -> bool {
let mut _0: bool; // return place in scope 0 at $DIR/const_goto_storage.rs:+0:25: +0:29
let _1: bool; // in scope 0 at $DIR/const_goto_storage.rs:+1:9: +1:12
- let mut _2: (); // in scope 0 at $DIR/const_goto_storage.rs:+1:21: +1:23
- let mut _3: bool; // in scope 0 at $DIR/const_goto_storage.rs:+2:15: +6:10
- let mut _4: bool; // in scope 0 at $DIR/const_goto_storage.rs:+2:18: +2:76
- let mut _5: bool; // in scope 0 at $DIR/const_goto_storage.rs:+2:21: +2:52
- let mut _6: bool; // in scope 0 at $DIR/const_goto_storage.rs:+2:24: +2:28
+ let mut _2: bool; // in scope 0 at $DIR/const_goto_storage.rs:+2:24: +2:28
let mut _0: bool;
let _1: bool;
- let mut _2: ();
- let mut _3: bool;
- let mut _4: bool;
- let mut _5: bool;
- let mut _6: bool;
+ let mut _2: bool;
scope 1 {
debug val => _1; // in scope 1 at $DIR/const_goto_storage.rs:+1:9: +1:12
debug val => _1;
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/const_goto_storage.rs:+1:9: +1:12
- StorageLive(_2); // scope 0 at $DIR/const_goto_storage.rs:+1:21: +1:23
- _2 = (); // scope 0 at $DIR/const_goto_storage.rs:+1:21: +1:23
- StorageLive(_3); // scope 0 at $DIR/const_goto_storage.rs:+2:15: +6:10
- StorageLive(_4); // scope 0 at $DIR/const_goto_storage.rs:+2:18: +2:76
- StorageLive(_5); // scope 0 at $DIR/const_goto_storage.rs:+2:21: +2:52
- StorageLive(_6); // scope 0 at $DIR/const_goto_storage.rs:+2:24: +2:28
- _6 = const true; // scope 0 at $DIR/const_goto_storage.rs:+2:24: +2:28
- switchInt(move _6) -> [0: bb2, otherwise: bb1]; // scope 0 at $DIR/const_goto_storage.rs:+2:24: +2:28
+ StorageLive(_2); // scope 0 at $DIR/const_goto_storage.rs:+2:24: +2:28
+ _2 = const true; // scope 0 at $DIR/const_goto_storage.rs:+2:24: +2:28
+ switchInt(move _2) -> [0: bb2, otherwise: bb1]; // scope 0 at $DIR/const_goto_storage.rs:+2:24: +2:28
StorageLive(_1);
StorageLive(_2);
- _2 = ();
- StorageLive(_3);
- StorageLive(_4);
- StorageLive(_5);
- StorageLive(_6);
- _6 = const true;
- switchInt(move _6) -> [0: bb2, otherwise: bb1];
+ _2 = const true;
+ switchInt(move _2) -> [0: bb2, otherwise: bb1];
}
bb1: {
- _5 = const true; // scope 0 at $DIR/const_goto_storage.rs:+2:31: +2:35
- goto -> bb3; // scope 0 at $DIR/const_goto_storage.rs:+2:21: +2:52
- }
-
- bb2: {
- _5 = const false; // scope 0 at $DIR/const_goto_storage.rs:+2:45: +2:50
- goto -> bb3; // scope 0 at $DIR/const_goto_storage.rs:+2:21: +2:52
- }
-
- bb3: {
- StorageDead(_6); // scope 0 at $DIR/const_goto_storage.rs:+2:51: +2:52
- switchInt(move _5) -> [0: bb5, otherwise: bb4]; // scope 0 at $DIR/const_goto_storage.rs:+2:21: +2:52
- _5 = const true;
+ StorageDead(_2);
+ _1 = const true;
goto -> bb3;
}
bb2: {
- _5 = const false;
+ StorageDead(_2);
+ _1 = const false;
goto -> bb3;
}
bb3: {
- StorageDead(_6);
- switchInt(move _5) -> [0: bb5, otherwise: bb4];
- }
-
- bb4: {
- _4 = const true; // scope 0 at $DIR/const_goto_storage.rs:+2:55: +2:59
- goto -> bb6; // scope 0 at $DIR/const_goto_storage.rs:+2:18: +2:76
- _4 = const true;
- goto -> bb6;
- }
-
- bb5: {
- _4 = const false; // scope 0 at $DIR/const_goto_storage.rs:+2:69: +2:74
- goto -> bb6; // scope 0 at $DIR/const_goto_storage.rs:+2:18: +2:76
- _4 = const false;
- goto -> bb6;
- }
-
- bb6: {
- StorageDead(_5); // scope 0 at $DIR/const_goto_storage.rs:+2:75: +2:76
- switchInt(move _4) -> [0: bb8, otherwise: bb7]; // scope 0 at $DIR/const_goto_storage.rs:+2:18: +2:76
- StorageDead(_5);
- switchInt(move _4) -> [0: bb8, otherwise: bb7];
- }
-
- bb7: {
- _3 = const true; // scope 0 at $DIR/const_goto_storage.rs:+3:13: +3:17
- goto -> bb9; // scope 0 at $DIR/const_goto_storage.rs:+2:15: +6:10
- _3 = const true;
- goto -> bb9;
- }
-
- bb8: {
- _3 = const false; // scope 0 at $DIR/const_goto_storage.rs:+5:13: +5:18
- goto -> bb9; // scope 0 at $DIR/const_goto_storage.rs:+2:15: +6:10
- _3 = const false;
- goto -> bb9;
- }
-
- bb9: {
- switchInt(move _3) -> [0: bb11, otherwise: bb10]; // scope 0 at $DIR/const_goto_storage.rs:+2:15: +6:10
- switchInt(move _3) -> [0: bb11, otherwise: bb10];
- }
-
- bb10: {
- StorageDead(_4); // scope 0 at $DIR/const_goto_storage.rs:+6:9: +6:10
- StorageDead(_3); // scope 0 at $DIR/const_goto_storage.rs:+6:9: +6:10
+ StorageDead(_2); // scope 0 at $DIR/const_goto_storage.rs:+2:51: +2:52
_1 = const true; // scope 0 at $DIR/const_goto_storage.rs:+8:17: +8:21
- goto -> bb12; // scope 0 at $DIR/const_goto_storage.rs:+8:17: +8:21
+ goto -> bb3; // scope 0 at $DIR/const_goto_storage.rs:+8:17: +8:21
}
- StorageDead(_4);
- StorageDead(_3);
- _1 = const true;
- goto -> bb12;
- }
-
- bb11: {
- StorageDead(_4); // scope 0 at $DIR/const_goto_storage.rs:+6:9: +6:10
- StorageDead(_3); // scope 0 at $DIR/const_goto_storage.rs:+6:9: +6:10
+ bb2: {
+ StorageDead(_2); // scope 0 at $DIR/const_goto_storage.rs:+2:51: +2:52
_1 = const false; // scope 0 at $DIR/const_goto_storage.rs:+10:14: +10:19
- goto -> bb12; // scope 0 at $DIR/const_goto_storage.rs:+10:14: +10:19
+ goto -> bb3; // scope 0 at $DIR/const_goto_storage.rs:+10:14: +10:19
}
- StorageDead(_4);
- StorageDead(_3);
- _1 = const false;
- goto -> bb12;
- }
-
- bb12: {
- StorageDead(_2); // scope 0 at $DIR/const_goto_storage.rs:+11:6: +11:7
+ bb3: {
_0 = _1; // scope 1 at $DIR/const_goto_storage.rs:+12:5: +12:8
StorageDead(_1); // scope 0 at $DIR/const_goto_storage.rs:+13:1: +13:2
return; // scope 0 at $DIR/const_goto_storage.rs:+13:2: +13:2
- StorageDead(_2);
_0 = _1;
StorageDead(_1);
return;
}
}

View File

@ -1,20 +1,17 @@
// MIR for `BAR::promoted[0]` after SimplifyCfg-elaborate-drops
promoted[0] in BAR: &[&i32; 1] = {
let mut _0: &[&i32; 1]; // return place in scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:44
let mut _1: [&i32; 1]; // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:35
let mut _2: &i32; // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:32: +0:34
let mut _3: &i32; // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:33: +0:34
let mut _0: &[&i32; 1];
let mut _1: [&i32; 1];
let mut _2: &i32;
let mut _3: &i32;
bb0: {
_3 = const {alloc1: &i32}; // scope 0 at $DIR/const_promotion_extern_static.rs:+0:33: +0:34
// mir::Constant
// + span: $DIR/const_promotion_extern_static.rs:9:33: 9:34
// + literal: Const { ty: &i32, val: Value(Scalar(alloc1)) }
_2 = &(*_3); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:32: +0:34
_1 = [move _2]; // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:35
_0 = &_1; // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:44
return; // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:44
_3 = const {alloc1: &i32};
_2 = &(*_3);
_1 = [move _2];
_0 = &_1;
return;
}
}

View File

@ -2,49 +2,41 @@
+ // MIR for `BAR` after PromoteTemps
static mut BAR: *const &i32 = {
let mut _0: *const &i32; // return place in scope 0 at $DIR/const_promotion_extern_static.rs:+0:17: +0:28
let mut _1: &[&i32]; // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:44
let mut _2: &[&i32; 1]; // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:44
let _3: [&i32; 1]; // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:35
let mut _4: &i32; // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:32: +0:34
let _5: &i32; // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:33: +0:34
+ let mut _6: &[&i32; 1]; // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:44
let mut _0: *const &i32;
let mut _1: &[&i32];
let mut _2: &[&i32; 1];
let _3: [&i32; 1];
let mut _4: &i32;
let _5: &i32;
+ let mut _6: &[&i32; 1];
bb0: {
StorageLive(_1); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:44
StorageLive(_2); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:44
- StorageLive(_3); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:35
- StorageLive(_4); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:32: +0:34
- StorageLive(_5); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:33: +0:34
- _5 = const {alloc1: &i32}; // scope 0 at $DIR/const_promotion_extern_static.rs:+0:33: +0:34
+ _6 = const _; // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:44
// mir::Constant
- // + span: $DIR/const_promotion_extern_static.rs:9:33: 9:34
- // + literal: Const { ty: &i32, val: Value(Scalar(alloc1)) }
- _4 = &(*_5); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:32: +0:34
- _3 = [move _4]; // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:35
- _2 = &_3; // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:44
+ // + span: $DIR/const_promotion_extern_static.rs:9:31: 9:44
+ // + literal: Const { ty: &[&i32; 1], val: Unevaluated(BAR, [], Some(promoted[0])) }
+ _2 = &(*_6); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:44
_1 = move _2 as &[&i32] (Pointer(Unsize)); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:44
- StorageDead(_4); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:34: +0:35
StorageDead(_2); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:34: +0:35
_0 = core::slice::<impl [&i32]>::as_ptr(move _1) -> [return: bb1, unwind: bb2]; // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:44
// mir::Constant
// + span: $DIR/const_promotion_extern_static.rs:9:36: 9:42
// + literal: Const { ty: for<'a> fn(&'a [&i32]) -> *const &i32 {core::slice::<impl [&i32]>::as_ptr}, val: Value(<ZST>) }
StorageLive(_1);
StorageLive(_2);
- StorageLive(_3);
- StorageLive(_4);
- StorageLive(_5);
- _5 = const {alloc1: &i32};
- _4 = &(*_5);
- _3 = [move _4];
- _2 = &_3;
+ _6 = const _;
+ _2 = &(*_6);
_1 = move _2 as &[&i32] (Pointer(Unsize));
- StorageDead(_4);
StorageDead(_2);
_0 = core::slice::<impl [&i32]>::as_ptr(move _1) -> [return: bb1, unwind: bb2];
}
bb1: {
- StorageDead(_5); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:43: +0:44
- StorageDead(_3); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:43: +0:44
StorageDead(_1); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:43: +0:44
return; // scope 0 at $DIR/const_promotion_extern_static.rs:+0:1: +0:45
- StorageDead(_5);
- StorageDead(_3);
StorageDead(_1);
return;
}
bb2 (cleanup): {
resume; // scope 0 at $DIR/const_promotion_extern_static.rs:+0:1: +0:45
resume;
}
- }
-

View File

@ -1,17 +1,17 @@
// MIR for `BOP` after built
static BOP: &i32 = {
let mut _0: &i32; // return place in scope 0 at $DIR/const_promotion_extern_static.rs:+0:13: +0:17
let _1: &i32; // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:20: +0:23
let _2: i32; // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:21: +0:23
let mut _0: &i32;
let _1: &i32;
let _2: i32;
bb0: {
StorageLive(_1); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:20: +0:23
StorageLive(_2); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:21: +0:23
_2 = const 13_i32; // scope 0 at $DIR/const_promotion_extern_static.rs:+0:21: +0:23
_1 = &_2; // scope 0 at $DIR/const_promotion_extern_static.rs:+0:20: +0:23
_0 = &(*_1); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:20: +0:23
StorageDead(_1); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:22: +0:23
return; // scope 0 at $DIR/const_promotion_extern_static.rs:+0:1: +0:24
StorageLive(_1);
StorageLive(_2);
_2 = const 13_i32;
_1 = &_2;
_0 = &(*_1);
StorageDead(_1);
return;
}
}

View File

@ -1,20 +1,17 @@
// MIR for `FOO::promoted[0]` after SimplifyCfg-elaborate-drops
promoted[0] in FOO: &[&i32; 1] = {
let mut _0: &[&i32; 1]; // return place in scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:55
let mut _1: [&i32; 1]; // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:46
let mut _2: &i32; // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:32: +0:45
let mut _3: *const i32; // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:42: +0:43
let mut _0: &[&i32; 1];
let mut _1: [&i32; 1];
let mut _2: &i32;
let mut _3: *const i32;
bb0: {
_3 = const {alloc3: *const i32}; // scope 0 at $DIR/const_promotion_extern_static.rs:+0:42: +0:43
// mir::Constant
// + span: $DIR/const_promotion_extern_static.rs:13:42: 13:43
// + literal: Const { ty: *const i32, val: Value(Scalar(alloc3)) }
_2 = &(*_3); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:41: +0:43
_1 = [move _2]; // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:46
_0 = &_1; // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:55
return; // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:55
_3 = const {alloc3: *const i32};
_2 = &(*_3);
_1 = [move _2];
_0 = &_1;
return;
}
}

View File

@ -2,51 +2,43 @@
+ // MIR for `FOO` after PromoteTemps
static mut FOO: *const &i32 = {
let mut _0: *const &i32; // return place in scope 0 at $DIR/const_promotion_extern_static.rs:+0:17: +0:28
let mut _1: &[&i32]; // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:55
let mut _2: &[&i32; 1]; // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:55
let _3: [&i32; 1]; // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:46
let mut _4: &i32; // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:32: +0:45
let _5: *const i32; // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:42: +0:43
+ let mut _6: &[&i32; 1]; // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:55
let mut _0: *const &i32;
let mut _1: &[&i32];
let mut _2: &[&i32; 1];
let _3: [&i32; 1];
let mut _4: &i32;
let _5: *const i32;
+ let mut _6: &[&i32; 1];
scope 1 {
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:55
StorageLive(_2); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:55
- StorageLive(_3); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:46
- StorageLive(_4); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:32: +0:45
- StorageLive(_5); // scope 1 at $DIR/const_promotion_extern_static.rs:+0:42: +0:43
- _5 = const {alloc3: *const i32}; // scope 1 at $DIR/const_promotion_extern_static.rs:+0:42: +0:43
+ _6 = const _; // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:55
// mir::Constant
- // + span: $DIR/const_promotion_extern_static.rs:13:42: 13:43
- // + literal: Const { ty: *const i32, val: Value(Scalar(alloc3)) }
- _4 = &(*_5); // scope 1 at $DIR/const_promotion_extern_static.rs:+0:41: +0:43
- _3 = [move _4]; // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:46
- _2 = &_3; // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:55
+ // + span: $DIR/const_promotion_extern_static.rs:13:31: 13:55
+ // + literal: Const { ty: &[&i32; 1], val: Unevaluated(FOO, [], Some(promoted[0])) }
+ _2 = &(*_6); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:55
_1 = move _2 as &[&i32] (Pointer(Unsize)); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:55
- StorageDead(_4); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:45: +0:46
StorageDead(_2); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:45: +0:46
_0 = core::slice::<impl [&i32]>::as_ptr(move _1) -> [return: bb1, unwind: bb2]; // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:55
// mir::Constant
// + span: $DIR/const_promotion_extern_static.rs:13:47: 13:53
// + literal: Const { ty: for<'a> fn(&'a [&i32]) -> *const &i32 {core::slice::<impl [&i32]>::as_ptr}, val: Value(<ZST>) }
StorageLive(_1);
StorageLive(_2);
- StorageLive(_3);
- StorageLive(_4);
- StorageLive(_5);
- _5 = const {alloc3: *const i32};
- _4 = &(*_5);
- _3 = [move _4];
- _2 = &_3;
+ _6 = const _;
+ _2 = &(*_6);
_1 = move _2 as &[&i32] (Pointer(Unsize));
- StorageDead(_4);
StorageDead(_2);
_0 = core::slice::<impl [&i32]>::as_ptr(move _1) -> [return: bb1, unwind: bb2];
}
bb1: {
- StorageDead(_5); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:54: +0:55
- StorageDead(_3); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:54: +0:55
StorageDead(_1); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:54: +0:55
return; // scope 0 at $DIR/const_promotion_extern_static.rs:+0:1: +0:56
- StorageDead(_5);
- StorageDead(_3);
StorageDead(_1);
return;
}
bb2 (cleanup): {
resume; // scope 0 at $DIR/const_promotion_extern_static.rs:+0:1: +0:56
resume;
}
}
-

Some files were not shown because too many files have changed in this diff Show More