1
Fork 0

Auto merge of #95125 - JakobDegen:uninit-variant-rvalue, r=oli-obk

Add new `Deinit` statement

This rvalue replaces `SetDiscriminant` for ADTs. This PR is an alternative to #94590 , which only specifies that the behavior of `SetDiscriminant` is the same as what this rvalue would do. The motivation for this change are discussed in that PR and [on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/189540-t-compiler.2Fwg-mir-opt/topic/SetDiscriminant.20and.20aggregate.20initialization.20.2394590)

r? `@oli-obk`
This commit is contained in:
bors 2022-04-11 14:49:30 +00:00
commit 625e4dd13a
128 changed files with 745 additions and 294 deletions

View file

@ -386,6 +386,7 @@ impl<'tcx> rustc_mir_dataflow::GenKillAnalysis<'tcx> for Borrows<'_, 'tcx> {
mir::StatementKind::FakeRead(..)
| mir::StatementKind::SetDiscriminant { .. }
| mir::StatementKind::Deinit(..)
| mir::StatementKind::StorageLive(..)
| mir::StatementKind::Retag { .. }
| mir::StatementKind::AscribeUserType(..)

View file

@ -72,5 +72,9 @@ pub fn categorize(context: PlaceContext) -> Option<DefUse> {
// Debug info is neither def nor use.
PlaceContext::NonUse(NonUseContext::VarDebugInfo) => None,
PlaceContext::MutatingUse(MutatingUseContext::Deinit | MutatingUseContext::SetDiscriminant) => {
bug!("These statements are not allowed in this MIR phase")
}
}
}

View file

@ -63,9 +63,6 @@ impl<'cx, 'tcx> Visitor<'tcx> for InvalidationGenerator<'cx, 'tcx> {
StatementKind::FakeRead(box (_, _)) => {
// Only relevant for initialized/liveness/safety checks.
}
StatementKind::SetDiscriminant { place, variant_index: _ } => {
self.mutate_place(location, **place, Shallow(None));
}
StatementKind::CopyNonOverlapping(box rustc_middle::mir::CopyNonOverlapping {
ref src,
ref dst,
@ -91,6 +88,9 @@ impl<'cx, 'tcx> Visitor<'tcx> for InvalidationGenerator<'cx, 'tcx> {
LocalMutationIsAllowed::Yes,
);
}
StatementKind::Deinit(..) | StatementKind::SetDiscriminant { .. } => {
bug!("Statement not allowed in this MIR phase")
}
}
self.super_statement(statement, location);

View file

@ -626,9 +626,6 @@ impl<'cx, 'tcx> rustc_mir_dataflow::ResultsVisitor<'cx, 'tcx> for MirBorrowckCtx
flow_state,
);
}
StatementKind::SetDiscriminant { place, variant_index: _ } => {
self.mutate_place(location, (**place, span), Shallow(None), flow_state);
}
StatementKind::CopyNonOverlapping(box rustc_middle::mir::CopyNonOverlapping {
..
}) => {
@ -654,6 +651,9 @@ impl<'cx, 'tcx> rustc_mir_dataflow::ResultsVisitor<'cx, 'tcx> for MirBorrowckCtx
flow_state,
);
}
StatementKind::Deinit(..) | StatementKind::SetDiscriminant { .. } => {
bug!("Statement not allowed in this MIR phase")
}
}
}

View file

@ -1303,28 +1303,6 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
);
}
}
StatementKind::SetDiscriminant { ref place, variant_index } => {
let place_type = place.ty(body, tcx).ty;
let adt = match place_type.kind() {
ty::Adt(adt, _) if adt.is_enum() => adt,
_ => {
span_bug!(
stmt.source_info.span,
"bad set discriminant ({:?} = {:?}): lhs is not an enum",
place,
variant_index
);
}
};
if variant_index.as_usize() >= adt.variants().len() {
span_bug!(
stmt.source_info.span,
"bad set discriminant ({:?} = {:?}): value of of range",
place,
variant_index
);
};
}
StatementKind::AscribeUserType(box (ref place, ref projection), variance) => {
let place_ty = place.ty(body, tcx).ty;
if let Err(terr) = self.relate_type_and_user_type(
@ -1358,6 +1336,9 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
| StatementKind::Retag { .. }
| StatementKind::Coverage(..)
| StatementKind::Nop => {}
StatementKind::Deinit(..) | StatementKind::SetDiscriminant { .. } => {
bug!("Statement not allowed in this MIR phase")
}
}
}

View file

@ -772,6 +772,7 @@ fn codegen_stmt<'tcx>(
}
StatementKind::StorageLive(_)
| StatementKind::StorageDead(_)
| StatementKind::Deinit(_)
| StatementKind::Nop
| StatementKind::FakeRead(..)
| StatementKind::Retag { .. }

View file

@ -518,6 +518,7 @@ pub(crate) fn mir_operand_get_const_val<'tcx>(
StatementKind::Assign(_)
| StatementKind::FakeRead(_)
| StatementKind::SetDiscriminant { .. }
| StatementKind::Deinit(_)
| StatementKind::StorageLive(_)
| StatementKind::StorageDead(_)
| StatementKind::Retag(_, _)

View file

@ -211,6 +211,8 @@ impl<'mir, 'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> Visitor<'tcx>
PlaceContext::MutatingUse(
MutatingUseContext::Store
| MutatingUseContext::Deinit
| MutatingUseContext::SetDiscriminant
| MutatingUseContext::AsmOutput
| MutatingUseContext::Borrow
| MutatingUseContext::AddressOf

View file

@ -48,6 +48,12 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
.codegen_set_discr(&mut bx, variant_index);
bx
}
mir::StatementKind::Deinit(..) => {
// For now, don't codegen this to anything. In the future it may be worth
// experimenting with what kind of information we can emit to LLVM without hurting
// perf here
bx
}
mir::StatementKind::StorageLive(local) => {
if let LocalRef::Place(cg_place) = self.locals[local] {
cg_place.storage_live(&mut bx);

View file

@ -890,6 +890,11 @@ impl<'tcx, 'a, Tag: Provenance, Extra> AllocRefMut<'a, 'tcx, Tag, Extra> {
) -> InterpResult<'tcx> {
self.write_scalar(alloc_range(offset, self.tcx.data_layout().pointer_size), val)
}
/// Mark the entire referenced range as uninitalized
pub fn write_uninit(&mut self) {
self.alloc.mark_init(self.range, false);
}
}
impl<'tcx, 'a, Tag: Provenance, Extra> AllocRef<'a, 'tcx, Tag, Extra> {

View file

@ -791,6 +791,42 @@ where
}
}
pub fn write_uninit(&mut self, dest: &PlaceTy<'tcx, M::PointerTag>) -> InterpResult<'tcx> {
let mplace = match dest.place {
Place::Ptr(mplace) => MPlaceTy { mplace, layout: dest.layout },
Place::Local { frame, local } => {
match M::access_local_mut(self, frame, local)? {
Ok(local) => match dest.layout.abi {
Abi::Scalar(_) => {
*local = LocalValue::Live(Operand::Immediate(Immediate::Scalar(
ScalarMaybeUninit::Uninit,
)));
return Ok(());
}
Abi::ScalarPair(..) => {
*local = LocalValue::Live(Operand::Immediate(Immediate::ScalarPair(
ScalarMaybeUninit::Uninit,
ScalarMaybeUninit::Uninit,
)));
return Ok(());
}
_ => self.force_allocation(dest)?,
},
Err(mplace) => {
// The local is in memory, go on below.
MPlaceTy { mplace, layout: dest.layout }
}
}
}
};
let Some(mut alloc) = self.get_place_alloc_mut(&mplace)? else {
// Zero-sized access
return Ok(());
};
alloc.write_uninit();
Ok(())
}
/// Copies the data from an operand to a place. This does not support transmuting!
/// Use `copy_op_transmute` if the layouts could disagree.
#[inline(always)]

View file

@ -90,6 +90,11 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
self.write_discriminant(*variant_index, &dest)?;
}
Deinit(place) => {
let dest = self.eval_place(**place)?;
self.write_uninit(&dest)?;
}
// Mark locals as alive
StorageLive(local) => {
self.storage_live(*local)?;

View file

@ -692,6 +692,7 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
match statement.kind {
StatementKind::Assign(..)
| StatementKind::SetDiscriminant { .. }
| StatementKind::Deinit(..)
| StatementKind::FakeRead(..)
| StatementKind::StorageLive(_)
| StatementKind::StorageDead(_)

View file

@ -346,9 +346,24 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
self.fail(location, format!("bad arg ({:?} != usize)", op_cnt_ty))
}
}
StatementKind::SetDiscriminant { .. } => {
if self.mir_phase < MirPhase::DropsLowered {
self.fail(location, "`SetDiscriminant` is not allowed until drop elaboration");
StatementKind::SetDiscriminant { place, .. } => {
if self.mir_phase < MirPhase::Deaggregated {
self.fail(location, "`SetDiscriminant`is not allowed until deaggregation");
}
let pty = place.ty(&self.body.local_decls, self.tcx).ty.kind();
if !matches!(pty, ty::Adt(..) | ty::Generator(..) | ty::Opaque(..)) {
self.fail(
location,
format!(
"`SetDiscriminant` is only allowed on ADTs and generators, not {:?}",
pty
),
);
}
}
StatementKind::Deinit(..) => {
if self.mir_phase < MirPhase::Deaggregated {
self.fail(location, "`Deinit`is not allowed until deaggregation");
}
}
StatementKind::Retag(_, _) => {

View file

@ -14,22 +14,26 @@ use std::iter::TrustedLen;
/// (lhs as Variant).field1 = arg1;
/// discriminant(lhs) = variant_index; // If lhs is an enum or generator.
pub fn expand_aggregate<'tcx>(
mut lhs: Place<'tcx>,
orig_lhs: Place<'tcx>,
operands: impl Iterator<Item = (Operand<'tcx>, Ty<'tcx>)> + TrustedLen,
kind: AggregateKind<'tcx>,
source_info: SourceInfo,
tcx: TyCtxt<'tcx>,
) -> impl Iterator<Item = Statement<'tcx>> + TrustedLen {
let mut lhs = orig_lhs;
let mut set_discriminant = None;
let active_field_index = match kind {
AggregateKind::Adt(adt_did, variant_index, _, _, active_field_index) => {
let adt_def = tcx.adt_def(adt_did);
if adt_def.is_enum() {
set_discriminant = Some(Statement {
kind: StatementKind::SetDiscriminant { place: Box::new(lhs), variant_index },
kind: StatementKind::SetDiscriminant {
place: Box::new(orig_lhs),
variant_index,
},
source_info,
});
lhs = tcx.mk_place_downcast(lhs, adt_def, variant_index);
lhs = tcx.mk_place_downcast(orig_lhs, adt_def, variant_index);
}
active_field_index
}
@ -38,7 +42,7 @@ pub fn expand_aggregate<'tcx>(
// variant 0 (Unresumed).
let variant_index = VariantIdx::new(0);
set_discriminant = Some(Statement {
kind: StatementKind::SetDiscriminant { place: Box::new(lhs), variant_index },
kind: StatementKind::SetDiscriminant { place: Box::new(orig_lhs), variant_index },
source_info,
});
@ -50,18 +54,12 @@ pub fn expand_aggregate<'tcx>(
_ => None,
};
operands
.enumerate()
.map(move |(i, (op, ty))| {
let operands = operands.enumerate().map(move |(i, (op, ty))| {
let lhs_field = if let AggregateKind::Array(_) = kind {
let offset = u64::try_from(i).unwrap();
tcx.mk_place_elem(
lhs,
ProjectionElem::ConstantIndex {
offset,
min_length: offset + 1,
from_end: false,
},
ProjectionElem::ConstantIndex { offset, min_length: offset + 1, from_end: false },
)
} else {
let field = Field::new(active_field_index.unwrap_or(i));
@ -71,6 +69,9 @@ pub fn expand_aggregate<'tcx>(
source_info,
kind: StatementKind::Assign(Box::new((lhs_field, Rvalue::Use(op)))),
}
})
});
[Statement { source_info, kind: StatementKind::Deinit(Box::new(orig_lhs)) }]
.into_iter()
.chain(operands)
.chain(set_discriminant)
}

View file

@ -1588,8 +1588,17 @@ pub enum StatementKind<'tcx> {
FakeRead(Box<(FakeReadCause, Place<'tcx>)>),
/// Write the discriminant for a variant to the enum Place.
///
/// This is permitted for both generators and ADTs. This does not necessarily write to the
/// entire place; instead, it writes to the minimum set of bytes as required by the layout for
/// the type.
SetDiscriminant { place: Box<Place<'tcx>>, variant_index: VariantIdx },
/// Deinitializes the place.
///
/// This writes `uninit` bytes to the entire place.
Deinit(Box<Place<'tcx>>),
/// Start a live range for the storage of the local.
StorageLive(Local),
@ -1739,6 +1748,7 @@ impl Debug for Statement<'_> {
SetDiscriminant { ref place, variant_index } => {
write!(fmt, "discriminant({:?}) = {:?}", place, variant_index)
}
Deinit(ref place) => write!(fmt, "Deinit({:?})", place),
AscribeUserType(box (ref place, ref c_ty), ref variance) => {
write!(fmt, "AscribeUserType({:?}, {:?}, {:?})", place, variance, c_ty)
}

View file

@ -243,6 +243,7 @@ pub fn statement_kind_name(statement: &Statement<'_>) -> &'static str {
Assign(..) => "Assign",
FakeRead(..) => "FakeRead",
SetDiscriminant { .. } => "SetDiscriminant",
Deinit(..) => "Deinit",
StorageLive(..) => "StorageLive",
StorageDead(..) => "StorageDead",
Retag(..) => "Retag",

View file

@ -395,10 +395,17 @@ macro_rules! make_mir_visitor {
StatementKind::SetDiscriminant { place, .. } => {
self.visit_place(
place,
PlaceContext::MutatingUse(MutatingUseContext::Store),
PlaceContext::MutatingUse(MutatingUseContext::SetDiscriminant),
location
);
}
StatementKind::Deinit(place) => {
self.visit_place(
place,
PlaceContext::MutatingUse(MutatingUseContext::Deinit),
location
)
}
StatementKind::StorageLive(local) => {
self.visit_local(
local,
@ -1174,6 +1181,10 @@ pub enum NonMutatingUseContext {
pub enum MutatingUseContext {
/// Appears as LHS of an assignment.
Store,
/// Appears on `SetDiscriminant`
SetDiscriminant,
/// Appears on `Deinit`
Deinit,
/// Output operand of an inline assembly block.
AsmOutput,
/// Destination of a call.

View file

@ -77,6 +77,10 @@ impl<T> Visitor<'_> for TransferFunction<'_, T>
where
T: GenKill<Local>,
{
// FIXME: Using `visit_local` here is a bug. For example, on `move _5.field` we mark `_5` as
// deinitialized, although clearly it is only partially deinitialized. This analysis is not
// actually used anywhere at the moment, so this is not critical, but this does need to be fixed
// before it starts being used again.
fn visit_local(&mut self, &local: &Local, context: PlaceContext, _: Location) {
use rustc_middle::mir::visit::{MutatingUseContext, NonMutatingUseContext, NonUseContext};
match context {
@ -87,6 +91,9 @@ where
| MutatingUseContext::Yield,
) => {}
// If it's deinitialized, it's no longer init
PlaceContext::MutatingUse(MutatingUseContext::Deinit) => self.trans.kill(local),
// Otherwise, when a place is mutated, we must consider it possibly initialized.
PlaceContext::MutatingUse(_) => self.trans.gen(local),

View file

@ -18,30 +18,6 @@ use crate::{AnalysisDomain, Backward, CallReturnPlaces, GenKill, GenKillAnalysis
/// such an assignment is currently marked as a "use" of `x` in an attempt to be maximally
/// conservative.
///
/// ## Enums and `SetDiscriminant`
///
/// Assigning a literal value to an `enum` (e.g. `Option<i32>`), does not result in a simple
/// assignment of the form `_1 = /*...*/` in the MIR. For example, the following assignment to `x`:
///
/// ```
/// x = Some(4);
/// ```
///
/// compiles to this MIR
///
/// ```
/// ((_1 as Some).0: i32) = const 4_i32;
/// discriminant(_1) = 1;
/// ```
///
/// However, `MaybeLiveLocals` **does** mark `x` (`_1`) as "killed" after a statement like this.
/// That's because it treats the `SetDiscriminant` operation as a definition of `x`, even though
/// the writes that actually initialized the locals happened earlier.
///
/// This makes `MaybeLiveLocals` unsuitable for certain classes of optimization normally associated
/// with a live variables analysis, notably dead-store elimination. It's a dirty hack, but it works
/// okay for the generator state transform (currently the main consumer of this analysis).
///
/// [`MaybeBorrowedLocals`]: super::MaybeBorrowedLocals
/// [flow-test]: https://github.com/rust-lang/rust/blob/a08c47310c7d49cbdc5d7afb38408ba519967ecd/src/test/ui/mir-dataflow/liveness-ptr.rs
/// [liveness]: https://en.wikipedia.org/wiki/Live_variable_analysis
@ -161,7 +137,13 @@ impl DefUse {
match context {
PlaceContext::NonUse(_) => None,
PlaceContext::MutatingUse(MutatingUseContext::Store) => Some(DefUse::Def),
PlaceContext::MutatingUse(MutatingUseContext::Store | MutatingUseContext::Deinit) => {
Some(DefUse::Def)
}
// Setting the discriminant is not a use because it does no reading, but it is also not
// a def because it does not overwrite the whole place
PlaceContext::MutatingUse(MutatingUseContext::SetDiscriminant) => None,
// `MutatingUseContext::Call` and `MutatingUseContext::Yield` indicate that this is the
// destination place for a `Call` return or `Yield` resume respectively. Since this is

View file

@ -131,7 +131,8 @@ impl<'mir, 'tcx> crate::GenKillAnalysis<'tcx> for MaybeRequiresStorage<'mir, 'tc
// If a place is assigned to in a statement, it needs storage for that statement.
StatementKind::Assign(box (place, _))
| StatementKind::SetDiscriminant { box place, .. } => {
| StatementKind::SetDiscriminant { box place, .. }
| StatementKind::Deinit(box place) => {
trans.gen(place.local);
}

View file

@ -296,10 +296,10 @@ impl<'b, 'a, 'tcx> Gatherer<'b, 'a, 'tcx> {
StatementKind::StorageDead(local) => {
self.gather_move(Place::from(*local));
}
StatementKind::SetDiscriminant { .. } => {
StatementKind::SetDiscriminant { .. } | StatementKind::Deinit(..) => {
span_bug!(
stmt.source_info.span,
"SetDiscriminant should not exist during borrowck"
"SetDiscriminant/Deinit should not exist during borrowck"
);
}
StatementKind::Retag { .. }

View file

@ -97,6 +97,7 @@ impl<'tcx> Visitor<'tcx> for UnsafetyChecker<'_, 'tcx> {
StatementKind::Assign(..)
| StatementKind::FakeRead(..)
| StatementKind::SetDiscriminant { .. }
| StatementKind::Deinit(..)
| StatementKind::StorageLive(..)
| StatementKind::StorageDead(..)
| StatementKind::Retag { .. }

View file

@ -897,8 +897,10 @@ impl Visitor<'_> for CanConstProp {
// mutations of the same local via `Store`
| MutatingUse(MutatingUseContext::Call)
| MutatingUse(MutatingUseContext::AsmOutput)
| MutatingUse(MutatingUseContext::Deinit)
// Actual store that can possibly even propagate a value
| MutatingUse(MutatingUseContext::Store) => {
| MutatingUse(MutatingUseContext::Store)
| MutatingUse(MutatingUseContext::SetDiscriminant) => {
if !self.found_assignment.insert(local) {
match &mut self.can_const_prop[local] {
// If the local can only get propagated in its own block, then we don't have

View file

@ -778,7 +778,9 @@ impl Visitor<'_> for CanConstProp {
// mutations of the same local via `Store`
| MutatingUse(MutatingUseContext::Call)
| MutatingUse(MutatingUseContext::AsmOutput)
| MutatingUse(MutatingUseContext::Deinit)
// Actual store that can possibly even propagate a value
| MutatingUse(MutatingUseContext::SetDiscriminant)
| MutatingUse(MutatingUseContext::Store) => {
if !self.found_assignment.insert(local) {
match &mut self.can_const_prop[local] {

View file

@ -827,6 +827,7 @@ pub(super) fn filtered_statement_span(statement: &Statement<'_>) -> Option<Span>
| StatementKind::CopyNonOverlapping(..)
| StatementKind::Assign(_)
| StatementKind::SetDiscriminant { .. }
| StatementKind::Deinit(..)
| StatementKind::Retag(_, _)
| StatementKind::AscribeUserType(_, _) => {
Some(statement.source_info.span)

View file

@ -530,6 +530,7 @@ impl<'a> Conflicts<'a> {
StatementKind::Assign(_) => {}
StatementKind::SetDiscriminant { .. }
| StatementKind::Deinit(..)
| StatementKind::StorageLive(..)
| StatementKind::StorageDead(..)
| StatementKind::Retag(..)

View file

@ -1441,6 +1441,7 @@ impl<'tcx> Visitor<'tcx> for EnsureGeneratorFieldAssignmentsNeverAlias<'_> {
StatementKind::FakeRead(..)
| StatementKind::SetDiscriminant { .. }
| StatementKind::Deinit(..)
| StatementKind::StorageLive(_)
| StatementKind::StorageDead(_)
| StatementKind::Retag(..)

View file

@ -369,6 +369,7 @@ impl<'tcx> Inliner<'tcx> {
match stmt.kind {
StatementKind::StorageLive(_)
| StatementKind::StorageDead(_)
| StatementKind::Deinit(_)
| StatementKind::Nop => {}
_ => cost += INSTR_COST,
}

View file

@ -50,6 +50,7 @@ impl RemoveNoopLandingPads {
StatementKind::Assign { .. }
| StatementKind::SetDiscriminant { .. }
| StatementKind::Deinit(..)
| StatementKind::CopyNonOverlapping(..)
| StatementKind::Retag { .. } => {
return false;

View file

@ -21,7 +21,9 @@ impl<'tcx> MirPass<'tcx> for RemoveZsts {
let (basic_blocks, local_decls) = body.basic_blocks_and_local_decls_mut();
for block in basic_blocks.iter_mut() {
for statement in block.statements.iter_mut() {
if let StatementKind::Assign(box (place, _)) = statement.kind {
if let StatementKind::Assign(box (place, _)) | StatementKind::Deinit(box place) =
statement.kind
{
let place_ty = place.ty(local_decls, tcx).ty;
if !maybe_zst(place_ty) {
continue;

View file

@ -242,6 +242,7 @@ fn is_likely_const<'tcx>(mut tracked_place: Place<'tcx>, block: &BasicBlockData<
// These statements have no influence on the place
// we are interested in
StatementKind::FakeRead(_)
| StatementKind::Deinit(_)
| StatementKind::StorageLive(_)
| StatementKind::Retag(_, _)
| StatementKind::AscribeUserType(_, _)
@ -308,6 +309,7 @@ fn find_determining_place<'tcx>(
// These statements have no influence on the place
// we are interested in
StatementKind::FakeRead(_)
| StatementKind::Deinit(_)
| StatementKind::StorageLive(_)
| StatementKind::StorageDead(_)
| StatementKind::Retag(_, _)

View file

@ -498,7 +498,8 @@ impl<'tcx> Visitor<'tcx> for UsedLocals {
self.visit_rvalue(rvalue, location);
}
StatementKind::SetDiscriminant { ref place, variant_index: _ } => {
StatementKind::SetDiscriminant { ref place, variant_index: _ }
| StatementKind::Deinit(ref place) => {
self.visit_lhs(place, location);
}
}
@ -534,9 +535,8 @@ fn remove_unused_definitions(used_locals: &mut UsedLocals, body: &mut Body<'_>)
}
StatementKind::Assign(box (place, _)) => used_locals.is_used(place.local),
StatementKind::SetDiscriminant { ref place, .. } => {
used_locals.is_used(place.local)
}
StatementKind::SetDiscriminant { ref place, .. }
| StatementKind::Deinit(ref place) => used_locals.is_used(place.local),
_ => true,
};

View file

@ -14,7 +14,7 @@ type R = Result<u64, i32>;
#[no_mangle]
pub fn try_identity(x: R) -> R {
// CHECK: start:
// CHECK-NOT: br {{.*}}
// FIXME(JakobDegen): Broken by deaggregation change CHECK-NOT\: br {{.*}}
// CHECK ret void
let y = match into_result(x) {
Err(e) => return from_error(From::from(e)),

View file

@ -17,6 +17,7 @@
}
bb2: {
Deinit(_0); // scope 0 at $DIR/76803_regression.rs:12:20: 12:27
discriminant(_0) = 1; // scope 0 at $DIR/76803_regression.rs:12:20: 12:27
goto -> bb3; // scope 0 at $DIR/76803_regression.rs:12:20: 12:27
}

View file

@ -63,6 +63,7 @@
}
bb3: {
Deinit(_0); // scope 1 at $DIR/combine_clone_of_primitives.rs:6:10: 6:15
(_0.0: T) = move _5; // scope 1 at $DIR/combine_clone_of_primitives.rs:6:10: 6:15
(_0.1: u64) = move _8; // scope 1 at $DIR/combine_clone_of_primitives.rs:6:10: 6:15
(_0.2: [f32; 3]) = move _11; // scope 1 at $DIR/combine_clone_of_primitives.rs:6:10: 6:15

View file

@ -79,13 +79,16 @@
// + span: $DIR/const_debuginfo.rs:14:13: 14:28
// + literal: Const { ty: &str, val: Value(Slice { data: Allocation { bytes: [104, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100, 33], relocations: Relocations(SortedMap { data: [] }), init_mask: InitMask { blocks: [8191], len: Size { raw: 13 } }, align: Align { pow2: 0 }, mutability: Not, extra: () }, start: 0, end: 13 }) }
StorageLive(_10); // scope 5 at $DIR/const_debuginfo.rs:16:9: 16:10
Deinit(_10); // scope 5 at $DIR/const_debuginfo.rs:16:13: 16:34
(_10.0: bool) = const true; // scope 5 at $DIR/const_debuginfo.rs:16:13: 16:34
(_10.1: bool) = const false; // scope 5 at $DIR/const_debuginfo.rs:16:13: 16:34
(_10.2: u32) = const 123_u32; // scope 5 at $DIR/const_debuginfo.rs:16:13: 16:34
StorageLive(_11); // scope 6 at $DIR/const_debuginfo.rs:18:9: 18:10
Deinit(_11); // scope 6 at $DIR/const_debuginfo.rs:18:13: 18:24
((_11 as Some).0: u16) = const 99_u16; // scope 6 at $DIR/const_debuginfo.rs:18:13: 18:24
discriminant(_11) = 1; // scope 6 at $DIR/const_debuginfo.rs:18:13: 18:24
StorageLive(_12); // scope 7 at $DIR/const_debuginfo.rs:20:9: 20:10
Deinit(_12); // scope 7 at $DIR/const_debuginfo.rs:20:13: 20:35
(_12.0: u32) = const 32_u32; // scope 7 at $DIR/const_debuginfo.rs:20:13: 20:35
(_12.1: u32) = const 32_u32; // scope 7 at $DIR/const_debuginfo.rs:20:13: 20:35
StorageLive(_13); // scope 8 at $DIR/const_debuginfo.rs:21:9: 21:10

View file

@ -17,6 +17,7 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/const_goto_storage.rs:3:9: 3:12
- StorageLive(_2); // scope 0 at $DIR/const_goto_storage.rs:3:21: 3:23
- nop; // scope 0 at $DIR/const_goto_storage.rs:3:21: 3:23
- StorageLive(_3); // scope 0 at $DIR/const_goto_storage.rs:4:15: 8:10
- StorageLive(_4); // scope 0 at $DIR/const_goto_storage.rs:4:18: 4:76
- StorageLive(_5); // scope 0 at $DIR/const_goto_storage.rs:4:21: 4:52

View file

@ -14,6 +14,7 @@
StorageLive(_1); // scope 0 at $DIR/aggregate.rs:5:9: 5:10
StorageLive(_2); // scope 0 at $DIR/aggregate.rs:5:13: 5:24
StorageLive(_3); // scope 0 at $DIR/aggregate.rs:5:13: 5:22
Deinit(_3); // scope 0 at $DIR/aggregate.rs:5:13: 5:22
(_3.0: i32) = const 0_i32; // scope 0 at $DIR/aggregate.rs:5:13: 5:22
(_3.1: i32) = const 1_i32; // scope 0 at $DIR/aggregate.rs:5:13: 5:22
(_3.2: i32) = const 2_i32; // scope 0 at $DIR/aggregate.rs:5:13: 5:22

View file

@ -15,6 +15,7 @@
StorageLive(_1); // scope 0 at $DIR/discriminant.rs:11:9: 11:10
StorageLive(_2); // scope 0 at $DIR/discriminant.rs:11:13: 11:64
StorageLive(_3); // scope 0 at $DIR/discriminant.rs:11:34: 11:44
Deinit(_3); // scope 0 at $DIR/discriminant.rs:11:34: 11:44
((_3 as Some).0: bool) = const true; // scope 0 at $DIR/discriminant.rs:11:34: 11:44
discriminant(_3) = 1; // scope 0 at $DIR/discriminant.rs:11:34: 11:44
- _4 = discriminant(_3); // scope 0 at $DIR/discriminant.rs:11:21: 11:31

View file

@ -15,6 +15,7 @@
StorageLive(_1); // scope 0 at $DIR/discriminant.rs:11:9: 11:10
StorageLive(_2); // scope 0 at $DIR/discriminant.rs:11:13: 11:64
StorageLive(_3); // scope 0 at $DIR/discriminant.rs:11:34: 11:44
Deinit(_3); // scope 0 at $DIR/discriminant.rs:11:34: 11:44
((_3 as Some).0: bool) = const true; // scope 0 at $DIR/discriminant.rs:11:34: 11:44
discriminant(_3) = 1; // scope 0 at $DIR/discriminant.rs:11:34: 11:44
- _4 = discriminant(_3); // scope 0 at $DIR/discriminant.rs:11:21: 11:31

View file

@ -34,6 +34,7 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/invalid_constant.rs:21:9: 21:22
StorageLive(_2); // scope 2 at $DIR/invalid_constant.rs:21:34: 21:63
Deinit(_2); // scope 2 at $DIR/invalid_constant.rs:21:34: 21:63
(_2.0: u32) = const 1114113_u32; // scope 2 at $DIR/invalid_constant.rs:21:34: 21:63
- _1 = (_2.1: char); // scope 2 at $DIR/invalid_constant.rs:21:34: 21:67
+ _1 = const {transmute(0x00110001): char}; // scope 2 at $DIR/invalid_constant.rs:21:34: 21:67
@ -41,6 +42,7 @@
StorageLive(_3); // scope 1 at $DIR/invalid_constant.rs:28:9: 28:21
StorageLive(_4); // scope 1 at $DIR/invalid_constant.rs:28:25: 28:59
StorageLive(_5); // scope 4 at $DIR/invalid_constant.rs:28:34: 28:55
Deinit(_5); // scope 4 at $DIR/invalid_constant.rs:28:34: 28:55
(_5.0: u32) = const 4_u32; // scope 4 at $DIR/invalid_constant.rs:28:34: 28:55
- _4 = (_5.1: E); // scope 4 at $DIR/invalid_constant.rs:28:34: 28:57
- _3 = [move _4]; // scope 1 at $DIR/invalid_constant.rs:28:24: 28:60
@ -57,6 +59,7 @@
StorageLive(_6); // scope 3 at $DIR/invalid_constant.rs:35:9: 35:31
StorageLive(_7); // scope 3 at $DIR/invalid_constant.rs:35:35: 35:73
StorageLive(_8); // scope 6 at $DIR/invalid_constant.rs:35:44: 35:65
Deinit(_8); // scope 6 at $DIR/invalid_constant.rs:35:44: 35:65
(_8.0: u32) = const 0_u32; // scope 6 at $DIR/invalid_constant.rs:35:44: 35:65
nop; // scope 6 at $DIR/invalid_constant.rs:35:44: 35:71
nop; // scope 3 at $DIR/invalid_constant.rs:35:34: 35:74

View file

@ -11,6 +11,8 @@
StorageLive(_1); // scope 0 at $DIR/issue-66971.rs:16:5: 16:23
StorageLive(_2); // scope 0 at $DIR/issue-66971.rs:16:12: 16:22
StorageLive(_3); // scope 0 at $DIR/issue-66971.rs:16:13: 16:15
nop; // scope 0 at $DIR/issue-66971.rs:16:13: 16:15
Deinit(_2); // scope 0 at $DIR/issue-66971.rs:16:12: 16:22
nop; // scope 0 at $DIR/issue-66971.rs:16:12: 16:22
(_2.1: u8) = const 0_u8; // scope 0 at $DIR/issue-66971.rs:16:12: 16:22
(_2.2: u8) = const 0_u8; // scope 0 at $DIR/issue-66971.rs:16:12: 16:22

View file

@ -11,8 +11,10 @@
StorageLive(_1); // scope 0 at $DIR/issue-67019.rs:11:5: 11:20
StorageLive(_2); // scope 0 at $DIR/issue-67019.rs:11:10: 11:19
StorageLive(_3); // scope 0 at $DIR/issue-67019.rs:11:11: 11:17
Deinit(_3); // scope 0 at $DIR/issue-67019.rs:11:11: 11:17
(_3.0: u8) = const 1_u8; // scope 0 at $DIR/issue-67019.rs:11:11: 11:17
(_3.1: u8) = const 2_u8; // scope 0 at $DIR/issue-67019.rs:11:11: 11:17
Deinit(_2); // scope 0 at $DIR/issue-67019.rs:11:10: 11:19
- (_2.0: (u8, u8)) = move _3; // scope 0 at $DIR/issue-67019.rs:11:10: 11:19
+ (_2.0: (u8, u8)) = const (1_u8, 2_u8); // scope 0 at $DIR/issue-67019.rs:11:10: 11:19
StorageDead(_3); // scope 0 at $DIR/issue-67019.rs:11:18: 11:19

View file

@ -14,6 +14,7 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/mutable_variable_aggregate.rs:5:9: 5:14
Deinit(_1); // scope 0 at $DIR/mutable_variable_aggregate.rs:5:17: 5:25
(_1.0: i32) = const 42_i32; // scope 0 at $DIR/mutable_variable_aggregate.rs:5:17: 5:25
(_1.1: i32) = const 43_i32; // scope 0 at $DIR/mutable_variable_aggregate.rs:5:17: 5:25
(_1.1: i32) = const 99_i32; // scope 1 at $DIR/mutable_variable_aggregate.rs:6:5: 6:13

View file

@ -18,6 +18,7 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:5:9: 5:14
Deinit(_1); // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:5:17: 5:25
(_1.0: i32) = const 42_i32; // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:5:17: 5:25
(_1.1: i32) = const 43_i32; // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:5:17: 5:25
StorageLive(_2); // scope 1 at $DIR/mutable_variable_aggregate_mut_ref.rs:6:9: 6:10

View file

@ -31,6 +31,7 @@
bb1: {
StorageLive(_2); // scope 1 at $DIR/mutable_variable_unprop_assign.rs:6:9: 6:14
Deinit(_2); // scope 1 at $DIR/mutable_variable_unprop_assign.rs:6:29: 6:35
(_2.0: i32) = const 1_i32; // scope 1 at $DIR/mutable_variable_unprop_assign.rs:6:29: 6:35
(_2.1: i32) = const 2_i32; // scope 1 at $DIR/mutable_variable_unprop_assign.rs:6:29: 6:35
StorageLive(_3); // scope 2 at $DIR/mutable_variable_unprop_assign.rs:7:11: 7:12

View file

@ -52,6 +52,7 @@
StorageDead(_4); // scope 1 at $DIR/optimizes_into_variable.rs:13:34: 13:35
StorageLive(_8); // scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10
StorageLive(_9); // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36
Deinit(_9); // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36
(_9.0: u32) = const 12_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36
(_9.1: u32) = const 42_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36
- _8 = (_9.1: u32); // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38

View file

@ -52,6 +52,7 @@
StorageDead(_4); // scope 1 at $DIR/optimizes_into_variable.rs:13:34: 13:35
StorageLive(_8); // scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10
StorageLive(_9); // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36
Deinit(_9); // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36
(_9.0: u32) = const 12_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36
(_9.1: u32) = const 42_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36
- _8 = (_9.1: u32); // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38

View file

@ -12,6 +12,7 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/tuple_literal_propagation.rs:3:9: 3:10
Deinit(_1); // scope 0 at $DIR/tuple_literal_propagation.rs:3:13: 3:19
(_1.0: u32) = const 1_u32; // scope 0 at $DIR/tuple_literal_propagation.rs:3:13: 3:19
(_1.1: u32) = const 2_u32; // scope 0 at $DIR/tuple_literal_propagation.rs:3:13: 3:19
StorageLive(_2); // scope 1 at $DIR/tuple_literal_propagation.rs:5:5: 5:15

View file

@ -19,6 +19,7 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/const_prop_miscompile.rs:12:9: 12:14
Deinit(_1); // scope 0 at $DIR/const_prop_miscompile.rs:12:17: 12:21
(_1.0: i32) = const 1_i32; // scope 0 at $DIR/const_prop_miscompile.rs:12:17: 12:21
StorageLive(_2); // scope 1 at $DIR/const_prop_miscompile.rs:13:5: 15:6
StorageLive(_3); // scope 2 at $DIR/const_prop_miscompile.rs:14:10: 14:22

View file

@ -16,6 +16,7 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/const_prop_miscompile.rs:5:9: 5:14
Deinit(_1); // scope 0 at $DIR/const_prop_miscompile.rs:5:17: 5:21
(_1.0: i32) = const 1_i32; // scope 0 at $DIR/const_prop_miscompile.rs:5:17: 5:21
StorageLive(_2); // scope 1 at $DIR/const_prop_miscompile.rs:6:6: 6:14
_2 = &mut (_1.0: i32); // scope 1 at $DIR/const_prop_miscompile.rs:6:6: 6:14

View file

@ -10,6 +10,7 @@
StorageLive(_2); // scope 0 at $DIR/deaggregator_test.rs:9:14: 9:15
_2 = _1; // scope 0 at $DIR/deaggregator_test.rs:9:14: 9:15
- _0 = Baz { x: move _2, y: const 0f32, z: const false }; // scope 0 at $DIR/deaggregator_test.rs:9:5: 9:35
+ Deinit(_0); // scope 0 at $DIR/deaggregator_test.rs:9:5: 9:35
+ (_0.0: usize) = move _2; // scope 0 at $DIR/deaggregator_test.rs:9:5: 9:35
+ (_0.1: f32) = const 0f32; // scope 0 at $DIR/deaggregator_test.rs:9:5: 9:35
+ (_0.2: bool) = const false; // scope 0 at $DIR/deaggregator_test.rs:9:5: 9:35

View file

@ -10,6 +10,7 @@
StorageLive(_2); // scope 0 at $DIR/deaggregator_test_enum.rs:8:19: 8:20
_2 = _1; // scope 0 at $DIR/deaggregator_test_enum.rs:8:19: 8:20
- _0 = Baz::Foo { x: move _2 }; // scope 0 at $DIR/deaggregator_test_enum.rs:8:5: 8:22
+ Deinit(_0); // scope 0 at $DIR/deaggregator_test_enum.rs:8:5: 8:22
+ ((_0 as Foo).0: usize) = move _2; // scope 0 at $DIR/deaggregator_test_enum.rs:8:5: 8:22
+ discriminant(_0) = 1; // scope 0 at $DIR/deaggregator_test_enum.rs:8:5: 8:22
StorageDead(_2); // scope 0 at $DIR/deaggregator_test_enum.rs:8:21: 8:22

View file

@ -19,6 +19,7 @@
StorageLive(_4); // scope 0 at $DIR/deaggregator_test_enum_2.rs:11:16: 11:17
_4 = _2; // scope 0 at $DIR/deaggregator_test_enum_2.rs:11:16: 11:17
- _0 = Foo::A(move _4); // scope 0 at $DIR/deaggregator_test_enum_2.rs:11:9: 11:18
+ Deinit(_0); // scope 0 at $DIR/deaggregator_test_enum_2.rs:11:9: 11:18
+ ((_0 as A).0: i32) = move _4; // scope 0 at $DIR/deaggregator_test_enum_2.rs:11:9: 11:18
+ discriminant(_0) = 0; // scope 0 at $DIR/deaggregator_test_enum_2.rs:11:9: 11:18
StorageDead(_4); // scope 0 at $DIR/deaggregator_test_enum_2.rs:11:17: 11:18
@ -29,6 +30,7 @@
StorageLive(_5); // scope 0 at $DIR/deaggregator_test_enum_2.rs:13:16: 13:17
_5 = _2; // scope 0 at $DIR/deaggregator_test_enum_2.rs:13:16: 13:17
- _0 = Foo::B(move _5); // scope 0 at $DIR/deaggregator_test_enum_2.rs:13:9: 13:18
+ Deinit(_0); // scope 0 at $DIR/deaggregator_test_enum_2.rs:13:9: 13:18
+ ((_0 as B).0: i32) = move _5; // scope 0 at $DIR/deaggregator_test_enum_2.rs:13:9: 13:18
+ discriminant(_0) = 1; // scope 0 at $DIR/deaggregator_test_enum_2.rs:13:9: 13:18
StorageDead(_5); // scope 0 at $DIR/deaggregator_test_enum_2.rs:13:17: 13:18

View file

@ -14,6 +14,7 @@
StorageLive(_3); // scope 0 at $DIR/deaggregator_test_multiple.rs:10:13: 10:14
_3 = _1; // scope 0 at $DIR/deaggregator_test_multiple.rs:10:13: 10:14
- _2 = Foo::A(move _3); // scope 0 at $DIR/deaggregator_test_multiple.rs:10:6: 10:15
+ Deinit(_2); // scope 0 at $DIR/deaggregator_test_multiple.rs:10:6: 10:15
+ ((_2 as A).0: i32) = move _3; // scope 0 at $DIR/deaggregator_test_multiple.rs:10:6: 10:15
+ discriminant(_2) = 0; // scope 0 at $DIR/deaggregator_test_multiple.rs:10:6: 10:15
StorageDead(_3); // scope 0 at $DIR/deaggregator_test_multiple.rs:10:14: 10:15
@ -21,6 +22,7 @@
StorageLive(_5); // scope 0 at $DIR/deaggregator_test_multiple.rs:10:24: 10:25
_5 = _1; // scope 0 at $DIR/deaggregator_test_multiple.rs:10:24: 10:25
- _4 = Foo::A(move _5); // scope 0 at $DIR/deaggregator_test_multiple.rs:10:17: 10:26
+ Deinit(_4); // scope 0 at $DIR/deaggregator_test_multiple.rs:10:17: 10:26
+ ((_4 as A).0: i32) = move _5; // scope 0 at $DIR/deaggregator_test_multiple.rs:10:17: 10:26
+ discriminant(_4) = 0; // scope 0 at $DIR/deaggregator_test_multiple.rs:10:17: 10:26
StorageDead(_5); // scope 0 at $DIR/deaggregator_test_multiple.rs:10:25: 10:26

View file

@ -25,11 +25,13 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/derefer_test.rs:3:9: 3:14
Deinit(_1); // scope 0 at $DIR/derefer_test.rs:3:17: 3:24
(_1.0: i32) = const 42_i32; // scope 0 at $DIR/derefer_test.rs:3:17: 3:24
(_1.1: i32) = const 43_i32; // scope 0 at $DIR/derefer_test.rs:3:17: 3:24
StorageLive(_2); // scope 1 at $DIR/derefer_test.rs:4:9: 4:14
StorageLive(_3); // scope 1 at $DIR/derefer_test.rs:4:22: 4:28
_3 = &mut _1; // scope 1 at $DIR/derefer_test.rs:4:22: 4:28
Deinit(_2); // scope 1 at $DIR/derefer_test.rs:4:17: 4:29
(_2.0: i32) = const 99_i32; // scope 1 at $DIR/derefer_test.rs:4:17: 4:29
(_2.1: &mut (i32, i32)) = move _3; // scope 1 at $DIR/derefer_test.rs:4:17: 4:29
StorageDead(_3); // scope 1 at $DIR/derefer_test.rs:4:28: 4:29

View file

@ -39,23 +39,27 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/derefer_test_multiple.rs:3:9: 3:14
Deinit(_1); // scope 0 at $DIR/derefer_test_multiple.rs:3:17: 3:25
(_1.0: i32) = const 42_i32; // scope 0 at $DIR/derefer_test_multiple.rs:3:17: 3:25
(_1.1: i32) = const 43_i32; // scope 0 at $DIR/derefer_test_multiple.rs:3:17: 3:25
StorageLive(_2); // scope 1 at $DIR/derefer_test_multiple.rs:4:9: 4:14
StorageLive(_3); // scope 1 at $DIR/derefer_test_multiple.rs:4:22: 4:28
_3 = &mut _1; // scope 1 at $DIR/derefer_test_multiple.rs:4:22: 4:28
Deinit(_2); // scope 1 at $DIR/derefer_test_multiple.rs:4:17: 4:29
(_2.0: i32) = const 99_i32; // scope 1 at $DIR/derefer_test_multiple.rs:4:17: 4:29
(_2.1: &mut (i32, i32)) = move _3; // scope 1 at $DIR/derefer_test_multiple.rs:4:17: 4:29
StorageDead(_3); // scope 1 at $DIR/derefer_test_multiple.rs:4:28: 4:29
StorageLive(_4); // scope 2 at $DIR/derefer_test_multiple.rs:5:9: 5:14
StorageLive(_5); // scope 2 at $DIR/derefer_test_multiple.rs:5:22: 5:28
_5 = &mut _2; // scope 2 at $DIR/derefer_test_multiple.rs:5:22: 5:28
Deinit(_4); // scope 2 at $DIR/derefer_test_multiple.rs:5:17: 5:29
(_4.0: i32) = const 11_i32; // scope 2 at $DIR/derefer_test_multiple.rs:5:17: 5:29
(_4.1: &mut (i32, &mut (i32, i32))) = move _5; // scope 2 at $DIR/derefer_test_multiple.rs:5:17: 5:29
StorageDead(_5); // scope 2 at $DIR/derefer_test_multiple.rs:5:28: 5:29
StorageLive(_6); // scope 3 at $DIR/derefer_test_multiple.rs:6:9: 6:14
StorageLive(_7); // scope 3 at $DIR/derefer_test_multiple.rs:6:22: 6:28
_7 = &mut _4; // scope 3 at $DIR/derefer_test_multiple.rs:6:22: 6:28
Deinit(_6); // scope 3 at $DIR/derefer_test_multiple.rs:6:17: 6:29
(_6.0: i32) = const 13_i32; // scope 3 at $DIR/derefer_test_multiple.rs:6:17: 6:29
(_6.1: &mut (i32, &mut (i32, &mut (i32, i32)))) = move _7; // scope 3 at $DIR/derefer_test_multiple.rs:6:17: 6:29
StorageDead(_7); // scope 3 at $DIR/derefer_test_multiple.rs:6:28: 6:29

View file

@ -29,6 +29,7 @@
}
bb1: {
Deinit(_1); // scope 0 at $DIR/union.rs:13:14: 13:30
- (_1.0: u32) = move _2; // scope 0 at $DIR/union.rs:13:14: 13:30
- StorageDead(_2); // scope 0 at $DIR/union.rs:13:29: 13:30
+ nop; // scope 0 at $DIR/union.rs:13:14: 13:30

View file

@ -25,6 +25,7 @@
_4 = _1; // scope 0 at $DIR/early_otherwise_branch.rs:4:12: 4:13
StorageLive(_5); // scope 0 at $DIR/early_otherwise_branch.rs:4:15: 4:16
_5 = _2; // scope 0 at $DIR/early_otherwise_branch.rs:4:15: 4:16
Deinit(_3); // scope 0 at $DIR/early_otherwise_branch.rs:4:11: 4:17
(_3.0: std::option::Option<u32>) = move _4; // scope 0 at $DIR/early_otherwise_branch.rs:4:11: 4:17
(_3.1: std::option::Option<u32>) = move _5; // scope 0 at $DIR/early_otherwise_branch.rs:4:11: 4:17
StorageDead(_5); // scope 0 at $DIR/early_otherwise_branch.rs:4:16: 4:17

View file

@ -26,6 +26,7 @@
_4 = _1; // scope 0 at $DIR/early_otherwise_branch.rs:12:12: 12:13
StorageLive(_5); // scope 0 at $DIR/early_otherwise_branch.rs:12:15: 12:16
_5 = _2; // scope 0 at $DIR/early_otherwise_branch.rs:12:15: 12:16
Deinit(_3); // scope 0 at $DIR/early_otherwise_branch.rs:12:11: 12:17
(_3.0: std::option::Option<u32>) = move _4; // scope 0 at $DIR/early_otherwise_branch.rs:12:11: 12:17
(_3.1: std::option::Option<u32>) = move _5; // scope 0 at $DIR/early_otherwise_branch.rs:12:11: 12:17
StorageDead(_5); // scope 0 at $DIR/early_otherwise_branch.rs:12:16: 12:17

View file

@ -25,6 +25,7 @@
_4 = _1; // scope 0 at $DIR/early_otherwise_branch.rs:22:12: 22:13
StorageLive(_5); // scope 0 at $DIR/early_otherwise_branch.rs:22:15: 22:16
_5 = _2; // scope 0 at $DIR/early_otherwise_branch.rs:22:15: 22:16
Deinit(_3); // scope 0 at $DIR/early_otherwise_branch.rs:22:11: 22:17
(_3.0: std::option::Option<u32>) = move _4; // scope 0 at $DIR/early_otherwise_branch.rs:22:11: 22:17
(_3.1: std::option::Option<bool>) = move _5; // scope 0 at $DIR/early_otherwise_branch.rs:22:11: 22:17
StorageDead(_5); // scope 0 at $DIR/early_otherwise_branch.rs:22:16: 22:17

View file

@ -34,6 +34,7 @@
_6 = _2; // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:5:15: 5:16
StorageLive(_7); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:5:18: 5:19
_7 = _3; // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:5:18: 5:19
Deinit(_4); // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:5:11: 5:20
(_4.0: std::option::Option<u32>) = move _5; // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:5:11: 5:20
(_4.1: std::option::Option<u32>) = move _6; // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:5:11: 5:20
(_4.2: std::option::Option<u32>) = move _7; // scope 0 at $DIR/early_otherwise_branch_3_element_tuple.rs:5:11: 5:20

View file

@ -74,6 +74,7 @@
+ (_4.0: &ViewportPercentageLength) = _1; // scope 0 at $DIR/early_otherwise_branch_68867.rs:21:15: 21:16
StorageLive(_6); // scope 0 at $DIR/early_otherwise_branch_68867.rs:21:18: 21:23
_6 = _2; // scope 0 at $DIR/early_otherwise_branch_68867.rs:21:18: 21:23
Deinit(_4); // scope 0 at $DIR/early_otherwise_branch_68867.rs:21:14: 21:24
- (_4.0: &ViewportPercentageLength) = move _5; // scope 0 at $DIR/early_otherwise_branch_68867.rs:21:14: 21:24
+ nop; // scope 0 at $DIR/early_otherwise_branch_68867.rs:21:14: 21:24
(_4.1: &ViewportPercentageLength) = move _6; // scope 0 at $DIR/early_otherwise_branch_68867.rs:21:14: 21:24
@ -98,6 +99,8 @@
- bb2: {
+ StorageDead(_35); // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:25: 26:27
StorageLive(_33); // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:25: 26:27
- nop; // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:25: 26:27
Deinit(_0); // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:21: 26:28
- nop; // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:21: 26:28
discriminant(_0) = 1; // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:21: 26:28
StorageDead(_33); // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:27: 26:28
@ -121,6 +124,7 @@
+ ((((_0 as Ok).0: ViewportPercentageLength) as Vw).0: f32) = Add(move _15, move _16); // scope 1 at $DIR/early_otherwise_branch_68867.rs:22:38: 22:49
+ nop; // scope 1 at $DIR/early_otherwise_branch_68867.rs:22:48: 22:49
+ nop; // scope 1 at $DIR/early_otherwise_branch_68867.rs:22:48: 22:49
+ Deinit(((_0 as Ok).0: ViewportPercentageLength)); // scope 1 at $DIR/early_otherwise_branch_68867.rs:22:35: 22:50
+ nop; // scope 1 at $DIR/early_otherwise_branch_68867.rs:22:35: 22:50
+ discriminant(((_0 as Ok).0: ViewportPercentageLength)) = 0; // scope 1 at $DIR/early_otherwise_branch_68867.rs:22:35: 22:50
+ nop; // scope 1 at $DIR/early_otherwise_branch_68867.rs:22:49: 22:50
@ -144,6 +148,7 @@
+ ((((_0 as Ok).0: ViewportPercentageLength) as Vh).0: f32) = Add(move _20, move _21); // scope 2 at $DIR/early_otherwise_branch_68867.rs:23:38: 23:49
+ nop; // scope 2 at $DIR/early_otherwise_branch_68867.rs:23:48: 23:49
+ nop; // scope 2 at $DIR/early_otherwise_branch_68867.rs:23:48: 23:49
+ Deinit(((_0 as Ok).0: ViewportPercentageLength)); // scope 2 at $DIR/early_otherwise_branch_68867.rs:23:35: 23:50
+ nop; // scope 2 at $DIR/early_otherwise_branch_68867.rs:23:35: 23:50
+ discriminant(((_0 as Ok).0: ViewportPercentageLength)) = 1; // scope 2 at $DIR/early_otherwise_branch_68867.rs:23:35: 23:50
+ nop; // scope 2 at $DIR/early_otherwise_branch_68867.rs:23:49: 23:50
@ -167,6 +172,7 @@
+ ((((_0 as Ok).0: ViewportPercentageLength) as Vmin).0: f32) = Add(move _25, move _26); // scope 3 at $DIR/early_otherwise_branch_68867.rs:24:44: 24:55
+ nop; // scope 3 at $DIR/early_otherwise_branch_68867.rs:24:54: 24:55
+ nop; // scope 3 at $DIR/early_otherwise_branch_68867.rs:24:54: 24:55
+ Deinit(((_0 as Ok).0: ViewportPercentageLength)); // scope 3 at $DIR/early_otherwise_branch_68867.rs:24:39: 24:56
+ nop; // scope 3 at $DIR/early_otherwise_branch_68867.rs:24:39: 24:56
+ discriminant(((_0 as Ok).0: ViewportPercentageLength)) = 2; // scope 3 at $DIR/early_otherwise_branch_68867.rs:24:39: 24:56
+ nop; // scope 3 at $DIR/early_otherwise_branch_68867.rs:24:55: 24:56
@ -190,6 +196,7 @@
+ ((((_0 as Ok).0: ViewportPercentageLength) as Vmax).0: f32) = Add(move _30, move _31); // scope 4 at $DIR/early_otherwise_branch_68867.rs:25:44: 25:55
+ nop; // scope 4 at $DIR/early_otherwise_branch_68867.rs:25:54: 25:55
+ nop; // scope 4 at $DIR/early_otherwise_branch_68867.rs:25:54: 25:55
+ Deinit(((_0 as Ok).0: ViewportPercentageLength)); // scope 4 at $DIR/early_otherwise_branch_68867.rs:25:39: 25:56
+ nop; // scope 4 at $DIR/early_otherwise_branch_68867.rs:25:39: 25:56
+ discriminant(((_0 as Ok).0: ViewportPercentageLength)) = 3; // scope 4 at $DIR/early_otherwise_branch_68867.rs:25:39: 25:56
+ nop; // scope 4 at $DIR/early_otherwise_branch_68867.rs:25:55: 25:56
@ -211,6 +218,7 @@
- _14 = Add(move _15, move _16); // scope 1 at $DIR/early_otherwise_branch_68867.rs:22:38: 22:49
- StorageDead(_16); // scope 1 at $DIR/early_otherwise_branch_68867.rs:22:48: 22:49
- StorageDead(_15); // scope 1 at $DIR/early_otherwise_branch_68867.rs:22:48: 22:49
- Deinit(_3); // scope 1 at $DIR/early_otherwise_branch_68867.rs:22:35: 22:50
- ((_3 as Vw).0: f32) = move _14; // scope 1 at $DIR/early_otherwise_branch_68867.rs:22:35: 22:50
- discriminant(_3) = 0; // scope 1 at $DIR/early_otherwise_branch_68867.rs:22:35: 22:50
- StorageDead(_14); // scope 1 at $DIR/early_otherwise_branch_68867.rs:22:49: 22:50
@ -232,6 +240,7 @@
- _19 = Add(move _20, move _21); // scope 2 at $DIR/early_otherwise_branch_68867.rs:23:38: 23:49
- StorageDead(_21); // scope 2 at $DIR/early_otherwise_branch_68867.rs:23:48: 23:49
- StorageDead(_20); // scope 2 at $DIR/early_otherwise_branch_68867.rs:23:48: 23:49
- Deinit(_3); // scope 2 at $DIR/early_otherwise_branch_68867.rs:23:35: 23:50
- ((_3 as Vh).0: f32) = move _19; // scope 2 at $DIR/early_otherwise_branch_68867.rs:23:35: 23:50
- discriminant(_3) = 1; // scope 2 at $DIR/early_otherwise_branch_68867.rs:23:35: 23:50
- StorageDead(_19); // scope 2 at $DIR/early_otherwise_branch_68867.rs:23:49: 23:50
@ -253,6 +262,7 @@
- _24 = Add(move _25, move _26); // scope 3 at $DIR/early_otherwise_branch_68867.rs:24:44: 24:55
- StorageDead(_26); // scope 3 at $DIR/early_otherwise_branch_68867.rs:24:54: 24:55
- StorageDead(_25); // scope 3 at $DIR/early_otherwise_branch_68867.rs:24:54: 24:55
- Deinit(_3); // scope 3 at $DIR/early_otherwise_branch_68867.rs:24:39: 24:56
- ((_3 as Vmin).0: f32) = move _24; // scope 3 at $DIR/early_otherwise_branch_68867.rs:24:39: 24:56
- discriminant(_3) = 2; // scope 3 at $DIR/early_otherwise_branch_68867.rs:24:39: 24:56
- StorageDead(_24); // scope 3 at $DIR/early_otherwise_branch_68867.rs:24:55: 24:56
@ -274,6 +284,7 @@
- _29 = Add(move _30, move _31); // scope 4 at $DIR/early_otherwise_branch_68867.rs:25:44: 25:55
- StorageDead(_31); // scope 4 at $DIR/early_otherwise_branch_68867.rs:25:54: 25:55
- StorageDead(_30); // scope 4 at $DIR/early_otherwise_branch_68867.rs:25:54: 25:55
- Deinit(_3); // scope 4 at $DIR/early_otherwise_branch_68867.rs:25:39: 25:56
- ((_3 as Vmax).0: f32) = move _29; // scope 4 at $DIR/early_otherwise_branch_68867.rs:25:39: 25:56
- discriminant(_3) = 3; // scope 4 at $DIR/early_otherwise_branch_68867.rs:25:39: 25:56
- StorageDead(_29); // scope 4 at $DIR/early_otherwise_branch_68867.rs:25:55: 25:56
@ -283,6 +294,7 @@
- }
-
- bb10: {
Deinit(_0); // scope 0 at $DIR/early_otherwise_branch_68867.rs:21:5: 27:7
- ((_0 as Ok).0: ViewportPercentageLength) = move _3; // scope 0 at $DIR/early_otherwise_branch_68867.rs:21:5: 27:7
+ nop; // scope 0 at $DIR/early_otherwise_branch_68867.rs:21:5: 27:7
discriminant(_0) = 0; // scope 0 at $DIR/early_otherwise_branch_68867.rs:21:5: 27:7

View file

@ -62,6 +62,7 @@
_5 = _1; // scope 0 at $DIR/early_otherwise_branch_68867.rs:21:15: 21:16
StorageLive(_6); // scope 0 at $DIR/early_otherwise_branch_68867.rs:21:18: 21:23
_6 = _2; // scope 0 at $DIR/early_otherwise_branch_68867.rs:21:18: 21:23
Deinit(_4); // scope 0 at $DIR/early_otherwise_branch_68867.rs:21:14: 21:24
(_4.0: &ViewportPercentageLength) = move _5; // scope 0 at $DIR/early_otherwise_branch_68867.rs:21:14: 21:24
(_4.1: &ViewportPercentageLength) = move _6; // scope 0 at $DIR/early_otherwise_branch_68867.rs:21:14: 21:24
StorageDead(_6); // scope 0 at $DIR/early_otherwise_branch_68867.rs:21:23: 21:24
@ -84,6 +85,8 @@
- bb2: {
+ StorageDead(_35); // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:25: 26:27
StorageLive(_33); // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:25: 26:27
- nop; // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:25: 26:27
Deinit(_0); // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:21: 26:28
- nop; // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:21: 26:28
discriminant(_0) = 1; // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:21: 26:28
StorageDead(_33); // scope 0 at $DIR/early_otherwise_branch_68867.rs:26:27: 26:28
@ -121,6 +124,7 @@
_14 = Add(move _15, move _16); // scope 1 at $DIR/early_otherwise_branch_68867.rs:22:38: 22:49
StorageDead(_16); // scope 1 at $DIR/early_otherwise_branch_68867.rs:22:48: 22:49
StorageDead(_15); // scope 1 at $DIR/early_otherwise_branch_68867.rs:22:48: 22:49
Deinit(_3); // scope 1 at $DIR/early_otherwise_branch_68867.rs:22:35: 22:50
((_3 as Vw).0: f32) = move _14; // scope 1 at $DIR/early_otherwise_branch_68867.rs:22:35: 22:50
discriminant(_3) = 0; // scope 1 at $DIR/early_otherwise_branch_68867.rs:22:35: 22:50
StorageDead(_14); // scope 1 at $DIR/early_otherwise_branch_68867.rs:22:49: 22:50
@ -144,6 +148,7 @@
_19 = Add(move _20, move _21); // scope 2 at $DIR/early_otherwise_branch_68867.rs:23:38: 23:49
StorageDead(_21); // scope 2 at $DIR/early_otherwise_branch_68867.rs:23:48: 23:49
StorageDead(_20); // scope 2 at $DIR/early_otherwise_branch_68867.rs:23:48: 23:49
Deinit(_3); // scope 2 at $DIR/early_otherwise_branch_68867.rs:23:35: 23:50
((_3 as Vh).0: f32) = move _19; // scope 2 at $DIR/early_otherwise_branch_68867.rs:23:35: 23:50
discriminant(_3) = 1; // scope 2 at $DIR/early_otherwise_branch_68867.rs:23:35: 23:50
StorageDead(_19); // scope 2 at $DIR/early_otherwise_branch_68867.rs:23:49: 23:50
@ -167,6 +172,7 @@
_24 = Add(move _25, move _26); // scope 3 at $DIR/early_otherwise_branch_68867.rs:24:44: 24:55
StorageDead(_26); // scope 3 at $DIR/early_otherwise_branch_68867.rs:24:54: 24:55
StorageDead(_25); // scope 3 at $DIR/early_otherwise_branch_68867.rs:24:54: 24:55
Deinit(_3); // scope 3 at $DIR/early_otherwise_branch_68867.rs:24:39: 24:56
((_3 as Vmin).0: f32) = move _24; // scope 3 at $DIR/early_otherwise_branch_68867.rs:24:39: 24:56
discriminant(_3) = 2; // scope 3 at $DIR/early_otherwise_branch_68867.rs:24:39: 24:56
StorageDead(_24); // scope 3 at $DIR/early_otherwise_branch_68867.rs:24:55: 24:56
@ -190,6 +196,7 @@
_29 = Add(move _30, move _31); // scope 4 at $DIR/early_otherwise_branch_68867.rs:25:44: 25:55
StorageDead(_31); // scope 4 at $DIR/early_otherwise_branch_68867.rs:25:54: 25:55
StorageDead(_30); // scope 4 at $DIR/early_otherwise_branch_68867.rs:25:54: 25:55
Deinit(_3); // scope 4 at $DIR/early_otherwise_branch_68867.rs:25:39: 25:56
((_3 as Vmax).0: f32) = move _29; // scope 4 at $DIR/early_otherwise_branch_68867.rs:25:39: 25:56
discriminant(_3) = 3; // scope 4 at $DIR/early_otherwise_branch_68867.rs:25:39: 25:56
StorageDead(_29); // scope 4 at $DIR/early_otherwise_branch_68867.rs:25:55: 25:56
@ -201,6 +208,7 @@
- bb10: {
+ bb6: {
Deinit(_0); // scope 0 at $DIR/early_otherwise_branch_68867.rs:21:5: 27:7
((_0 as Ok).0: ViewportPercentageLength) = move _3; // scope 0 at $DIR/early_otherwise_branch_68867.rs:21:5: 27:7
discriminant(_0) = 0; // scope 0 at $DIR/early_otherwise_branch_68867.rs:21:5: 27:7
StorageDead(_3); // scope 0 at $DIR/early_otherwise_branch_68867.rs:27:6: 27:7

View file

@ -32,6 +32,7 @@
_4 = _1; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:12: 8:13
StorageLive(_5); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:15: 8:16
_5 = _2; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:15: 8:16
Deinit(_3); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:11: 8:17
(_3.0: std::option::Option<u32>) = move _4; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:11: 8:17
(_3.1: std::option::Option<u32>) = move _5; // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:11: 8:17
StorageDead(_5); // scope 0 at $DIR/early_otherwise_branch_noopt.rs:8:16: 8:17

View file

@ -51,11 +51,13 @@
}
bb2: {
Deinit(_6); // scope 1 at $DIR/funky_arms.rs:21:17: 21:41
discriminant(_6) = 1; // scope 1 at $DIR/funky_arms.rs:21:17: 21:41
goto -> bb4; // scope 1 at $DIR/funky_arms.rs:21:17: 21:41
}
bb3: {
Deinit(_6); // scope 1 at $DIR/funky_arms.rs:20:18: 20:38
discriminant(_6) = 0; // scope 1 at $DIR/funky_arms.rs:20:18: 20:38
goto -> bb4; // scope 1 at $DIR/funky_arms.rs:20:18: 20:38
}

View file

@ -21,11 +21,14 @@ yields ()
bb0: {
StorageLive(_3); // scope 0 at $DIR/generator-storage-dead-unwind.rs:23:13: 23:14
Deinit(_3); // scope 0 at $DIR/generator-storage-dead-unwind.rs:23:17: 23:23
(_3.0: i32) = const 5_i32; // scope 0 at $DIR/generator-storage-dead-unwind.rs:23:17: 23:23
StorageLive(_4); // scope 1 at $DIR/generator-storage-dead-unwind.rs:24:13: 24:14
Deinit(_4); // scope 1 at $DIR/generator-storage-dead-unwind.rs:24:17: 24:23
(_4.0: i32) = const 6_i32; // scope 1 at $DIR/generator-storage-dead-unwind.rs:24:17: 24:23
StorageLive(_5); // scope 2 at $DIR/generator-storage-dead-unwind.rs:25:9: 25:14
StorageLive(_6); // scope 2 at $DIR/generator-storage-dead-unwind.rs:25:9: 25:14
Deinit(_6); // scope 2 at $DIR/generator-storage-dead-unwind.rs:25:9: 25:14
_5 = yield(move _6) -> [resume: bb1, drop: bb5]; // scope 2 at $DIR/generator-storage-dead-unwind.rs:25:9: 25:14
}

View file

@ -1,13 +1,17 @@
// MIR for `main::{closure#0}` 0 generator_resume
/* generator_layout = GeneratorLayout {
field_tys: {},
field_tys: {
_0: HasDrop,
},
variant_fields: {
Unresumed(0): [],
Returned (1): [],
Panicked (2): [],
Suspend0 (3): [],
Suspend0 (3): [_0],
},
storage_conflicts: BitMatrix(1x1) {
(_0, _0),
},
storage_conflicts: BitMatrix(0x0) {},
} */
fn main::{closure#0}(_1: Pin<&mut [generator@$DIR/generator-tiny.rs:19:16: 25:6]>, _2: u8) -> GeneratorState<(), ()> {
@ -23,7 +27,7 @@ fn main::{closure#0}(_1: Pin<&mut [generator@$DIR/generator-tiny.rs:19:16: 25:6]
let _10: u8; // in scope 0 at $DIR/generator-tiny.rs:19:17: 19:19
let mut _11: u32; // in scope 0 at $DIR/generator-tiny.rs:19:16: 25:6
scope 1 {
debug _d => _3; // in scope 1 at $DIR/generator-tiny.rs:20:13: 20:15
debug _d => (((*(_1.0: &mut [generator@$DIR/generator-tiny.rs:19:16: 25:6])) as variant#3).0: HasDrop); // in scope 1 at $DIR/generator-tiny.rs:20:13: 20:15
}
bb0: {
@ -33,7 +37,8 @@ fn main::{closure#0}(_1: Pin<&mut [generator@$DIR/generator-tiny.rs:19:16: 25:6]
bb1: {
_10 = move _2; // scope 0 at $DIR/generator-tiny.rs:19:16: 25:6
StorageLive(_3); // scope 0 at $DIR/generator-tiny.rs:20:13: 20:15
nop; // scope 0 at $DIR/generator-tiny.rs:20:13: 20:15
Deinit((((*(_1.0: &mut [generator@$DIR/generator-tiny.rs:19:16: 25:6])) as variant#3).0: HasDrop)); // scope 0 at $DIR/generator-tiny.rs:20:18: 20:25
StorageLive(_4); // scope 1 at $DIR/generator-tiny.rs:21:9: 24:10
goto -> bb2; // scope 1 at $DIR/generator-tiny.rs:21:9: 24:10
}
@ -41,6 +46,8 @@ fn main::{closure#0}(_1: Pin<&mut [generator@$DIR/generator-tiny.rs:19:16: 25:6]
bb2: {
StorageLive(_6); // scope 1 at $DIR/generator-tiny.rs:22:13: 22:18
StorageLive(_7); // scope 1 at $DIR/generator-tiny.rs:22:13: 22:18
Deinit(_7); // scope 1 at $DIR/generator-tiny.rs:22:13: 22:18
Deinit(_0); // scope 1 at $DIR/generator-tiny.rs:22:13: 22:18
((_0 as Yielded).0: ()) = move _7; // scope 1 at $DIR/generator-tiny.rs:22:13: 22:18
discriminant(_0) = 0; // scope 1 at $DIR/generator-tiny.rs:22:13: 22:18
discriminant((*(_1.0: &mut [generator@$DIR/generator-tiny.rs:19:16: 25:6]))) = 3; // scope 1 at $DIR/generator-tiny.rs:22:13: 22:18
@ -64,7 +71,6 @@ fn main::{closure#0}(_1: Pin<&mut [generator@$DIR/generator-tiny.rs:19:16: 25:6]
}
bb5: {
StorageLive(_3); // scope 0 at $DIR/generator-tiny.rs:19:16: 25:6
StorageLive(_4); // scope 0 at $DIR/generator-tiny.rs:19:16: 25:6
StorageLive(_6); // scope 0 at $DIR/generator-tiny.rs:19:16: 25:6
StorageLive(_7); // scope 0 at $DIR/generator-tiny.rs:19:16: 25:6

View file

@ -13,6 +13,7 @@
StorageLive(_3); // scope 0 at $DIR/cycle.rs:6:5: 6:6
_3 = &_1; // scope 0 at $DIR/cycle.rs:6:5: 6:6
StorageLive(_4); // scope 0 at $DIR/cycle.rs:6:5: 6:8
Deinit(_4); // scope 0 at $DIR/cycle.rs:6:5: 6:8
_2 = <impl Fn() as Fn<()>>::call(move _3, move _4) -> [return: bb1, unwind: bb3]; // scope 0 at $DIR/cycle.rs:6:5: 6:8
// mir::Constant
// + span: $DIR/cycle.rs:6:5: 6:6

View file

@ -21,6 +21,7 @@ fn foo(_1: T, _2: i32) -> i32 {
bb0: {
StorageLive(_3); // scope 0 at $DIR/inline-closure.rs:11:9: 11:10
Deinit(_3); // scope 0 at $DIR/inline-closure.rs:11:13: 11:24
StorageLive(_4); // scope 1 at $DIR/inline-closure.rs:12:5: 12:6
_4 = &_3; // scope 1 at $DIR/inline-closure.rs:12:5: 12:6
StorageLive(_5); // scope 1 at $DIR/inline-closure.rs:12:5: 12:12
@ -28,6 +29,7 @@ fn foo(_1: T, _2: i32) -> i32 {
_6 = _2; // scope 1 at $DIR/inline-closure.rs:12:7: 12:8
StorageLive(_7); // scope 1 at $DIR/inline-closure.rs:12:10: 12:11
_7 = _2; // scope 1 at $DIR/inline-closure.rs:12:10: 12:11
Deinit(_5); // scope 1 at $DIR/inline-closure.rs:12:5: 12:12
(_5.0: i32) = move _6; // scope 1 at $DIR/inline-closure.rs:12:5: 12:12
(_5.1: i32) = move _7; // scope 1 at $DIR/inline-closure.rs:12:5: 12:12
StorageLive(_8); // scope 1 at $DIR/inline-closure.rs:12:5: 12:12

View file

@ -25,6 +25,7 @@ fn foo(_1: T, _2: &i32) -> i32 {
bb0: {
StorageLive(_3); // scope 0 at $DIR/inline-closure-borrows-arg.rs:12:9: 12:10
Deinit(_3); // scope 0 at $DIR/inline-closure-borrows-arg.rs:12:13: 15:6
StorageLive(_4); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:6
_4 = &_3; // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:6
StorageLive(_5); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12
@ -32,6 +33,7 @@ fn foo(_1: T, _2: &i32) -> i32 {
_6 = &(*_2); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:7: 16:8
StorageLive(_7); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:10: 16:11
_7 = &(*_2); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:10: 16:11
Deinit(_5); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12
(_5.0: &i32) = move _6; // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12
(_5.1: &i32) = move _7; // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12
StorageLive(_8); // scope 1 at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12

View file

@ -28,6 +28,7 @@ fn foo(_1: T, _2: i32) -> (i32, T) {
_4 = &_2; // scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24
StorageLive(_5); // scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24
_5 = &_1; // scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24
Deinit(_3); // scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24
(_3.0: &i32) = move _4; // scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24
(_3.1: &T) = move _5; // scope 0 at $DIR/inline-closure-captures.rs:11:13: 11:24
StorageDead(_5); // scope 0 at $DIR/inline-closure-captures.rs:11:23: 11:24
@ -37,6 +38,7 @@ fn foo(_1: T, _2: i32) -> (i32, T) {
StorageLive(_7); // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9
StorageLive(_8); // scope 1 at $DIR/inline-closure-captures.rs:12:7: 12:8
_8 = _2; // scope 1 at $DIR/inline-closure-captures.rs:12:7: 12:8
Deinit(_7); // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9
(_7.0: i32) = move _8; // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9
StorageLive(_9); // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9
_9 = move (_7.0: i32); // scope 1 at $DIR/inline-closure-captures.rs:12:5: 12:9
@ -44,6 +46,7 @@ fn foo(_1: T, _2: i32) -> (i32, T) {
_10 = (*((*_6).0: &i32)); // scope 2 at $DIR/inline-closure-captures.rs:11:19: 11:20
StorageLive(_11); // scope 2 at $DIR/inline-closure-captures.rs:11:22: 11:23
_11 = (*((*_6).1: &T)); // scope 2 at $DIR/inline-closure-captures.rs:11:22: 11:23
Deinit(_0); // scope 2 at $DIR/inline-closure-captures.rs:11:18: 11:24
(_0.0: i32) = move _10; // scope 2 at $DIR/inline-closure-captures.rs:11:18: 11:24
(_0.1: T) = move _11; // scope 2 at $DIR/inline-closure-captures.rs:11:18: 11:24
StorageDead(_11); // scope 2 at $DIR/inline-closure-captures.rs:11:23: 11:24

View file

@ -44,6 +44,7 @@
- }
-
- bb1: {
+ Deinit(_4); // scope 2 at $DIR/inline-generator.rs:15:5: 15:41
+ discriminant(_4) = 0; // scope 2 at $DIR/inline-generator.rs:15:5: 15:41
_3 = &mut _4; // scope 0 at $DIR/inline-generator.rs:9:23: 9:31
- _2 = Pin::<&mut [generator@$DIR/inline-generator.rs:15:5: 15:41]>::new(move _3) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/inline-generator.rs:9:14: 9:32
@ -58,6 +59,7 @@
+ _5 = move _3; // scope 4 at $SRC_DIR/core/src/pin.rs:LL:COL
+ StorageLive(_6); // scope 5 at $SRC_DIR/core/src/pin.rs:LL:COL
+ _6 = move _5; // scope 5 at $SRC_DIR/core/src/pin.rs:LL:COL
+ Deinit(_2); // scope 5 at $SRC_DIR/core/src/pin.rs:LL:COL
+ (_2.0: &mut [generator@$DIR/inline-generator.rs:15:5: 15:41]) = move _6; // scope 5 at $SRC_DIR/core/src/pin.rs:LL:COL
+ StorageDead(_6); // scope 5 at $SRC_DIR/core/src/pin.rs:LL:COL
+ StorageDead(_5); // scope 4 at $SRC_DIR/core/src/pin.rs:LL:COL
@ -113,6 +115,7 @@
+
+ bb6: {
+ StorageDead(_9); // scope 6 at $DIR/inline-generator.rs:15:38: 15:39
+ Deinit(_1); // scope 6 at $DIR/inline-generator.rs:15:11: 15:39
+ ((_1 as Yielded).0: i32) = move _8; // scope 6 at $DIR/inline-generator.rs:15:11: 15:39
+ discriminant(_1) = 0; // scope 6 at $DIR/inline-generator.rs:15:11: 15:39
+ discriminant((*(_2.0: &mut [generator@$DIR/inline-generator.rs:15:5: 15:41]))) = 3; // scope 6 at $DIR/inline-generator.rs:15:11: 15:39
@ -123,6 +126,7 @@
+ StorageLive(_8); // scope 6 at $DIR/inline-generator.rs:15:5: 15:41
+ _10 = move _7; // scope 6 at $DIR/inline-generator.rs:15:5: 15:41
+ StorageDead(_8); // scope 6 at $DIR/inline-generator.rs:15:38: 15:39
+ Deinit(_1); // scope 6 at $DIR/inline-generator.rs:15:41: 15:41
+ ((_1 as Complete).0: bool) = move _10; // scope 6 at $DIR/inline-generator.rs:15:41: 15:41
+ discriminant(_1) = 1; // scope 6 at $DIR/inline-generator.rs:15:41: 15:41
+ discriminant((*(_2.0: &mut [generator@$DIR/inline-generator.rs:15:5: 15:41]))) = 1; // scope 6 at $DIR/inline-generator.rs:15:41: 15:41

View file

@ -34,6 +34,7 @@
- (*_5) = Vec::<u32>::new() -> [return: bb2, unwind: bb5]; // scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43
+ StorageLive(_7); // scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43
+ _7 = &mut (*_5); // scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43
+ Deinit((*_7)); // scope 3 at $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
+ ((*_7).0: alloc::raw_vec::RawVec<u32>) = const alloc::raw_vec::RawVec::<u32> { ptr: Unique::<u32> { pointer: {0x4 as *const u32}, _marker: PhantomData::<u32> }, cap: 0_usize, alloc: std::alloc::Global }; // scope 3 at $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
// mir::Constant
- // + span: $DIR/inline-into-box-place.rs:8:33: 8:41

View file

@ -34,6 +34,7 @@
- (*_5) = Vec::<u32>::new() -> [return: bb2, unwind: bb5]; // scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43
+ StorageLive(_7); // scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43
+ _7 = &mut (*_5); // scope 0 at $DIR/inline-into-box-place.rs:8:33: 8:43
+ Deinit((*_7)); // scope 3 at $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
+ ((*_7).0: alloc::raw_vec::RawVec<u32>) = const alloc::raw_vec::RawVec::<u32> { ptr: Unique::<u32> { pointer: {0x4 as *const u32}, _marker: PhantomData::<u32> }, cap: 0_usize, alloc: std::alloc::Global }; // scope 3 at $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
// mir::Constant
- // + span: $DIR/inline-into-box-place.rs:8:33: 8:41

View file

@ -20,10 +20,13 @@ fn main() -> () {
bb0: {
StorageLive(_1); // scope 0 at $DIR/issue-76997-inline-scopes-parenting.rs:5:9: 5:10
Deinit(_1); // scope 0 at $DIR/issue-76997-inline-scopes-parenting.rs:5:13: 5:33
StorageLive(_2); // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:6
_2 = &_1; // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:6
StorageLive(_3); // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10
StorageLive(_4); // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:6:7: 6:9
Deinit(_4); // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:6:7: 6:9
Deinit(_3); // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10
(_3.0: ()) = move _4; // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10
StorageLive(_5); // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10
_5 = move (_3.0: ()); // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10

View file

@ -25,6 +25,7 @@
bb1: {
_3 = &_4; // scope 0 at $DIR/issue-78442.rs:11:5: 11:15
StorageLive(_5); // scope 0 at $DIR/issue-78442.rs:11:5: 11:17
Deinit(_5); // scope 0 at $DIR/issue-78442.rs:11:5: 11:17
- _2 = <fn() {foo} as Fn<()>>::call(move _3, move _5) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/issue-78442.rs:11:5: 11:17
- // mir::Constant
- // + span: $DIR/issue-78442.rs:11:5: 11:15

View file

@ -24,7 +24,7 @@
bb1: {
_3 = &_4; // scope 0 at $DIR/issue-78442.rs:11:5: 11:15
StorageLive(_5); // scope 0 at $DIR/issue-78442.rs:11:5: 11:17
nop; // scope 0 at $DIR/issue-78442.rs:11:5: 11:17
Deinit(_5); // scope 0 at $DIR/issue-78442.rs:11:5: 11:17
- _2 = <impl Fn() as Fn<()>>::call(move _3, move _5) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/issue-78442.rs:11:5: 11:17
+ _2 = <fn() {foo} as Fn<()>>::call(move _3, move _5) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/issue-78442.rs:11:5: 11:17
// mir::Constant

View file

@ -43,6 +43,7 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/issue-73223.rs:2:9: 2:14
StorageLive(_2); // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
Deinit(_2); // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
((_2 as Some).0: i32) = const 1_i32; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
discriminant(_2) = 1; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
StorageLive(_3); // scope 0 at $DIR/issue-73223.rs:3:14: 3:15
@ -53,6 +54,7 @@
StorageLive(_4); // scope 1 at $DIR/issue-73223.rs:7:9: 7:14
StorageLive(_5); // scope 1 at $DIR/issue-73223.rs:7:22: 7:27
_5 = _1; // scope 1 at $DIR/issue-73223.rs:7:22: 7:27
Deinit(_4); // scope 1 at $DIR/issue-73223.rs:7:17: 7:28
((_4 as Some).0: i32) = move _5; // scope 1 at $DIR/issue-73223.rs:7:17: 7:28
discriminant(_4) = 1; // scope 1 at $DIR/issue-73223.rs:7:17: 7:28
StorageDead(_5); // scope 1 at $DIR/issue-73223.rs:7:27: 7:28
@ -65,6 +67,7 @@
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: &i32, val: Unevaluated(main, [], Some(promoted[0])) }
_8 = _20; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
Deinit(_6); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
(_6.0: &i32) = move _7; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
(_6.1: &i32) = move _8; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_8); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
@ -86,6 +89,7 @@
bb1: {
StorageLive(_14); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
Deinit(_14); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
discriminant(_14) = 0; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_15); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_16); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
@ -96,6 +100,7 @@
_18 = _10; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_17 = _18; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_19); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
Deinit(_19); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
discriminant(_19) = 0; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
core::panicking::assert_failed::<i32, i32>(const core::panicking::AssertKind::Eq, move _15, move _17, move _19); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
// mir::Constant

View file

@ -43,6 +43,7 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/issue-73223.rs:2:9: 2:14
StorageLive(_2); // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
Deinit(_2); // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
((_2 as Some).0: i32) = const 1_i32; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
discriminant(_2) = 1; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
StorageLive(_3); // scope 0 at $DIR/issue-73223.rs:3:14: 3:15
@ -53,6 +54,7 @@
StorageLive(_4); // scope 1 at $DIR/issue-73223.rs:7:9: 7:14
StorageLive(_5); // scope 1 at $DIR/issue-73223.rs:7:22: 7:27
_5 = _1; // scope 1 at $DIR/issue-73223.rs:7:22: 7:27
Deinit(_4); // scope 1 at $DIR/issue-73223.rs:7:17: 7:28
((_4 as Some).0: i32) = move _5; // scope 1 at $DIR/issue-73223.rs:7:17: 7:28
discriminant(_4) = 1; // scope 1 at $DIR/issue-73223.rs:7:17: 7:28
StorageDead(_5); // scope 1 at $DIR/issue-73223.rs:7:27: 7:28
@ -65,6 +67,7 @@
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: &i32, val: Unevaluated(main, [], Some(promoted[0])) }
_8 = _20; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
Deinit(_6); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
(_6.0: &i32) = move _7; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
(_6.1: &i32) = move _8; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_8); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
@ -86,6 +89,7 @@
bb1: {
StorageLive(_14); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
Deinit(_14); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
discriminant(_14) = 0; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_15); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_16); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
@ -96,6 +100,7 @@
_18 = _10; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_17 = _18; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_19); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
Deinit(_19); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
discriminant(_19) = 0; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
core::panicking::assert_failed::<i32, i32>(const core::panicking::AssertKind::Eq, move _15, move _17, move _19); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
// mir::Constant

View file

@ -51,6 +51,7 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/issue-73223.rs:2:9: 2:14
StorageLive(_2); // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
Deinit(_2); // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
((_2 as Some).0: i32) = const 1_i32; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
discriminant(_2) = 1; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
_3 = const 1_isize; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
@ -73,6 +74,7 @@
StorageLive(_6); // scope 1 at $DIR/issue-73223.rs:7:9: 7:14
StorageLive(_7); // scope 1 at $DIR/issue-73223.rs:7:22: 7:27
_7 = _1; // scope 1 at $DIR/issue-73223.rs:7:22: 7:27
Deinit(_6); // scope 1 at $DIR/issue-73223.rs:7:17: 7:28
((_6 as Some).0: i32) = move _7; // scope 1 at $DIR/issue-73223.rs:7:17: 7:28
discriminant(_6) = 1; // scope 1 at $DIR/issue-73223.rs:7:17: 7:28
StorageDead(_7); // scope 1 at $DIR/issue-73223.rs:7:27: 7:28
@ -86,6 +88,7 @@
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: &i32, val: Unevaluated(main, [], Some(promoted[0])) }
_11 = _28; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
Deinit(_9); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
(_9.0: &i32) = move _10; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
(_9.1: &i32) = move _11; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_11); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
@ -110,6 +113,7 @@
bb3: {
StorageLive(_20); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
Deinit(_20); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
discriminant(_20) = 0; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_21); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_22); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
@ -126,6 +130,7 @@
_26 = _14; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_25 = _26; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_27); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
Deinit(_27); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
discriminant(_27) = 0; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
core::panicking::assert_failed::<i32, i32>(const core::panicking::AssertKind::Eq, move _23, move _25, move _27); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
// mir::Constant

View file

@ -51,6 +51,7 @@
bb0: {
StorageLive(_1); // scope 0 at $DIR/issue-73223.rs:2:9: 2:14
StorageLive(_2); // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
Deinit(_2); // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
((_2 as Some).0: i32) = const 1_i32; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
discriminant(_2) = 1; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
_3 = const 1_isize; // scope 0 at $DIR/issue-73223.rs:2:23: 2:30
@ -73,6 +74,7 @@
StorageLive(_6); // scope 1 at $DIR/issue-73223.rs:7:9: 7:14
StorageLive(_7); // scope 1 at $DIR/issue-73223.rs:7:22: 7:27
_7 = _1; // scope 1 at $DIR/issue-73223.rs:7:22: 7:27
Deinit(_6); // scope 1 at $DIR/issue-73223.rs:7:17: 7:28
((_6 as Some).0: i32) = move _7; // scope 1 at $DIR/issue-73223.rs:7:17: 7:28
discriminant(_6) = 1; // scope 1 at $DIR/issue-73223.rs:7:17: 7:28
StorageDead(_7); // scope 1 at $DIR/issue-73223.rs:7:27: 7:28
@ -86,6 +88,7 @@
// + span: $SRC_DIR/core/src/macros/mod.rs:LL:COL
// + literal: Const { ty: &i32, val: Unevaluated(main, [], Some(promoted[0])) }
_11 = _28; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
Deinit(_9); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
(_9.0: &i32) = move _10; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
(_9.1: &i32) = move _11; // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageDead(_11); // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
@ -110,6 +113,7 @@
bb3: {
StorageLive(_20); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
Deinit(_20); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
discriminant(_20) = 0; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_21); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_22); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
@ -126,6 +130,7 @@
_26 = _14; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
_25 = _26; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
StorageLive(_27); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
Deinit(_27); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
discriminant(_27) = 0; // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
core::panicking::assert_failed::<i32, i32>(const core::panicking::AssertKind::Eq, move _23, move _25, move _27); // scope 5 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
// mir::Constant

View file

@ -67,6 +67,7 @@
bb7: {
StorageDead(_6); // scope 4 at $DIR/issue-75439.rs:10:35: 10:36
Deinit(_0); // scope 1 at $DIR/issue-75439.rs:10:9: 10:39
((_0 as Some).0: [u8; 4]) = move _5; // scope 1 at $DIR/issue-75439.rs:10:9: 10:39
discriminant(_0) = 1; // scope 1 at $DIR/issue-75439.rs:10:9: 10:39
StorageDead(_5); // scope 1 at $DIR/issue-75439.rs:10:38: 10:39
@ -75,6 +76,7 @@
}
bb8: {
Deinit(_0); // scope 1 at $DIR/issue-75439.rs:12:9: 12:13
discriminant(_0) = 0; // scope 1 at $DIR/issue-75439.rs:12:9: 12:13
goto -> bb9; // scope 1 at $DIR/issue-75439.rs:9:5: 13:6
}

View file

@ -41,6 +41,7 @@
- _3 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:29:13: 29:22
- _4 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:30:13: 30:22
- _5 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:31:13: 31:21
- nop; // scope 4 at $DIR/matches_reduce_branches.rs:32:13: 32:15
- goto -> bb3; // scope 4 at $DIR/matches_reduce_branches.rs:32:13: 32:15
- }
-
@ -53,6 +54,7 @@
+ _3 = Eq(_11, const 7_i32); // scope 4 at $DIR/matches_reduce_branches.rs:22:13: 22:21
_4 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:23:13: 23:22
_5 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:24:13: 24:21
- nop; // scope 4 at $DIR/matches_reduce_branches.rs:25:13: 25:15
- goto -> bb3; // scope 4 at $DIR/matches_reduce_branches.rs:25:13: 25:15
- }
-
@ -67,6 +69,7 @@
_9 = _4; // scope 4 at $DIR/matches_reduce_branches.rs:36:12: 36:13
StorageLive(_10); // scope 4 at $DIR/matches_reduce_branches.rs:36:15: 36:16
_10 = _5; // scope 4 at $DIR/matches_reduce_branches.rs:36:15: 36:16
Deinit(_0); // scope 4 at $DIR/matches_reduce_branches.rs:36:5: 36:17
(_0.0: bool) = move _7; // scope 4 at $DIR/matches_reduce_branches.rs:36:5: 36:17
(_0.1: bool) = move _8; // scope 4 at $DIR/matches_reduce_branches.rs:36:5: 36:17
(_0.2: bool) = move _9; // scope 4 at $DIR/matches_reduce_branches.rs:36:5: 36:17

View file

@ -41,6 +41,7 @@
- _3 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:29:13: 29:22
- _4 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:30:13: 30:22
- _5 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:31:13: 31:21
- nop; // scope 4 at $DIR/matches_reduce_branches.rs:32:13: 32:15
- goto -> bb3; // scope 4 at $DIR/matches_reduce_branches.rs:32:13: 32:15
- }
-
@ -53,6 +54,7 @@
+ _3 = Eq(_11, const 7_i32); // scope 4 at $DIR/matches_reduce_branches.rs:22:13: 22:21
_4 = const false; // scope 4 at $DIR/matches_reduce_branches.rs:23:13: 23:22
_5 = const true; // scope 4 at $DIR/matches_reduce_branches.rs:24:13: 24:21
- nop; // scope 4 at $DIR/matches_reduce_branches.rs:25:13: 25:15
- goto -> bb3; // scope 4 at $DIR/matches_reduce_branches.rs:25:13: 25:15
- }
-
@ -67,6 +69,7 @@
_9 = _4; // scope 4 at $DIR/matches_reduce_branches.rs:36:12: 36:13
StorageLive(_10); // scope 4 at $DIR/matches_reduce_branches.rs:36:15: 36:16
_10 = _5; // scope 4 at $DIR/matches_reduce_branches.rs:36:15: 36:16
Deinit(_0); // scope 4 at $DIR/matches_reduce_branches.rs:36:5: 36:17
(_0.0: bool) = move _7; // scope 4 at $DIR/matches_reduce_branches.rs:36:5: 36:17
(_0.1: bool) = move _8; // scope 4 at $DIR/matches_reduce_branches.rs:36:5: 36:17
(_0.2: bool) = move _9; // scope 4 at $DIR/matches_reduce_branches.rs:36:5: 36:17

View file

@ -38,6 +38,7 @@
_1 = const 0_i32; // scope 0 at $DIR/remove_storage_markers.rs:7:19: 7:20
- StorageLive(_2); // scope 1 at $DIR/remove_storage_markers.rs:8:14: 8:19
- StorageLive(_3); // scope 1 at $DIR/remove_storage_markers.rs:8:14: 8:19
Deinit(_3); // scope 1 at $DIR/remove_storage_markers.rs:8:14: 8:19
(_3.0: i32) = const 0_i32; // scope 1 at $DIR/remove_storage_markers.rs:8:14: 8:19
(_3.1: i32) = const 10_i32; // scope 1 at $DIR/remove_storage_markers.rs:8:14: 8:19
_2 = move _3; // scope 4 at $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL

View file

@ -6,6 +6,8 @@ fn get_union() -> Foo {
bb0: {
StorageLive(_1); // scope 0 at $DIR/remove_zsts_dont_touch_unions.rs:13:14: 13:16
nop; // scope 0 at $DIR/remove_zsts_dont_touch_unions.rs:13:14: 13:16
Deinit(_0); // scope 0 at $DIR/remove_zsts_dont_touch_unions.rs:13:5: 13:18
(_0.0: ()) = move _1; // scope 0 at $DIR/remove_zsts_dont_touch_unions.rs:13:5: 13:18
StorageDead(_1); // scope 0 at $DIR/remove_zsts_dont_touch_unions.rs:13:17: 13:18
return; // scope 0 at $DIR/remove_zsts_dont_touch_unions.rs:14:2: 14:2

View file

@ -65,6 +65,7 @@
_9 = ((_3 as Continue).0: i32); // scope 0 at $DIR/separate_const_switch.rs:29:8: 29:10
_2 = _9; // scope 4 at $DIR/separate_const_switch.rs:29:8: 29:10
StorageDead(_9); // scope 0 at $DIR/separate_const_switch.rs:29:9: 29:10
Deinit(_0); // scope 0 at $DIR/separate_const_switch.rs:29:5: 29:11
((_0 as Ok).0: i32) = move _2; // scope 0 at $DIR/separate_const_switch.rs:29:5: 29:11
discriminant(_0) = 0; // scope 0 at $DIR/separate_const_switch.rs:29:5: 29:11
StorageDead(_2); // scope 0 at $DIR/separate_const_switch.rs:29:10: 29:11
@ -84,6 +85,7 @@
_18 = move _16; // scope 9 at $SRC_DIR/core/src/result.rs:LL:COL
_17 = move _18; // scope 10 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
StorageDead(_18); // scope 9 at $SRC_DIR/core/src/result.rs:LL:COL
Deinit(_0); // scope 9 at $SRC_DIR/core/src/result.rs:LL:COL
((_0 as Err).0: i32) = move _17; // scope 9 at $SRC_DIR/core/src/result.rs:LL:COL
discriminant(_0) = 1; // scope 9 at $SRC_DIR/core/src/result.rs:LL:COL
StorageDead(_17); // scope 9 at $SRC_DIR/core/src/result.rs:LL:COL
@ -101,9 +103,11 @@
StorageLive(_14); // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
StorageLive(_15); // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
_15 = move _13; // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
Deinit(_14); // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
((_14 as Err).0: i32) = move _15; // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
discriminant(_14) = 1; // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
StorageDead(_15); // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
Deinit(_3); // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
((_3 as Break).0: std::result::Result<std::convert::Infallible, i32>) = move _14; // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
discriminant(_3) = 1; // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
StorageDead(_14); // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
@ -125,6 +129,7 @@
_11 = move ((_4 as Ok).0: i32); // scope 5 at $SRC_DIR/core/src/result.rs:LL:COL
StorageLive(_12); // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL
_12 = move _11; // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL
Deinit(_3); // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL
((_3 as Continue).0: i32) = move _12; // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL
discriminant(_3) = 0; // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL
StorageDead(_12); // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL

View file

@ -63,9 +63,11 @@ fn identity(_1: Result<i32, i32>) -> Result<i32, i32> {
StorageLive(_12); // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
StorageLive(_13); // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
_13 = move _11; // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
Deinit(_12); // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
((_12 as Err).0: i32) = move _13; // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
discriminant(_12) = 1; // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
StorageDead(_13); // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
Deinit(_3); // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
((_3 as Break).0: std::result::Result<std::convert::Infallible, i32>) = move _12; // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
discriminant(_3) = 1; // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
StorageDead(_12); // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
@ -83,6 +85,7 @@ fn identity(_1: Result<i32, i32>) -> Result<i32, i32> {
_16 = move _14; // scope 9 at $SRC_DIR/core/src/result.rs:LL:COL
_15 = move _16; // scope 10 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
StorageDead(_16); // scope 9 at $SRC_DIR/core/src/result.rs:LL:COL
Deinit(_0); // scope 9 at $SRC_DIR/core/src/result.rs:LL:COL
((_0 as Err).0: i32) = move _15; // scope 9 at $SRC_DIR/core/src/result.rs:LL:COL
discriminant(_0) = 1; // scope 9 at $SRC_DIR/core/src/result.rs:LL:COL
StorageDead(_15); // scope 9 at $SRC_DIR/core/src/result.rs:LL:COL
@ -103,6 +106,7 @@ fn identity(_1: Result<i32, i32>) -> Result<i32, i32> {
_9 = move ((_4 as Ok).0: i32); // scope 5 at $SRC_DIR/core/src/result.rs:LL:COL
StorageLive(_10); // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL
_10 = move _9; // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL
Deinit(_3); // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL
((_3 as Continue).0: i32) = move _10; // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL
discriminant(_3) = 0; // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL
StorageDead(_10); // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL
@ -113,6 +117,7 @@ fn identity(_1: Result<i32, i32>) -> Result<i32, i32> {
_7 = ((_3 as Continue).0: i32); // scope 0 at $DIR/separate_const_switch.rs:29:8: 29:10
_2 = _7; // scope 4 at $DIR/separate_const_switch.rs:29:8: 29:10
StorageDead(_7); // scope 0 at $DIR/separate_const_switch.rs:29:9: 29:10
Deinit(_0); // scope 0 at $DIR/separate_const_switch.rs:29:5: 29:11
((_0 as Ok).0: i32) = move _2; // scope 0 at $DIR/separate_const_switch.rs:29:5: 29:11
discriminant(_0) = 0; // scope 0 at $DIR/separate_const_switch.rs:29:5: 29:11
StorageDead(_2); // scope 0 at $DIR/separate_const_switch.rs:29:10: 29:11

View file

@ -73,6 +73,7 @@
_9 = ((_3 as Continue).0: i32); // scope 0 at $DIR/separate_const_switch.rs:29:8: 29:10
_2 = _9; // scope 4 at $DIR/separate_const_switch.rs:29:8: 29:10
StorageDead(_9); // scope 0 at $DIR/separate_const_switch.rs:29:9: 29:10
Deinit(_0); // scope 0 at $DIR/separate_const_switch.rs:29:5: 29:11
((_0 as Ok).0: i32) = move _2; // scope 0 at $DIR/separate_const_switch.rs:29:5: 29:11
discriminant(_0) = 0; // scope 0 at $DIR/separate_const_switch.rs:29:5: 29:11
StorageDead(_2); // scope 0 at $DIR/separate_const_switch.rs:29:10: 29:11
@ -93,6 +94,7 @@
_18 = move _16; // scope 9 at $SRC_DIR/core/src/result.rs:LL:COL
_17 = move _18; // scope 10 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
StorageDead(_18); // scope 9 at $SRC_DIR/core/src/result.rs:LL:COL
Deinit(_0); // scope 9 at $SRC_DIR/core/src/result.rs:LL:COL
((_0 as Err).0: i32) = move _17; // scope 9 at $SRC_DIR/core/src/result.rs:LL:COL
discriminant(_0) = 1; // scope 9 at $SRC_DIR/core/src/result.rs:LL:COL
StorageDead(_17); // scope 9 at $SRC_DIR/core/src/result.rs:LL:COL
@ -111,9 +113,11 @@
StorageLive(_14); // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
StorageLive(_15); // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
_15 = move _13; // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
Deinit(_14); // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
((_14 as Err).0: i32) = move _15; // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
discriminant(_14) = 1; // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
StorageDead(_15); // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
Deinit(_3); // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
((_3 as Break).0: std::result::Result<std::convert::Infallible, i32>) = move _14; // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
discriminant(_3) = 1; // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
StorageDead(_14); // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
@ -136,6 +140,7 @@
_11 = move ((_4 as Ok).0: i32); // scope 5 at $SRC_DIR/core/src/result.rs:LL:COL
StorageLive(_12); // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL
_12 = move _11; // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL
Deinit(_3); // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL
((_3 as Continue).0: i32) = move _12; // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL
discriminant(_3) = 0; // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL
StorageDead(_12); // scope 6 at $SRC_DIR/core/src/result.rs:LL:COL

View file

@ -38,6 +38,7 @@
_6 = ((_1 as Err).0: usize); // scope 0 at $DIR/separate_const_switch.rs:17:17: 17:18
StorageLive(_7); // scope 2 at $DIR/separate_const_switch.rs:17:42: 17:43
_7 = _6; // scope 2 at $DIR/separate_const_switch.rs:17:42: 17:43
Deinit(_2); // scope 2 at $DIR/separate_const_switch.rs:17:23: 17:44
((_2 as Break).0: usize) = move _7; // scope 2 at $DIR/separate_const_switch.rs:17:23: 17:44
discriminant(_2) = 1; // scope 2 at $DIR/separate_const_switch.rs:17:23: 17:44
StorageDead(_7); // scope 2 at $DIR/separate_const_switch.rs:17:43: 17:44
@ -53,6 +54,7 @@
_4 = ((_1 as Ok).0: i32); // scope 0 at $DIR/separate_const_switch.rs:16:16: 16:17
StorageLive(_5); // scope 1 at $DIR/separate_const_switch.rs:16:44: 16:45
_5 = _4; // scope 1 at $DIR/separate_const_switch.rs:16:44: 16:45
Deinit(_2); // scope 1 at $DIR/separate_const_switch.rs:16:22: 16:46
((_2 as Continue).0: i32) = move _5; // scope 1 at $DIR/separate_const_switch.rs:16:22: 16:46
discriminant(_2) = 0; // scope 1 at $DIR/separate_const_switch.rs:16:22: 16:46
StorageDead(_5); // scope 1 at $DIR/separate_const_switch.rs:16:45: 16:46
@ -66,6 +68,7 @@
bb3: {
StorageLive(_11); // scope 0 at $DIR/separate_const_switch.rs:21:28: 21:29
_11 = ((_2 as Break).0: usize); // scope 0 at $DIR/separate_const_switch.rs:21:28: 21:29
Deinit(_0); // scope 4 at $DIR/separate_const_switch.rs:21:34: 21:38
discriminant(_0) = 0; // scope 4 at $DIR/separate_const_switch.rs:21:34: 21:38
StorageDead(_11); // scope 0 at $DIR/separate_const_switch.rs:21:37: 21:38
goto -> bb5; // scope 0 at $DIR/separate_const_switch.rs:21:37: 21:38
@ -76,6 +79,7 @@
_9 = ((_2 as Continue).0: i32); // scope 0 at $DIR/separate_const_switch.rs:20:31: 20:32
StorageLive(_10); // scope 3 at $DIR/separate_const_switch.rs:20:42: 20:43
_10 = _9; // scope 3 at $DIR/separate_const_switch.rs:20:42: 20:43
Deinit(_0); // scope 3 at $DIR/separate_const_switch.rs:20:37: 20:44
((_0 as Some).0: i32) = move _10; // scope 3 at $DIR/separate_const_switch.rs:20:37: 20:44
discriminant(_0) = 1; // scope 3 at $DIR/separate_const_switch.rs:20:37: 20:44
StorageDead(_10); // scope 3 at $DIR/separate_const_switch.rs:20:43: 20:44

View file

@ -36,12 +36,14 @@ fn too_complex(_1: Result<i32, usize>) -> Option<i32> {
_6 = ((_1 as Err).0: usize); // scope 0 at $DIR/separate_const_switch.rs:17:17: 17:18
StorageLive(_7); // scope 2 at $DIR/separate_const_switch.rs:17:42: 17:43
_7 = _6; // scope 2 at $DIR/separate_const_switch.rs:17:42: 17:43
Deinit(_2); // scope 2 at $DIR/separate_const_switch.rs:17:23: 17:44
((_2 as Break).0: usize) = move _7; // scope 2 at $DIR/separate_const_switch.rs:17:23: 17:44
discriminant(_2) = 1; // scope 2 at $DIR/separate_const_switch.rs:17:23: 17:44
StorageDead(_7); // scope 2 at $DIR/separate_const_switch.rs:17:43: 17:44
StorageDead(_6); // scope 0 at $DIR/separate_const_switch.rs:17:43: 17:44
StorageLive(_10); // scope 0 at $DIR/separate_const_switch.rs:21:28: 21:29
_10 = ((_2 as Break).0: usize); // scope 0 at $DIR/separate_const_switch.rs:21:28: 21:29
Deinit(_0); // scope 4 at $DIR/separate_const_switch.rs:21:34: 21:38
discriminant(_0) = 0; // scope 4 at $DIR/separate_const_switch.rs:21:34: 21:38
StorageDead(_10); // scope 0 at $DIR/separate_const_switch.rs:21:37: 21:38
goto -> bb3; // scope 0 at $DIR/separate_const_switch.rs:21:37: 21:38
@ -52,6 +54,7 @@ fn too_complex(_1: Result<i32, usize>) -> Option<i32> {
_4 = ((_1 as Ok).0: i32); // scope 0 at $DIR/separate_const_switch.rs:16:16: 16:17
StorageLive(_5); // scope 1 at $DIR/separate_const_switch.rs:16:44: 16:45
_5 = _4; // scope 1 at $DIR/separate_const_switch.rs:16:44: 16:45
Deinit(_2); // scope 1 at $DIR/separate_const_switch.rs:16:22: 16:46
((_2 as Continue).0: i32) = move _5; // scope 1 at $DIR/separate_const_switch.rs:16:22: 16:46
discriminant(_2) = 0; // scope 1 at $DIR/separate_const_switch.rs:16:22: 16:46
StorageDead(_5); // scope 1 at $DIR/separate_const_switch.rs:16:45: 16:46
@ -60,6 +63,7 @@ fn too_complex(_1: Result<i32, usize>) -> Option<i32> {
_8 = ((_2 as Continue).0: i32); // scope 0 at $DIR/separate_const_switch.rs:20:31: 20:32
StorageLive(_9); // scope 3 at $DIR/separate_const_switch.rs:20:42: 20:43
_9 = _8; // scope 3 at $DIR/separate_const_switch.rs:20:42: 20:43
Deinit(_0); // scope 3 at $DIR/separate_const_switch.rs:20:37: 20:44
((_0 as Some).0: i32) = move _9; // scope 3 at $DIR/separate_const_switch.rs:20:37: 20:44
discriminant(_0) = 1; // scope 3 at $DIR/separate_const_switch.rs:20:37: 20:44
StorageDead(_9); // scope 3 at $DIR/separate_const_switch.rs:20:43: 20:44

View file

@ -38,6 +38,7 @@
_6 = ((_1 as Err).0: usize); // scope 0 at $DIR/separate_const_switch.rs:17:17: 17:18
StorageLive(_7); // scope 2 at $DIR/separate_const_switch.rs:17:42: 17:43
_7 = _6; // scope 2 at $DIR/separate_const_switch.rs:17:42: 17:43
Deinit(_2); // scope 2 at $DIR/separate_const_switch.rs:17:23: 17:44
((_2 as Break).0: usize) = move _7; // scope 2 at $DIR/separate_const_switch.rs:17:23: 17:44
discriminant(_2) = 1; // scope 2 at $DIR/separate_const_switch.rs:17:23: 17:44
StorageDead(_7); // scope 2 at $DIR/separate_const_switch.rs:17:43: 17:44
@ -52,6 +53,7 @@
_4 = ((_1 as Ok).0: i32); // scope 0 at $DIR/separate_const_switch.rs:16:16: 16:17
StorageLive(_5); // scope 1 at $DIR/separate_const_switch.rs:16:44: 16:45
_5 = _4; // scope 1 at $DIR/separate_const_switch.rs:16:44: 16:45
Deinit(_2); // scope 1 at $DIR/separate_const_switch.rs:16:22: 16:46
((_2 as Continue).0: i32) = move _5; // scope 1 at $DIR/separate_const_switch.rs:16:22: 16:46
discriminant(_2) = 0; // scope 1 at $DIR/separate_const_switch.rs:16:22: 16:46
StorageDead(_5); // scope 1 at $DIR/separate_const_switch.rs:16:45: 16:46
@ -69,6 +71,7 @@
+ bb3: {
StorageLive(_11); // scope 0 at $DIR/separate_const_switch.rs:21:28: 21:29
_11 = ((_2 as Break).0: usize); // scope 0 at $DIR/separate_const_switch.rs:21:28: 21:29
Deinit(_0); // scope 4 at $DIR/separate_const_switch.rs:21:34: 21:38
discriminant(_0) = 0; // scope 4 at $DIR/separate_const_switch.rs:21:34: 21:38
StorageDead(_11); // scope 0 at $DIR/separate_const_switch.rs:21:37: 21:38
- goto -> bb6; // scope 0 at $DIR/separate_const_switch.rs:21:37: 21:38
@ -81,6 +84,7 @@
_9 = ((_2 as Continue).0: i32); // scope 0 at $DIR/separate_const_switch.rs:20:31: 20:32
StorageLive(_10); // scope 3 at $DIR/separate_const_switch.rs:20:42: 20:43
_10 = _9; // scope 3 at $DIR/separate_const_switch.rs:20:42: 20:43
Deinit(_0); // scope 3 at $DIR/separate_const_switch.rs:20:37: 20:44
((_0 as Some).0: i32) = move _10; // scope 3 at $DIR/separate_const_switch.rs:20:37: 20:44
discriminant(_0) = 1; // scope 3 at $DIR/separate_const_switch.rs:20:37: 20:44
StorageDead(_10); // scope 3 at $DIR/separate_const_switch.rs:20:43: 20:44

View file

@ -8,8 +8,7 @@
let _3: u8; // in scope 0 at $DIR/simplify-arm.rs:11:14: 11:15
let mut _4: u8; // in scope 0 at $DIR/simplify-arm.rs:11:25: 11:26
scope 1 {
- debug v => _3; // in scope 1 at $DIR/simplify-arm.rs:11:14: 11:15
+ debug v => ((_0 as Some).0: u8); // in scope 1 at $DIR/simplify-arm.rs:11:14: 11:15
debug v => _3; // in scope 1 at $DIR/simplify-arm.rs:11:14: 11:15
}
bb0: {
@ -18,6 +17,7 @@
}
bb1: {
Deinit(_0); // scope 0 at $DIR/simplify-arm.rs:12:17: 12:21
discriminant(_0) = 0; // scope 0 at $DIR/simplify-arm.rs:12:17: 12:21
goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:12:17: 12:21
}
@ -27,15 +27,15 @@
}
bb3: {
- StorageLive(_3); // scope 0 at $DIR/simplify-arm.rs:11:14: 11:15
- _3 = ((_1 as Some).0: u8); // scope 0 at $DIR/simplify-arm.rs:11:14: 11:15
- StorageLive(_4); // scope 1 at $DIR/simplify-arm.rs:11:25: 11:26
- _4 = _3; // scope 1 at $DIR/simplify-arm.rs:11:25: 11:26
- ((_0 as Some).0: u8) = move _4; // scope 1 at $DIR/simplify-arm.rs:11:20: 11:27
- discriminant(_0) = 1; // scope 1 at $DIR/simplify-arm.rs:11:20: 11:27
- StorageDead(_4); // scope 1 at $DIR/simplify-arm.rs:11:26: 11:27
- StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:11:26: 11:27
+ _0 = move _1; // scope 1 at $DIR/simplify-arm.rs:11:20: 11:27
StorageLive(_3); // scope 0 at $DIR/simplify-arm.rs:11:14: 11:15
_3 = ((_1 as Some).0: u8); // scope 0 at $DIR/simplify-arm.rs:11:14: 11:15
StorageLive(_4); // scope 1 at $DIR/simplify-arm.rs:11:25: 11:26
_4 = _3; // scope 1 at $DIR/simplify-arm.rs:11:25: 11:26
Deinit(_0); // scope 1 at $DIR/simplify-arm.rs:11:20: 11:27
((_0 as Some).0: u8) = move _4; // scope 1 at $DIR/simplify-arm.rs:11:20: 11:27
discriminant(_0) = 1; // scope 1 at $DIR/simplify-arm.rs:11:20: 11:27
StorageDead(_4); // scope 1 at $DIR/simplify-arm.rs:11:26: 11:27
StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:11:26: 11:27
goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:11:26: 11:27
}

View file

@ -8,32 +8,38 @@
let _3: u8; // in scope 0 at $DIR/simplify-arm.rs:11:14: 11:15
let mut _4: u8; // in scope 0 at $DIR/simplify-arm.rs:11:25: 11:26
scope 1 {
debug v => ((_0 as Some).0: u8); // in scope 1 at $DIR/simplify-arm.rs:11:14: 11:15
debug v => _3; // in scope 1 at $DIR/simplify-arm.rs:11:14: 11:15
}
bb0: {
_2 = discriminant(_1); // scope 0 at $DIR/simplify-arm.rs:10:11: 10:12
- switchInt(move _2) -> [0_isize: bb1, 1_isize: bb3, otherwise: bb2]; // scope 0 at $DIR/simplify-arm.rs:10:5: 10:12
+ goto -> bb1; // scope 0 at $DIR/simplify-arm.rs:10:5: 10:12
switchInt(move _2) -> [0_isize: bb1, 1_isize: bb3, otherwise: bb2]; // scope 0 at $DIR/simplify-arm.rs:10:5: 10:12
}
bb1: {
- discriminant(_0) = 0; // scope 0 at $DIR/simplify-arm.rs:12:17: 12:21
- goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:12:17: 12:21
- }
-
- bb2: {
- unreachable; // scope 0 at $DIR/simplify-arm.rs:10:11: 10:12
- }
-
- bb3: {
_0 = move _1; // scope 1 at $DIR/simplify-arm.rs:11:20: 11:27
- goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:11:26: 11:27
+ goto -> bb2; // scope 0 at $DIR/simplify-arm.rs:11:26: 11:27
Deinit(_0); // scope 0 at $DIR/simplify-arm.rs:12:17: 12:21
discriminant(_0) = 0; // scope 0 at $DIR/simplify-arm.rs:12:17: 12:21
goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:12:17: 12:21
}
- bb4: {
+ bb2: {
bb2: {
unreachable; // scope 0 at $DIR/simplify-arm.rs:10:11: 10:12
}
bb3: {
StorageLive(_3); // scope 0 at $DIR/simplify-arm.rs:11:14: 11:15
_3 = ((_1 as Some).0: u8); // scope 0 at $DIR/simplify-arm.rs:11:14: 11:15
StorageLive(_4); // scope 1 at $DIR/simplify-arm.rs:11:25: 11:26
_4 = _3; // scope 1 at $DIR/simplify-arm.rs:11:25: 11:26
Deinit(_0); // scope 1 at $DIR/simplify-arm.rs:11:20: 11:27
((_0 as Some).0: u8) = move _4; // scope 1 at $DIR/simplify-arm.rs:11:20: 11:27
discriminant(_0) = 1; // scope 1 at $DIR/simplify-arm.rs:11:20: 11:27
StorageDead(_4); // scope 1 at $DIR/simplify-arm.rs:11:26: 11:27
StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:11:26: 11:27
goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:11:26: 11:27
}
bb4: {
return; // scope 0 at $DIR/simplify-arm.rs:14:2: 14:2
}
}

View file

@ -10,12 +10,10 @@
let _5: i32; // in scope 0 at $DIR/simplify-arm.rs:19:13: 19:14
let mut _6: i32; // in scope 0 at $DIR/simplify-arm.rs:19:23: 19:24
scope 1 {
- debug x => _3; // in scope 1 at $DIR/simplify-arm.rs:18:12: 18:13
+ debug x => ((_0 as Ok).0: u8); // in scope 1 at $DIR/simplify-arm.rs:18:12: 18:13
debug x => _3; // in scope 1 at $DIR/simplify-arm.rs:18:12: 18:13
}
scope 2 {
- debug y => _5; // in scope 2 at $DIR/simplify-arm.rs:19:13: 19:14
+ debug y => ((_0 as Err).0: i32); // in scope 2 at $DIR/simplify-arm.rs:19:13: 19:14
debug y => _5; // in scope 2 at $DIR/simplify-arm.rs:19:13: 19:14
}
bb0: {
@ -24,15 +22,15 @@
}
bb1: {
- StorageLive(_5); // scope 0 at $DIR/simplify-arm.rs:19:13: 19:14
- _5 = ((_1 as Err).0: i32); // scope 0 at $DIR/simplify-arm.rs:19:13: 19:14
- StorageLive(_6); // scope 2 at $DIR/simplify-arm.rs:19:23: 19:24
- _6 = _5; // scope 2 at $DIR/simplify-arm.rs:19:23: 19:24
- ((_0 as Err).0: i32) = move _6; // scope 2 at $DIR/simplify-arm.rs:19:19: 19:25
- discriminant(_0) = 1; // scope 2 at $DIR/simplify-arm.rs:19:19: 19:25
- StorageDead(_6); // scope 2 at $DIR/simplify-arm.rs:19:24: 19:25
- StorageDead(_5); // scope 0 at $DIR/simplify-arm.rs:19:24: 19:25
+ _0 = move _1; // scope 2 at $DIR/simplify-arm.rs:19:19: 19:25
StorageLive(_5); // scope 0 at $DIR/simplify-arm.rs:19:13: 19:14
_5 = ((_1 as Err).0: i32); // scope 0 at $DIR/simplify-arm.rs:19:13: 19:14
StorageLive(_6); // scope 2 at $DIR/simplify-arm.rs:19:23: 19:24
_6 = _5; // scope 2 at $DIR/simplify-arm.rs:19:23: 19:24
Deinit(_0); // scope 2 at $DIR/simplify-arm.rs:19:19: 19:25
((_0 as Err).0: i32) = move _6; // scope 2 at $DIR/simplify-arm.rs:19:19: 19:25
discriminant(_0) = 1; // scope 2 at $DIR/simplify-arm.rs:19:19: 19:25
StorageDead(_6); // scope 2 at $DIR/simplify-arm.rs:19:24: 19:25
StorageDead(_5); // scope 0 at $DIR/simplify-arm.rs:19:24: 19:25
goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:19:24: 19:25
}
@ -41,15 +39,15 @@
}
bb3: {
- StorageLive(_3); // scope 0 at $DIR/simplify-arm.rs:18:12: 18:13
- _3 = ((_1 as Ok).0: u8); // scope 0 at $DIR/simplify-arm.rs:18:12: 18:13
- StorageLive(_4); // scope 1 at $DIR/simplify-arm.rs:18:21: 18:22
- _4 = _3; // scope 1 at $DIR/simplify-arm.rs:18:21: 18:22
- ((_0 as Ok).0: u8) = move _4; // scope 1 at $DIR/simplify-arm.rs:18:18: 18:23
- discriminant(_0) = 0; // scope 1 at $DIR/simplify-arm.rs:18:18: 18:23
- StorageDead(_4); // scope 1 at $DIR/simplify-arm.rs:18:22: 18:23
- StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:18:22: 18:23
+ _0 = move _1; // scope 1 at $DIR/simplify-arm.rs:18:18: 18:23
StorageLive(_3); // scope 0 at $DIR/simplify-arm.rs:18:12: 18:13
_3 = ((_1 as Ok).0: u8); // scope 0 at $DIR/simplify-arm.rs:18:12: 18:13
StorageLive(_4); // scope 1 at $DIR/simplify-arm.rs:18:21: 18:22
_4 = _3; // scope 1 at $DIR/simplify-arm.rs:18:21: 18:22
Deinit(_0); // scope 1 at $DIR/simplify-arm.rs:18:18: 18:23
((_0 as Ok).0: u8) = move _4; // scope 1 at $DIR/simplify-arm.rs:18:18: 18:23
discriminant(_0) = 0; // scope 1 at $DIR/simplify-arm.rs:18:18: 18:23
StorageDead(_4); // scope 1 at $DIR/simplify-arm.rs:18:22: 18:23
StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:18:22: 18:23
goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:18:22: 18:23
}

View file

@ -10,35 +10,48 @@
let _5: i32; // in scope 0 at $DIR/simplify-arm.rs:19:13: 19:14
let mut _6: i32; // in scope 0 at $DIR/simplify-arm.rs:19:23: 19:24
scope 1 {
debug x => ((_0 as Ok).0: u8); // in scope 1 at $DIR/simplify-arm.rs:18:12: 18:13
debug x => _3; // in scope 1 at $DIR/simplify-arm.rs:18:12: 18:13
}
scope 2 {
debug y => ((_0 as Err).0: i32); // in scope 2 at $DIR/simplify-arm.rs:19:13: 19:14
debug y => _5; // in scope 2 at $DIR/simplify-arm.rs:19:13: 19:14
}
bb0: {
_2 = discriminant(_1); // scope 0 at $DIR/simplify-arm.rs:17:11: 17:12
- switchInt(move _2) -> [0_isize: bb3, 1_isize: bb1, otherwise: bb2]; // scope 0 at $DIR/simplify-arm.rs:17:5: 17:12
+ goto -> bb1; // scope 0 at $DIR/simplify-arm.rs:17:5: 17:12
switchInt(move _2) -> [0_isize: bb3, 1_isize: bb1, otherwise: bb2]; // scope 0 at $DIR/simplify-arm.rs:17:5: 17:12
}
bb1: {
- _0 = move _1; // scope 2 at $DIR/simplify-arm.rs:19:19: 19:25
- goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:19:24: 19:25
- }
-
- bb2: {
- unreachable; // scope 0 at $DIR/simplify-arm.rs:17:11: 17:12
- }
-
- bb3: {
_0 = move _1; // scope 1 at $DIR/simplify-arm.rs:18:18: 18:23
- goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:18:22: 18:23
+ goto -> bb2; // scope 0 at $DIR/simplify-arm.rs:18:22: 18:23
StorageLive(_5); // scope 0 at $DIR/simplify-arm.rs:19:13: 19:14
_5 = ((_1 as Err).0: i32); // scope 0 at $DIR/simplify-arm.rs:19:13: 19:14
StorageLive(_6); // scope 2 at $DIR/simplify-arm.rs:19:23: 19:24
_6 = _5; // scope 2 at $DIR/simplify-arm.rs:19:23: 19:24
Deinit(_0); // scope 2 at $DIR/simplify-arm.rs:19:19: 19:25
((_0 as Err).0: i32) = move _6; // scope 2 at $DIR/simplify-arm.rs:19:19: 19:25
discriminant(_0) = 1; // scope 2 at $DIR/simplify-arm.rs:19:19: 19:25
StorageDead(_6); // scope 2 at $DIR/simplify-arm.rs:19:24: 19:25
StorageDead(_5); // scope 0 at $DIR/simplify-arm.rs:19:24: 19:25
goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:19:24: 19:25
}
- bb4: {
+ bb2: {
bb2: {
unreachable; // scope 0 at $DIR/simplify-arm.rs:17:11: 17:12
}
bb3: {
StorageLive(_3); // scope 0 at $DIR/simplify-arm.rs:18:12: 18:13
_3 = ((_1 as Ok).0: u8); // scope 0 at $DIR/simplify-arm.rs:18:12: 18:13
StorageLive(_4); // scope 1 at $DIR/simplify-arm.rs:18:21: 18:22
_4 = _3; // scope 1 at $DIR/simplify-arm.rs:18:21: 18:22
Deinit(_0); // scope 1 at $DIR/simplify-arm.rs:18:18: 18:23
((_0 as Ok).0: u8) = move _4; // scope 1 at $DIR/simplify-arm.rs:18:18: 18:23
discriminant(_0) = 0; // scope 1 at $DIR/simplify-arm.rs:18:18: 18:23
StorageDead(_4); // scope 1 at $DIR/simplify-arm.rs:18:22: 18:23
StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:18:22: 18:23
goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:18:22: 18:23
}
bb4: {
return; // scope 0 at $DIR/simplify-arm.rs:21:2: 21:2
}
}

View file

@ -15,24 +15,19 @@
let _10: u8; // in scope 0 at $DIR/simplify-arm.rs:38:12: 38:13
let mut _11: u8; // in scope 0 at $DIR/simplify-arm.rs:40:8: 40:9
scope 1 {
- debug x => _2; // in scope 1 at $DIR/simplify-arm.rs:36:9: 36:10
+ debug x => ((_0 as Ok).0: u8); // in scope 1 at $DIR/simplify-arm.rs:36:9: 36:10
debug x => _2; // in scope 1 at $DIR/simplify-arm.rs:36:9: 36:10
}
scope 2 {
- debug e => _6; // in scope 2 at $DIR/simplify-arm.rs:37:13: 37:14
+ debug e => ((_0 as Err).0: i32); // in scope 2 at $DIR/simplify-arm.rs:37:13: 37:14
debug e => _6; // in scope 2 at $DIR/simplify-arm.rs:37:13: 37:14
scope 5 (inlined <i32 as From<i32>>::from) { // at $DIR/simplify-arm.rs:37:37: 37:50
- debug t => _9; // in scope 5 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
+ debug t => ((_0 as Err).0: i32); // in scope 5 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
debug t => _9; // in scope 5 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
}
scope 6 (inlined from_error::<u8, i32>) { // at $DIR/simplify-arm.rs:37:26: 37:51
- debug e => _8; // in scope 6 at $DIR/simplify-arm.rs:27:21: 27:22
+ debug e => ((_0 as Err).0: i32); // in scope 6 at $DIR/simplify-arm.rs:27:21: 27:22
debug e => _8; // in scope 6 at $DIR/simplify-arm.rs:27:21: 27:22
}
}
scope 3 {
- debug v => _10; // in scope 3 at $DIR/simplify-arm.rs:38:12: 38:13
+ debug v => ((_0 as Ok).0: u8); // in scope 3 at $DIR/simplify-arm.rs:38:12: 38:13
debug v => _10; // in scope 3 at $DIR/simplify-arm.rs:38:12: 38:13
}
scope 4 (inlined into_result::<u8, i32>) { // at $DIR/simplify-arm.rs:36:19: 36:33
debug r => _4; // in scope 4 at $DIR/simplify-arm.rs:23:22: 23:23
@ -50,17 +45,17 @@
}
bb1: {
- StorageLive(_10); // scope 0 at $DIR/simplify-arm.rs:38:12: 38:13
- _10 = ((_3 as Ok).0: u8); // scope 0 at $DIR/simplify-arm.rs:38:12: 38:13
- _2 = _10; // scope 3 at $DIR/simplify-arm.rs:38:18: 38:19
- StorageDead(_10); // scope 0 at $DIR/simplify-arm.rs:38:18: 38:19
+ _0 = move _3; // scope 1 at $DIR/simplify-arm.rs:40:5: 40:10
StorageLive(_10); // scope 0 at $DIR/simplify-arm.rs:38:12: 38:13
_10 = ((_3 as Ok).0: u8); // scope 0 at $DIR/simplify-arm.rs:38:12: 38:13
_2 = _10; // scope 3 at $DIR/simplify-arm.rs:38:18: 38:19
StorageDead(_10); // scope 0 at $DIR/simplify-arm.rs:38:18: 38:19
StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:39:6: 39:7
- StorageLive(_11); // scope 1 at $DIR/simplify-arm.rs:40:8: 40:9
- _11 = _2; // scope 1 at $DIR/simplify-arm.rs:40:8: 40:9
- ((_0 as Ok).0: u8) = move _11; // scope 1 at $DIR/simplify-arm.rs:40:5: 40:10
- discriminant(_0) = 0; // scope 1 at $DIR/simplify-arm.rs:40:5: 40:10
- StorageDead(_11); // scope 1 at $DIR/simplify-arm.rs:40:9: 40:10
StorageLive(_11); // scope 1 at $DIR/simplify-arm.rs:40:8: 40:9
_11 = _2; // scope 1 at $DIR/simplify-arm.rs:40:8: 40:9
Deinit(_0); // scope 1 at $DIR/simplify-arm.rs:40:5: 40:10
((_0 as Ok).0: u8) = move _11; // scope 1 at $DIR/simplify-arm.rs:40:5: 40:10
discriminant(_0) = 0; // scope 1 at $DIR/simplify-arm.rs:40:5: 40:10
StorageDead(_11); // scope 1 at $DIR/simplify-arm.rs:40:9: 40:10
StorageDead(_2); // scope 0 at $DIR/simplify-arm.rs:41:1: 41:2
goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:41:2: 41:2
}
@ -70,18 +65,18 @@
}
bb3: {
- StorageLive(_6); // scope 0 at $DIR/simplify-arm.rs:37:13: 37:14
- _6 = ((_3 as Err).0: i32); // scope 0 at $DIR/simplify-arm.rs:37:13: 37:14
- StorageLive(_8); // scope 2 at $DIR/simplify-arm.rs:37:37: 37:50
- StorageLive(_9); // scope 2 at $DIR/simplify-arm.rs:37:48: 37:49
- _9 = _6; // scope 2 at $DIR/simplify-arm.rs:37:48: 37:49
- _8 = move _9; // scope 5 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
- StorageDead(_9); // scope 2 at $DIR/simplify-arm.rs:37:49: 37:50
- ((_0 as Err).0: i32) = move _8; // scope 6 at $DIR/simplify-arm.rs:28:9: 28:10
- discriminant(_0) = 1; // scope 6 at $DIR/simplify-arm.rs:28:5: 28:11
- StorageDead(_8); // scope 2 at $DIR/simplify-arm.rs:37:50: 37:51
- StorageDead(_6); // scope 0 at $DIR/simplify-arm.rs:37:50: 37:51
+ _0 = move _3; // scope 6 at $DIR/simplify-arm.rs:28:5: 28:11
StorageLive(_6); // scope 0 at $DIR/simplify-arm.rs:37:13: 37:14
_6 = ((_3 as Err).0: i32); // scope 0 at $DIR/simplify-arm.rs:37:13: 37:14
StorageLive(_8); // scope 2 at $DIR/simplify-arm.rs:37:37: 37:50
StorageLive(_9); // scope 2 at $DIR/simplify-arm.rs:37:48: 37:49
_9 = _6; // scope 2 at $DIR/simplify-arm.rs:37:48: 37:49
_8 = move _9; // scope 5 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
StorageDead(_9); // scope 2 at $DIR/simplify-arm.rs:37:49: 37:50
((_0 as Err).0: i32) = move _8; // scope 6 at $DIR/simplify-arm.rs:28:9: 28:10
Deinit(_0); // scope 6 at $DIR/simplify-arm.rs:28:5: 28:11
discriminant(_0) = 1; // scope 6 at $DIR/simplify-arm.rs:28:5: 28:11
StorageDead(_8); // scope 2 at $DIR/simplify-arm.rs:37:50: 37:51
StorageDead(_6); // scope 0 at $DIR/simplify-arm.rs:37:50: 37:51
StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:39:6: 39:7
StorageDead(_2); // scope 0 at $DIR/simplify-arm.rs:41:1: 41:2
goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:41:2: 41:2

View file

@ -15,19 +15,19 @@
let _10: u8; // in scope 0 at $DIR/simplify-arm.rs:38:12: 38:13
let mut _11: u8; // in scope 0 at $DIR/simplify-arm.rs:40:8: 40:9
scope 1 {
debug x => ((_0 as Ok).0: u8); // in scope 1 at $DIR/simplify-arm.rs:36:9: 36:10
debug x => _2; // in scope 1 at $DIR/simplify-arm.rs:36:9: 36:10
}
scope 2 {
debug e => ((_0 as Err).0: i32); // in scope 2 at $DIR/simplify-arm.rs:37:13: 37:14
debug e => _6; // in scope 2 at $DIR/simplify-arm.rs:37:13: 37:14
scope 5 (inlined <i32 as From<i32>>::from) { // at $DIR/simplify-arm.rs:37:37: 37:50
debug t => ((_0 as Err).0: i32); // in scope 5 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
debug t => _9; // in scope 5 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
}
scope 6 (inlined from_error::<u8, i32>) { // at $DIR/simplify-arm.rs:37:26: 37:51
debug e => ((_0 as Err).0: i32); // in scope 6 at $DIR/simplify-arm.rs:27:21: 27:22
debug e => _8; // in scope 6 at $DIR/simplify-arm.rs:27:21: 27:22
}
}
scope 3 {
debug v => ((_0 as Ok).0: u8); // in scope 3 at $DIR/simplify-arm.rs:38:12: 38:13
debug v => _10; // in scope 3 at $DIR/simplify-arm.rs:38:12: 38:13
}
scope 4 (inlined into_result::<u8, i32>) { // at $DIR/simplify-arm.rs:36:19: 36:33
debug r => _4; // in scope 4 at $DIR/simplify-arm.rs:23:22: 23:23
@ -41,30 +41,48 @@
_3 = move _4; // scope 4 at $DIR/simplify-arm.rs:24:5: 24:6
StorageDead(_4); // scope 0 at $DIR/simplify-arm.rs:36:32: 36:33
_5 = discriminant(_3); // scope 0 at $DIR/simplify-arm.rs:36:19: 36:33
- switchInt(move _5) -> [0_isize: bb1, 1_isize: bb3, otherwise: bb2]; // scope 0 at $DIR/simplify-arm.rs:36:13: 36:33
+ goto -> bb1; // scope 0 at $DIR/simplify-arm.rs:36:13: 36:33
switchInt(move _5) -> [0_isize: bb1, 1_isize: bb3, otherwise: bb2]; // scope 0 at $DIR/simplify-arm.rs:36:13: 36:33
}
bb1: {
_0 = move _3; // scope 1 at $DIR/simplify-arm.rs:40:5: 40:10
StorageLive(_10); // scope 0 at $DIR/simplify-arm.rs:38:12: 38:13
_10 = ((_3 as Ok).0: u8); // scope 0 at $DIR/simplify-arm.rs:38:12: 38:13
_2 = _10; // scope 3 at $DIR/simplify-arm.rs:38:18: 38:19
StorageDead(_10); // scope 0 at $DIR/simplify-arm.rs:38:18: 38:19
StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:39:6: 39:7
StorageLive(_11); // scope 1 at $DIR/simplify-arm.rs:40:8: 40:9
_11 = _2; // scope 1 at $DIR/simplify-arm.rs:40:8: 40:9
Deinit(_0); // scope 1 at $DIR/simplify-arm.rs:40:5: 40:10
((_0 as Ok).0: u8) = move _11; // scope 1 at $DIR/simplify-arm.rs:40:5: 40:10
discriminant(_0) = 0; // scope 1 at $DIR/simplify-arm.rs:40:5: 40:10
StorageDead(_11); // scope 1 at $DIR/simplify-arm.rs:40:9: 40:10
StorageDead(_2); // scope 0 at $DIR/simplify-arm.rs:41:1: 41:2
- goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:41:2: 41:2
+ goto -> bb2; // scope 0 at $DIR/simplify-arm.rs:41:2: 41:2
goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:41:2: 41:2
}
bb2: {
- unreachable; // scope 0 at $DIR/simplify-arm.rs:36:19: 36:33
- }
-
- bb3: {
- _0 = move _3; // scope 6 at $DIR/simplify-arm.rs:28:5: 28:11
- StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:39:6: 39:7
- StorageDead(_2); // scope 0 at $DIR/simplify-arm.rs:41:1: 41:2
- goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:41:2: 41:2
- }
-
- bb4: {
unreachable; // scope 0 at $DIR/simplify-arm.rs:36:19: 36:33
}
bb3: {
StorageLive(_6); // scope 0 at $DIR/simplify-arm.rs:37:13: 37:14
_6 = ((_3 as Err).0: i32); // scope 0 at $DIR/simplify-arm.rs:37:13: 37:14
StorageLive(_8); // scope 2 at $DIR/simplify-arm.rs:37:37: 37:50
StorageLive(_9); // scope 2 at $DIR/simplify-arm.rs:37:48: 37:49
_9 = _6; // scope 2 at $DIR/simplify-arm.rs:37:48: 37:49
_8 = move _9; // scope 5 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
StorageDead(_9); // scope 2 at $DIR/simplify-arm.rs:37:49: 37:50
((_0 as Err).0: i32) = move _8; // scope 6 at $DIR/simplify-arm.rs:28:9: 28:10
Deinit(_0); // scope 6 at $DIR/simplify-arm.rs:28:5: 28:11
discriminant(_0) = 1; // scope 6 at $DIR/simplify-arm.rs:28:5: 28:11
StorageDead(_8); // scope 2 at $DIR/simplify-arm.rs:37:50: 37:51
StorageDead(_6); // scope 0 at $DIR/simplify-arm.rs:37:50: 37:51
StorageDead(_3); // scope 0 at $DIR/simplify-arm.rs:39:6: 39:7
StorageDead(_2); // scope 0 at $DIR/simplify-arm.rs:41:1: 41:2
goto -> bb4; // scope 0 at $DIR/simplify-arm.rs:41:2: 41:2
}
bb4: {
return; // scope 0 at $DIR/simplify-arm.rs:41:2: 41:2
}
}

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