Auto merge of #116427 - cjgillot:no-internal, r=oli-obk
Remove mir::LocalDecl::internal. It does not serve any purpose, as we don't have typeck-based generator witnesses any more.
This commit is contained in:
commit
5c3a0e932b
38 changed files with 106 additions and 57 deletions
|
@ -237,7 +237,7 @@ impl<'mir, 'tcx> Checker<'mir, 'tcx> {
|
||||||
if self.const_kind() == hir::ConstContext::ConstFn {
|
if self.const_kind() == hir::ConstContext::ConstFn {
|
||||||
for (idx, local) in body.local_decls.iter_enumerated() {
|
for (idx, local) in body.local_decls.iter_enumerated() {
|
||||||
// Handle the return place below.
|
// Handle the return place below.
|
||||||
if idx == RETURN_PLACE || local.internal {
|
if idx == RETURN_PLACE {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -830,22 +830,6 @@ pub struct LocalDecl<'tcx> {
|
||||||
// FIXME(matthewjasper) Don't store in this in `Body`
|
// FIXME(matthewjasper) Don't store in this in `Body`
|
||||||
pub local_info: ClearCrossCrate<Box<LocalInfo<'tcx>>>,
|
pub local_info: ClearCrossCrate<Box<LocalInfo<'tcx>>>,
|
||||||
|
|
||||||
/// `true` if this is an internal local.
|
|
||||||
///
|
|
||||||
/// These locals are not based on types in the source code and are only used
|
|
||||||
/// for a few desugarings at the moment.
|
|
||||||
///
|
|
||||||
/// The generator transformation will sanity check the locals which are live
|
|
||||||
/// across a suspension point against the type components of the generator
|
|
||||||
/// which type checking knows are live across a suspension point. We need to
|
|
||||||
/// flag drop flags to avoid triggering this check as they are introduced
|
|
||||||
/// outside of type inference.
|
|
||||||
///
|
|
||||||
/// This should be sound because the drop flags are fully algebraic, and
|
|
||||||
/// therefore don't affect the auto-trait or outlives properties of the
|
|
||||||
/// generator.
|
|
||||||
pub internal: bool,
|
|
||||||
|
|
||||||
/// The type of this local.
|
/// The type of this local.
|
||||||
pub ty: Ty<'tcx>,
|
pub ty: Ty<'tcx>,
|
||||||
|
|
||||||
|
@ -1058,7 +1042,7 @@ impl<'tcx> LocalDecl<'tcx> {
|
||||||
self.source_info.span.desugaring_kind().is_some()
|
self.source_info.span.desugaring_kind().is_some()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates a new `LocalDecl` for a temporary: mutable, non-internal.
|
/// Creates a new `LocalDecl` for a temporary, mutable.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn new(ty: Ty<'tcx>, span: Span) -> Self {
|
pub fn new(ty: Ty<'tcx>, span: Span) -> Self {
|
||||||
Self::with_source_info(ty, SourceInfo::outermost(span))
|
Self::with_source_info(ty, SourceInfo::outermost(span))
|
||||||
|
@ -1070,20 +1054,12 @@ impl<'tcx> LocalDecl<'tcx> {
|
||||||
LocalDecl {
|
LocalDecl {
|
||||||
mutability: Mutability::Mut,
|
mutability: Mutability::Mut,
|
||||||
local_info: ClearCrossCrate::Set(Box::new(LocalInfo::Boring)),
|
local_info: ClearCrossCrate::Set(Box::new(LocalInfo::Boring)),
|
||||||
internal: false,
|
|
||||||
ty,
|
ty,
|
||||||
user_ty: None,
|
user_ty: None,
|
||||||
source_info,
|
source_info,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Converts `self` into same `LocalDecl` except tagged as internal.
|
|
||||||
#[inline]
|
|
||||||
pub fn internal(mut self) -> Self {
|
|
||||||
self.internal = true;
|
|
||||||
self
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Converts `self` into same `LocalDecl` except tagged as immutable.
|
/// Converts `self` into same `LocalDecl` except tagged as immutable.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn immutable(mut self) -> Self {
|
pub fn immutable(mut self) -> Self {
|
||||||
|
|
|
@ -127,7 +127,7 @@ impl<'tcx> MirPatch<'tcx> {
|
||||||
Location { block: bb, statement_index: offset }
|
Location { block: bb, statement_index: offset }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn new_internal_with_info(
|
pub fn new_local_with_info(
|
||||||
&mut self,
|
&mut self,
|
||||||
ty: Ty<'tcx>,
|
ty: Ty<'tcx>,
|
||||||
span: Span,
|
span: Span,
|
||||||
|
@ -135,7 +135,7 @@ impl<'tcx> MirPatch<'tcx> {
|
||||||
) -> Local {
|
) -> Local {
|
||||||
let index = self.next_local;
|
let index = self.next_local;
|
||||||
self.next_local += 1;
|
self.next_local += 1;
|
||||||
let mut new_decl = LocalDecl::new(ty, span).internal();
|
let mut new_decl = LocalDecl::new(ty, span);
|
||||||
**new_decl.local_info.as_mut().assert_crate_local() = local_info;
|
**new_decl.local_info.as_mut().assert_crate_local() = local_info;
|
||||||
self.new_locals.push(new_decl);
|
self.new_locals.push(new_decl);
|
||||||
Local::new(index)
|
Local::new(index)
|
||||||
|
@ -148,13 +148,6 @@ impl<'tcx> MirPatch<'tcx> {
|
||||||
Local::new(index)
|
Local::new(index)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn new_internal(&mut self, ty: Ty<'tcx>, span: Span) -> Local {
|
|
||||||
let index = self.next_local;
|
|
||||||
self.next_local += 1;
|
|
||||||
self.new_locals.push(LocalDecl::new(ty, span).internal());
|
|
||||||
Local::new(index)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn new_block(&mut self, data: BasicBlockData<'tcx>) -> BasicBlock {
|
pub fn new_block(&mut self, data: BasicBlockData<'tcx>) -> BasicBlock {
|
||||||
let block = BasicBlock::new(self.patch_map.len());
|
let block = BasicBlock::new(self.patch_map.len());
|
||||||
debug!("MirPatch: new_block: {:?}: {:?}", block, data);
|
debug!("MirPatch: new_block: {:?}: {:?}", block, data);
|
||||||
|
|
|
@ -815,7 +815,6 @@ macro_rules! make_mir_visitor {
|
||||||
ty,
|
ty,
|
||||||
user_ty,
|
user_ty,
|
||||||
source_info,
|
source_info,
|
||||||
internal: _,
|
|
||||||
local_info: _,
|
local_info: _,
|
||||||
} = local_decl;
|
} = local_decl;
|
||||||
|
|
||||||
|
|
|
@ -183,7 +183,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
||||||
// The `Box<T>` temporary created here is not a part of the HIR,
|
// The `Box<T>` temporary created here is not a part of the HIR,
|
||||||
// and therefore is not considered during generator auto-trait
|
// and therefore is not considered during generator auto-trait
|
||||||
// determination. See the comment about `box` at `yield_in_scope`.
|
// determination. See the comment about `box` at `yield_in_scope`.
|
||||||
let result = this.local_decls.push(LocalDecl::new(expr.ty, expr_span).internal());
|
let result = this.local_decls.push(LocalDecl::new(expr.ty, expr_span));
|
||||||
this.cfg.push(
|
this.cfg.push(
|
||||||
block,
|
block,
|
||||||
Statement { source_info, kind: StatementKind::StorageLive(result) },
|
Statement { source_info, kind: StatementKind::StorageLive(result) },
|
||||||
|
|
|
@ -52,12 +52,10 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
||||||
let local_info = match expr.kind {
|
let local_info = match expr.kind {
|
||||||
ExprKind::StaticRef { def_id, .. } => {
|
ExprKind::StaticRef { def_id, .. } => {
|
||||||
assert!(!this.tcx.is_thread_local_static(def_id));
|
assert!(!this.tcx.is_thread_local_static(def_id));
|
||||||
local_decl.internal = true;
|
|
||||||
LocalInfo::StaticRef { def_id, is_thread_local: false }
|
LocalInfo::StaticRef { def_id, is_thread_local: false }
|
||||||
}
|
}
|
||||||
ExprKind::ThreadLocalRef(def_id) => {
|
ExprKind::ThreadLocalRef(def_id) => {
|
||||||
assert!(this.tcx.is_thread_local_static(def_id));
|
assert!(this.tcx.is_thread_local_static(def_id));
|
||||||
local_decl.internal = true;
|
|
||||||
LocalInfo::StaticRef { def_id, is_thread_local: true }
|
LocalInfo::StaticRef { def_id, is_thread_local: true }
|
||||||
}
|
}
|
||||||
ExprKind::NamedConst { def_id, .. } | ExprKind::ConstParam { def_id, .. } => {
|
ExprKind::NamedConst { def_id, .. } | ExprKind::ConstParam { def_id, .. } => {
|
||||||
|
|
|
@ -1798,7 +1798,6 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
||||||
let fake_borrow_ty =
|
let fake_borrow_ty =
|
||||||
Ty::new_imm_ref(tcx, tcx.lifetimes.re_erased, fake_borrow_deref_ty);
|
Ty::new_imm_ref(tcx, tcx.lifetimes.re_erased, fake_borrow_deref_ty);
|
||||||
let mut fake_borrow_temp = LocalDecl::new(fake_borrow_ty, temp_span);
|
let mut fake_borrow_temp = LocalDecl::new(fake_borrow_ty, temp_span);
|
||||||
fake_borrow_temp.internal = self.local_decls[matched_place.local].internal;
|
|
||||||
fake_borrow_temp.local_info = ClearCrossCrate::Set(Box::new(LocalInfo::FakeBorrow));
|
fake_borrow_temp.local_info = ClearCrossCrate::Set(Box::new(LocalInfo::FakeBorrow));
|
||||||
let fake_borrow_temp = self.local_decls.push(fake_borrow_temp);
|
let fake_borrow_temp = self.local_decls.push(fake_borrow_temp);
|
||||||
|
|
||||||
|
@ -2268,7 +2267,6 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
||||||
ty: var_ty,
|
ty: var_ty,
|
||||||
user_ty: if user_ty.is_empty() { None } else { Some(Box::new(user_ty)) },
|
user_ty: if user_ty.is_empty() { None } else { Some(Box::new(user_ty)) },
|
||||||
source_info,
|
source_info,
|
||||||
internal: false,
|
|
||||||
local_info: ClearCrossCrate::Set(Box::new(LocalInfo::User(BindingForm::Var(
|
local_info: ClearCrossCrate::Set(Box::new(LocalInfo::User(BindingForm::Var(
|
||||||
VarBindingForm {
|
VarBindingForm {
|
||||||
binding_mode,
|
binding_mode,
|
||||||
|
@ -2298,7 +2296,6 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
||||||
ty: Ty::new_imm_ref(tcx, tcx.lifetimes.re_erased, var_ty),
|
ty: Ty::new_imm_ref(tcx, tcx.lifetimes.re_erased, var_ty),
|
||||||
user_ty: None,
|
user_ty: None,
|
||||||
source_info,
|
source_info,
|
||||||
internal: false,
|
|
||||||
local_info: ClearCrossCrate::Set(Box::new(LocalInfo::User(
|
local_info: ClearCrossCrate::Set(Box::new(LocalInfo::User(
|
||||||
BindingForm::RefForGuard,
|
BindingForm::RefForGuard,
|
||||||
))),
|
))),
|
||||||
|
|
|
@ -15,9 +15,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
||||||
/// N.B., **No cleanup is scheduled for this temporary.** You should
|
/// N.B., **No cleanup is scheduled for this temporary.** You should
|
||||||
/// call `schedule_drop` once the temporary is initialized.
|
/// call `schedule_drop` once the temporary is initialized.
|
||||||
pub(crate) fn temp(&mut self, ty: Ty<'tcx>, span: Span) -> Place<'tcx> {
|
pub(crate) fn temp(&mut self, ty: Ty<'tcx>, span: Span) -> Place<'tcx> {
|
||||||
// Mark this local as internal to avoid temporaries with types not present in the
|
let temp = self.local_decls.push(LocalDecl::new(ty, span));
|
||||||
// user's code resulting in ICEs from the generator transform.
|
|
||||||
let temp = self.local_decls.push(LocalDecl::new(ty, span).internal());
|
|
||||||
let place = Place::from(temp);
|
let place = Place::from(temp);
|
||||||
debug!("temp: created temp {:?} with type {:?}", place, self.local_decls[temp].ty);
|
debug!("temp: created temp {:?} with type {:?}", place, self.local_decls[temp].ty);
|
||||||
place
|
place
|
||||||
|
|
|
@ -725,7 +725,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
||||||
// Add a dummy `Assign` statement to the CFG, with the span for the source code's `continue`
|
// Add a dummy `Assign` statement to the CFG, with the span for the source code's `continue`
|
||||||
// statement.
|
// statement.
|
||||||
fn add_dummy_assignment(&mut self, span: Span, block: BasicBlock, source_info: SourceInfo) {
|
fn add_dummy_assignment(&mut self, span: Span, block: BasicBlock, source_info: SourceInfo) {
|
||||||
let local_decl = LocalDecl::new(Ty::new_unit(self.tcx), span).internal();
|
let local_decl = LocalDecl::new(Ty::new_unit(self.tcx), span);
|
||||||
let temp_place = Place::from(self.local_decls.push(local_decl));
|
let temp_place = Place::from(self.local_decls.push(local_decl));
|
||||||
self.cfg.push_assign_unit(block, source_info, temp_place, self.tcx);
|
self.cfg.push_assign_unit(block, source_info, temp_place, self.tcx);
|
||||||
}
|
}
|
||||||
|
|
|
@ -179,7 +179,7 @@ impl<'tcx> Visitor<'tcx> for UnsafetyChecker<'_, 'tcx> {
|
||||||
// Check the base local: it might be an unsafe-to-access static. We only check derefs of the
|
// Check the base local: it might be an unsafe-to-access static. We only check derefs of the
|
||||||
// temporary holding the static pointer to avoid duplicate errors
|
// temporary holding the static pointer to avoid duplicate errors
|
||||||
// <https://github.com/rust-lang/rust/pull/78068#issuecomment-731753506>.
|
// <https://github.com/rust-lang/rust/pull/78068#issuecomment-731753506>.
|
||||||
if decl.internal && place.projection.first() == Some(&ProjectionElem::Deref) {
|
if place.projection.first() == Some(&ProjectionElem::Deref) {
|
||||||
// If the projection root is an artificial local that we introduced when
|
// If the projection root is an artificial local that we introduced when
|
||||||
// desugaring `static`, give a more specific error message
|
// desugaring `static`, give a more specific error message
|
||||||
// (avoid the general "raw pointer" clause below, that would only be confusing).
|
// (avoid the general "raw pointer" clause below, that would only be confusing).
|
||||||
|
|
|
@ -37,7 +37,7 @@ impl<'a, 'tcx> MutVisitor<'tcx> for DerefChecker<'a, 'tcx> {
|
||||||
for (idx, (p_ref, p_elem)) in place.iter_projections().enumerate() {
|
for (idx, (p_ref, p_elem)) in place.iter_projections().enumerate() {
|
||||||
if !p_ref.projection.is_empty() && p_elem == ProjectionElem::Deref {
|
if !p_ref.projection.is_empty() && p_elem == ProjectionElem::Deref {
|
||||||
let ty = p_ref.ty(self.local_decls, self.tcx).ty;
|
let ty = p_ref.ty(self.local_decls, self.tcx).ty;
|
||||||
let temp = self.patcher.new_internal_with_info(
|
let temp = self.patcher.new_local_with_info(
|
||||||
ty,
|
ty,
|
||||||
self.local_decls[p_ref.local].source_info.span,
|
self.local_decls[p_ref.local].source_info.span,
|
||||||
LocalInfo::DerefTemp,
|
LocalInfo::DerefTemp,
|
||||||
|
|
|
@ -69,7 +69,7 @@ impl<'tcx, 'a> MutVisitor<'tcx> for ElaborateBoxDerefVisitor<'tcx, 'a> {
|
||||||
let (unique_ty, nonnull_ty, ptr_ty) =
|
let (unique_ty, nonnull_ty, ptr_ty) =
|
||||||
build_ptr_tys(tcx, base_ty.boxed_ty(), self.unique_did, self.nonnull_did);
|
build_ptr_tys(tcx, base_ty.boxed_ty(), self.unique_did, self.nonnull_did);
|
||||||
|
|
||||||
let ptr_local = self.patch.new_internal(ptr_ty, source_info.span);
|
let ptr_local = self.patch.new_temp(ptr_ty, source_info.span);
|
||||||
|
|
||||||
self.patch.add_assign(
|
self.patch.add_assign(
|
||||||
location,
|
location,
|
||||||
|
|
|
@ -271,7 +271,7 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
|
||||||
let tcx = self.tcx;
|
let tcx = self.tcx;
|
||||||
let patch = &mut self.patch;
|
let patch = &mut self.patch;
|
||||||
debug!("create_drop_flag({:?})", self.body.span);
|
debug!("create_drop_flag({:?})", self.body.span);
|
||||||
self.drop_flags[index].get_or_insert_with(|| patch.new_internal(tcx.types.bool, span));
|
self.drop_flags[index].get_or_insert_with(|| patch.new_temp(tcx.types.bool, span));
|
||||||
}
|
}
|
||||||
|
|
||||||
fn drop_flag(&mut self, index: MovePathIndex) -> Option<Place<'tcx>> {
|
fn drop_flag(&mut self, index: MovePathIndex) -> Option<Place<'tcx>> {
|
||||||
|
|
|
@ -321,7 +321,7 @@ impl<'tcx> TransformVisitor<'tcx> {
|
||||||
|
|
||||||
// Create a statement which reads the discriminant into a temporary
|
// Create a statement which reads the discriminant into a temporary
|
||||||
fn get_discr(&self, body: &mut Body<'tcx>) -> (Statement<'tcx>, Place<'tcx>) {
|
fn get_discr(&self, body: &mut Body<'tcx>) -> (Statement<'tcx>, Place<'tcx>) {
|
||||||
let temp_decl = LocalDecl::new(self.discr_ty, body.span).internal();
|
let temp_decl = LocalDecl::new(self.discr_ty, body.span);
|
||||||
let local_decls_len = body.local_decls.push(temp_decl);
|
let local_decls_len = body.local_decls.push(temp_decl);
|
||||||
let temp = Place::from(local_decls_len);
|
let temp = Place::from(local_decls_len);
|
||||||
|
|
||||||
|
|
|
@ -616,9 +616,7 @@ impl<'tcx> Inliner<'tcx> {
|
||||||
// If there are any locals without storage markers, give them storage only for the
|
// If there are any locals without storage markers, give them storage only for the
|
||||||
// duration of the call.
|
// duration of the call.
|
||||||
for local in callee_body.vars_and_temps_iter() {
|
for local in callee_body.vars_and_temps_iter() {
|
||||||
if !callee_body.local_decls[local].internal
|
if integrator.always_live_locals.contains(local) {
|
||||||
&& integrator.always_live_locals.contains(local)
|
|
||||||
{
|
|
||||||
let new_local = integrator.map_local(local);
|
let new_local = integrator.map_local(local);
|
||||||
caller_body[callsite.block].statements.push(Statement {
|
caller_body[callsite.block].statements.push(Statement {
|
||||||
source_info: callsite.source_info,
|
source_info: callsite.source_info,
|
||||||
|
@ -641,9 +639,7 @@ impl<'tcx> Inliner<'tcx> {
|
||||||
n += 1;
|
n += 1;
|
||||||
}
|
}
|
||||||
for local in callee_body.vars_and_temps_iter().rev() {
|
for local in callee_body.vars_and_temps_iter().rev() {
|
||||||
if !callee_body.local_decls[local].internal
|
if integrator.always_live_locals.contains(local) {
|
||||||
&& integrator.always_live_locals.contains(local)
|
|
||||||
{
|
|
||||||
let new_local = integrator.map_local(local);
|
let new_local = integrator.map_local(local);
|
||||||
caller_body[block].statements.push(Statement {
|
caller_body[block].statements.push(Statement {
|
||||||
source_info: callsite.source_info,
|
source_info: callsite.source_info,
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
_2 = const u8::MAX;
|
_2 = const u8::MAX;
|
||||||
StorageLive(_3);
|
StorageLive(_3);
|
||||||
_3 = const 1_u8;
|
_3 = const 1_u8;
|
||||||
|
StorageLive(_4);
|
||||||
- _4 = CheckedAdd(_2, _3);
|
- _4 = CheckedAdd(_2, _3);
|
||||||
- assert(!move (_4.1: bool), "attempt to compute `{} + {}`, which would overflow", _2, _3) -> [success: bb1, unwind unreachable];
|
- assert(!move (_4.1: bool), "attempt to compute `{} + {}`, which would overflow", _2, _3) -> [success: bb1, unwind unreachable];
|
||||||
+ _4 = const (0_u8, true);
|
+ _4 = const (0_u8, true);
|
||||||
|
@ -29,6 +30,7 @@
|
||||||
bb1: {
|
bb1: {
|
||||||
- _1 = move (_4.0: u8);
|
- _1 = move (_4.0: u8);
|
||||||
+ _1 = const 0_u8;
|
+ _1 = const 0_u8;
|
||||||
|
StorageDead(_4);
|
||||||
StorageDead(_3);
|
StorageDead(_3);
|
||||||
StorageDead(_2);
|
StorageDead(_2);
|
||||||
StorageDead(_1);
|
StorageDead(_1);
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
_2 = const u8::MAX;
|
_2 = const u8::MAX;
|
||||||
StorageLive(_3);
|
StorageLive(_3);
|
||||||
_3 = const 1_u8;
|
_3 = const 1_u8;
|
||||||
|
StorageLive(_4);
|
||||||
- _4 = CheckedAdd(_2, _3);
|
- _4 = CheckedAdd(_2, _3);
|
||||||
- assert(!move (_4.1: bool), "attempt to compute `{} + {}`, which would overflow", _2, _3) -> [success: bb1, unwind continue];
|
- assert(!move (_4.1: bool), "attempt to compute `{} + {}`, which would overflow", _2, _3) -> [success: bb1, unwind continue];
|
||||||
+ _4 = const (0_u8, true);
|
+ _4 = const (0_u8, true);
|
||||||
|
@ -29,6 +30,7 @@
|
||||||
bb1: {
|
bb1: {
|
||||||
- _1 = move (_4.0: u8);
|
- _1 = move (_4.0: u8);
|
||||||
+ _1 = const 0_u8;
|
+ _1 = const 0_u8;
|
||||||
|
StorageDead(_4);
|
||||||
StorageDead(_3);
|
StorageDead(_3);
|
||||||
StorageDead(_2);
|
StorageDead(_2);
|
||||||
StorageDead(_1);
|
StorageDead(_1);
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
_2 = const u8::MAX;
|
_2 = const u8::MAX;
|
||||||
StorageLive(_3);
|
StorageLive(_3);
|
||||||
_3 = const 1_u8;
|
_3 = const 1_u8;
|
||||||
|
StorageLive(_4);
|
||||||
- _4 = CheckedAdd(_2, _3);
|
- _4 = CheckedAdd(_2, _3);
|
||||||
- assert(!move (_4.1: bool), "attempt to compute `{} + {}`, which would overflow", _2, _3) -> [success: bb1, unwind unreachable];
|
- assert(!move (_4.1: bool), "attempt to compute `{} + {}`, which would overflow", _2, _3) -> [success: bb1, unwind unreachable];
|
||||||
+ _4 = CheckedAdd(const u8::MAX, const 1_u8);
|
+ _4 = CheckedAdd(const u8::MAX, const 1_u8);
|
||||||
|
@ -29,6 +30,7 @@
|
||||||
bb1: {
|
bb1: {
|
||||||
- _1 = move (_4.0: u8);
|
- _1 = move (_4.0: u8);
|
||||||
+ _1 = const 0_u8;
|
+ _1 = const 0_u8;
|
||||||
|
StorageDead(_4);
|
||||||
StorageDead(_3);
|
StorageDead(_3);
|
||||||
StorageDead(_2);
|
StorageDead(_2);
|
||||||
StorageDead(_1);
|
StorageDead(_1);
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
_2 = const u8::MAX;
|
_2 = const u8::MAX;
|
||||||
StorageLive(_3);
|
StorageLive(_3);
|
||||||
_3 = const 1_u8;
|
_3 = const 1_u8;
|
||||||
|
StorageLive(_4);
|
||||||
- _4 = CheckedAdd(_2, _3);
|
- _4 = CheckedAdd(_2, _3);
|
||||||
- assert(!move (_4.1: bool), "attempt to compute `{} + {}`, which would overflow", _2, _3) -> [success: bb1, unwind continue];
|
- assert(!move (_4.1: bool), "attempt to compute `{} + {}`, which would overflow", _2, _3) -> [success: bb1, unwind continue];
|
||||||
+ _4 = CheckedAdd(const u8::MAX, const 1_u8);
|
+ _4 = CheckedAdd(const u8::MAX, const 1_u8);
|
||||||
|
@ -29,6 +30,7 @@
|
||||||
bb1: {
|
bb1: {
|
||||||
- _1 = move (_4.0: u8);
|
- _1 = move (_4.0: u8);
|
||||||
+ _1 = const 0_u8;
|
+ _1 = const 0_u8;
|
||||||
|
StorageDead(_4);
|
||||||
StorageDead(_3);
|
StorageDead(_3);
|
||||||
StorageDead(_2);
|
StorageDead(_2);
|
||||||
StorageDead(_1);
|
StorageDead(_1);
|
||||||
|
|
|
@ -41,6 +41,8 @@ fn foo(_1: T, _2: i32) -> (i32, T) {
|
||||||
_7 = (move _8,);
|
_7 = (move _8,);
|
||||||
StorageLive(_9);
|
StorageLive(_9);
|
||||||
_9 = move (_7.0: i32);
|
_9 = move (_7.0: i32);
|
||||||
|
StorageLive(_10);
|
||||||
|
StorageLive(_12);
|
||||||
StorageLive(_11);
|
StorageLive(_11);
|
||||||
_10 = ((*_6).0: &i32);
|
_10 = ((*_6).0: &i32);
|
||||||
_11 = (*_10);
|
_11 = (*_10);
|
||||||
|
@ -50,6 +52,8 @@ fn foo(_1: T, _2: i32) -> (i32, T) {
|
||||||
_0 = (move _11, move _13);
|
_0 = (move _11, move _13);
|
||||||
StorageDead(_13);
|
StorageDead(_13);
|
||||||
StorageDead(_11);
|
StorageDead(_11);
|
||||||
|
StorageDead(_12);
|
||||||
|
StorageDead(_10);
|
||||||
StorageDead(_9);
|
StorageDead(_9);
|
||||||
StorageDead(_8);
|
StorageDead(_8);
|
||||||
StorageDead(_7);
|
StorageDead(_7);
|
||||||
|
|
|
@ -44,6 +44,8 @@
|
||||||
+ StorageDead(_3);
|
+ StorageDead(_3);
|
||||||
+ StorageLive(_6);
|
+ StorageLive(_6);
|
||||||
+ _6 = const false;
|
+ _6 = const false;
|
||||||
|
+ StorageLive(_7);
|
||||||
|
+ StorageLive(_8);
|
||||||
+ _7 = (_2.0: &mut {generator@$DIR/inline_generator.rs:16:5: 16:8});
|
+ _7 = (_2.0: &mut {generator@$DIR/inline_generator.rs:16:5: 16:8});
|
||||||
+ _8 = discriminant((*_7));
|
+ _8 = discriminant((*_7));
|
||||||
+ switchInt(move _8) -> [0: bb3, 1: bb7, 3: bb8, otherwise: bb9];
|
+ switchInt(move _8) -> [0: bb3, 1: bb7, 3: bb8, otherwise: bb9];
|
||||||
|
@ -52,6 +54,8 @@
|
||||||
bb1: {
|
bb1: {
|
||||||
- _3 = &mut _4;
|
- _3 = &mut _4;
|
||||||
- _2 = Pin::<&mut {generator@$DIR/inline_generator.rs:16:5: 16:8}>::new(move _3) -> [return: bb2, unwind unreachable];
|
- _2 = Pin::<&mut {generator@$DIR/inline_generator.rs:16:5: 16:8}>::new(move _3) -> [return: bb2, unwind unreachable];
|
||||||
|
+ StorageDead(_8);
|
||||||
|
+ StorageDead(_7);
|
||||||
+ StorageDead(_6);
|
+ StorageDead(_6);
|
||||||
+ StorageDead(_2);
|
+ StorageDead(_2);
|
||||||
+ drop(_4) -> [return: bb2, unwind unreachable];
|
+ drop(_4) -> [return: bb2, unwind unreachable];
|
||||||
|
|
|
@ -52,6 +52,8 @@
|
||||||
- _1 = <{generator@$DIR/inline_generator.rs:16:5: 16:8} as Generator<bool>>::resume(move _2, const false) -> [return: bb3, unwind: bb5];
|
- _1 = <{generator@$DIR/inline_generator.rs:16:5: 16:8} as Generator<bool>>::resume(move _2, const false) -> [return: bb3, unwind: bb5];
|
||||||
+ StorageLive(_6);
|
+ StorageLive(_6);
|
||||||
+ _6 = const false;
|
+ _6 = const false;
|
||||||
|
+ StorageLive(_7);
|
||||||
|
+ StorageLive(_8);
|
||||||
+ _7 = (_2.0: &mut {generator@$DIR/inline_generator.rs:16:5: 16:8});
|
+ _7 = (_2.0: &mut {generator@$DIR/inline_generator.rs:16:5: 16:8});
|
||||||
+ _8 = discriminant((*_7));
|
+ _8 = discriminant((*_7));
|
||||||
+ switchInt(move _8) -> [0: bb5, 1: bb9, 3: bb10, otherwise: bb11];
|
+ switchInt(move _8) -> [0: bb5, 1: bb9, 3: bb10, otherwise: bb11];
|
||||||
|
@ -59,6 +61,8 @@
|
||||||
|
|
||||||
- bb3: {
|
- bb3: {
|
||||||
+ bb1: {
|
+ bb1: {
|
||||||
|
+ StorageDead(_8);
|
||||||
|
+ StorageDead(_7);
|
||||||
+ StorageDead(_6);
|
+ StorageDead(_6);
|
||||||
StorageDead(_2);
|
StorageDead(_2);
|
||||||
- drop(_4) -> [return: bb4, unwind: bb6];
|
- drop(_4) -> [return: bb4, unwind: bb6];
|
||||||
|
|
|
@ -122,9 +122,14 @@
|
||||||
+ _3 = const _;
|
+ _3 = const _;
|
||||||
+ _2 = Vec::<u32> { buf: move _3, len: const 0_usize };
|
+ _2 = Vec::<u32> { buf: move _3, len: const 0_usize };
|
||||||
+ StorageDead(_3);
|
+ StorageDead(_3);
|
||||||
|
+ StorageLive(_4);
|
||||||
|
+ StorageLive(_5);
|
||||||
|
+ StorageLive(_6);
|
||||||
|
+ StorageLive(_7);
|
||||||
+ _4 = SizeOf(std::vec::Vec<u32>);
|
+ _4 = SizeOf(std::vec::Vec<u32>);
|
||||||
+ _5 = AlignOf(std::vec::Vec<u32>);
|
+ _5 = AlignOf(std::vec::Vec<u32>);
|
||||||
+ StorageLive(_8);
|
+ StorageLive(_8);
|
||||||
|
+ StorageLive(_10);
|
||||||
+ StorageLive(_11);
|
+ StorageLive(_11);
|
||||||
+ StorageLive(_12);
|
+ StorageLive(_12);
|
||||||
+ StorageLive(_13);
|
+ StorageLive(_13);
|
||||||
|
@ -178,10 +183,15 @@
|
||||||
+ StorageDead(_13);
|
+ StorageDead(_13);
|
||||||
+ StorageDead(_12);
|
+ StorageDead(_12);
|
||||||
+ StorageDead(_11);
|
+ StorageDead(_11);
|
||||||
|
+ StorageDead(_10);
|
||||||
+ StorageDead(_8);
|
+ StorageDead(_8);
|
||||||
+ _1 = ShallowInitBox(move _6, std::vec::Vec<u32>);
|
+ _1 = ShallowInitBox(move _6, std::vec::Vec<u32>);
|
||||||
+ _7 = (((_1.0: std::ptr::Unique<std::vec::Vec<u32>>).0: std::ptr::NonNull<std::vec::Vec<u32>>).0: *const std::vec::Vec<u32>);
|
+ _7 = (((_1.0: std::ptr::Unique<std::vec::Vec<u32>>).0: std::ptr::NonNull<std::vec::Vec<u32>>).0: *const std::vec::Vec<u32>);
|
||||||
+ (*_7) = move _2;
|
+ (*_7) = move _2;
|
||||||
|
+ StorageDead(_7);
|
||||||
|
+ StorageDead(_6);
|
||||||
|
+ StorageDead(_5);
|
||||||
|
+ StorageDead(_4);
|
||||||
StorageDead(_2);
|
StorageDead(_2);
|
||||||
_0 = const ();
|
_0 = const ();
|
||||||
- drop(_1) -> [return: bb3, unwind unreachable];
|
- drop(_1) -> [return: bb3, unwind unreachable];
|
||||||
|
|
|
@ -122,9 +122,14 @@
|
||||||
+ _3 = const _;
|
+ _3 = const _;
|
||||||
+ _2 = Vec::<u32> { buf: move _3, len: const 0_usize };
|
+ _2 = Vec::<u32> { buf: move _3, len: const 0_usize };
|
||||||
+ StorageDead(_3);
|
+ StorageDead(_3);
|
||||||
|
+ StorageLive(_4);
|
||||||
|
+ StorageLive(_5);
|
||||||
|
+ StorageLive(_6);
|
||||||
|
+ StorageLive(_7);
|
||||||
+ _4 = SizeOf(std::vec::Vec<u32>);
|
+ _4 = SizeOf(std::vec::Vec<u32>);
|
||||||
+ _5 = AlignOf(std::vec::Vec<u32>);
|
+ _5 = AlignOf(std::vec::Vec<u32>);
|
||||||
+ StorageLive(_8);
|
+ StorageLive(_8);
|
||||||
|
+ StorageLive(_10);
|
||||||
+ StorageLive(_11);
|
+ StorageLive(_11);
|
||||||
+ StorageLive(_12);
|
+ StorageLive(_12);
|
||||||
+ StorageLive(_13);
|
+ StorageLive(_13);
|
||||||
|
@ -195,10 +200,15 @@
|
||||||
+ StorageDead(_13);
|
+ StorageDead(_13);
|
||||||
+ StorageDead(_12);
|
+ StorageDead(_12);
|
||||||
+ StorageDead(_11);
|
+ StorageDead(_11);
|
||||||
|
+ StorageDead(_10);
|
||||||
+ StorageDead(_8);
|
+ StorageDead(_8);
|
||||||
+ _1 = ShallowInitBox(move _6, std::vec::Vec<u32>);
|
+ _1 = ShallowInitBox(move _6, std::vec::Vec<u32>);
|
||||||
+ _7 = (((_1.0: std::ptr::Unique<std::vec::Vec<u32>>).0: std::ptr::NonNull<std::vec::Vec<u32>>).0: *const std::vec::Vec<u32>);
|
+ _7 = (((_1.0: std::ptr::Unique<std::vec::Vec<u32>>).0: std::ptr::NonNull<std::vec::Vec<u32>>).0: *const std::vec::Vec<u32>);
|
||||||
+ (*_7) = move _2;
|
+ (*_7) = move _2;
|
||||||
|
+ StorageDead(_7);
|
||||||
|
+ StorageDead(_6);
|
||||||
|
+ StorageDead(_5);
|
||||||
|
+ StorageDead(_4);
|
||||||
+ StorageDead(_2);
|
+ StorageDead(_2);
|
||||||
+ _0 = const ();
|
+ _0 = const ();
|
||||||
+ drop(_1) -> [return: bb1, unwind: bb2];
|
+ drop(_1) -> [return: bb1, unwind: bb2];
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
bb0: {
|
bb0: {
|
||||||
- _0 = inner() -> [return: bb1, unwind unreachable];
|
- _0 = inner() -> [return: bb1, unwind unreachable];
|
||||||
+ StorageLive(_1);
|
+ StorageLive(_1);
|
||||||
|
+ StorageLive(_2);
|
||||||
+ _1 = const _;
|
+ _1 = const _;
|
||||||
+ _0 = index() -> [return: bb1, unwind unreachable];
|
+ _0 = index() -> [return: bb1, unwind unreachable];
|
||||||
}
|
}
|
||||||
|
@ -40,6 +41,7 @@
|
||||||
+
|
+
|
||||||
+ bb4: {
|
+ bb4: {
|
||||||
+ StorageDead(_3);
|
+ StorageDead(_3);
|
||||||
|
+ StorageDead(_2);
|
||||||
+ StorageDead(_1);
|
+ StorageDead(_1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
bb0: {
|
bb0: {
|
||||||
- _0 = inner() -> [return: bb1, unwind continue];
|
- _0 = inner() -> [return: bb1, unwind continue];
|
||||||
+ StorageLive(_1);
|
+ StorageLive(_1);
|
||||||
|
+ StorageLive(_2);
|
||||||
+ _1 = const _;
|
+ _1 = const _;
|
||||||
+ _0 = index() -> [return: bb1, unwind continue];
|
+ _0 = index() -> [return: bb1, unwind continue];
|
||||||
}
|
}
|
||||||
|
@ -40,6 +41,7 @@
|
||||||
+
|
+
|
||||||
+ bb4: {
|
+ bb4: {
|
||||||
+ StorageDead(_3);
|
+ StorageDead(_3);
|
||||||
|
+ StorageDead(_2);
|
||||||
+ StorageDead(_1);
|
+ StorageDead(_1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,9 +17,13 @@ fn b(_1: &mut Box<T>) -> &mut T {
|
||||||
StorageLive(_3);
|
StorageLive(_3);
|
||||||
StorageLive(_4);
|
StorageLive(_4);
|
||||||
_4 = &mut (*_1);
|
_4 = &mut (*_1);
|
||||||
|
StorageLive(_5);
|
||||||
|
StorageLive(_6);
|
||||||
_5 = deref_copy (*_4);
|
_5 = deref_copy (*_4);
|
||||||
_6 = (((_5.0: std::ptr::Unique<T>).0: std::ptr::NonNull<T>).0: *const T);
|
_6 = (((_5.0: std::ptr::Unique<T>).0: std::ptr::NonNull<T>).0: *const T);
|
||||||
_3 = &mut (*_6);
|
_3 = &mut (*_6);
|
||||||
|
StorageDead(_6);
|
||||||
|
StorageDead(_5);
|
||||||
_2 = &mut (*_3);
|
_2 = &mut (*_3);
|
||||||
StorageDead(_4);
|
StorageDead(_4);
|
||||||
_0 = &mut (*_2);
|
_0 = &mut (*_2);
|
||||||
|
|
|
@ -15,9 +15,13 @@ fn d(_1: &Box<T>) -> &T {
|
||||||
StorageLive(_2);
|
StorageLive(_2);
|
||||||
StorageLive(_3);
|
StorageLive(_3);
|
||||||
_3 = &(*_1);
|
_3 = &(*_1);
|
||||||
|
StorageLive(_4);
|
||||||
|
StorageLive(_5);
|
||||||
_4 = deref_copy (*_3);
|
_4 = deref_copy (*_3);
|
||||||
_5 = (((_4.0: std::ptr::Unique<T>).0: std::ptr::NonNull<T>).0: *const T);
|
_5 = (((_4.0: std::ptr::Unique<T>).0: std::ptr::NonNull<T>).0: *const T);
|
||||||
_2 = &(*_5);
|
_2 = &(*_5);
|
||||||
|
StorageDead(_5);
|
||||||
|
StorageDead(_4);
|
||||||
_0 = &(*_2);
|
_0 = &(*_2);
|
||||||
StorageDead(_3);
|
StorageDead(_3);
|
||||||
StorageDead(_2);
|
StorageDead(_2);
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
_2 = move _1;
|
_2 = move _1;
|
||||||
- _0 = Option::<T>::unwrap_unchecked(move _2) -> [return: bb1, unwind unreachable];
|
- _0 = Option::<T>::unwrap_unchecked(move _2) -> [return: bb1, unwind unreachable];
|
||||||
+ StorageLive(_3);
|
+ StorageLive(_3);
|
||||||
|
+ StorageLive(_4);
|
||||||
+ _4 = discriminant(_2);
|
+ _4 = discriminant(_2);
|
||||||
+ switchInt(move _4) -> [1: bb2, otherwise: bb1];
|
+ switchInt(move _4) -> [1: bb2, otherwise: bb1];
|
||||||
}
|
}
|
||||||
|
@ -40,6 +41,7 @@
|
||||||
+
|
+
|
||||||
+ bb2: {
|
+ bb2: {
|
||||||
+ _0 = move ((_2 as Some).0: T);
|
+ _0 = move ((_2 as Some).0: T);
|
||||||
|
+ StorageDead(_4);
|
||||||
+ StorageDead(_3);
|
+ StorageDead(_3);
|
||||||
StorageDead(_2);
|
StorageDead(_2);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
_2 = move _1;
|
_2 = move _1;
|
||||||
- _0 = Option::<T>::unwrap_unchecked(move _2) -> [return: bb1, unwind: bb2];
|
- _0 = Option::<T>::unwrap_unchecked(move _2) -> [return: bb1, unwind: bb2];
|
||||||
+ StorageLive(_3);
|
+ StorageLive(_3);
|
||||||
|
+ StorageLive(_4);
|
||||||
+ _4 = discriminant(_2);
|
+ _4 = discriminant(_2);
|
||||||
+ switchInt(move _4) -> [1: bb2, otherwise: bb1];
|
+ switchInt(move _4) -> [1: bb2, otherwise: bb1];
|
||||||
}
|
}
|
||||||
|
@ -44,6 +45,7 @@
|
||||||
- resume;
|
- resume;
|
||||||
+ bb2: {
|
+ bb2: {
|
||||||
+ _0 = move ((_2 as Some).0: T);
|
+ _0 = move ((_2 as Some).0: T);
|
||||||
|
+ StorageDead(_4);
|
||||||
+ StorageDead(_3);
|
+ StorageDead(_3);
|
||||||
+ StorageDead(_2);
|
+ StorageDead(_2);
|
||||||
+ return;
|
+ return;
|
||||||
|
|
|
@ -25,12 +25,14 @@ fn unwrap_unchecked(_1: Option<T>) -> T {
|
||||||
|
|
||||||
bb0: {
|
bb0: {
|
||||||
StorageLive(_3);
|
StorageLive(_3);
|
||||||
|
StorageLive(_2);
|
||||||
_2 = discriminant(_1);
|
_2 = discriminant(_1);
|
||||||
switchInt(move _2) -> [1: bb1, otherwise: bb2];
|
switchInt(move _2) -> [1: bb1, otherwise: bb2];
|
||||||
}
|
}
|
||||||
|
|
||||||
bb1: {
|
bb1: {
|
||||||
_0 = move ((_1 as Some).0: T);
|
_0 = move ((_1 as Some).0: T);
|
||||||
|
StorageDead(_2);
|
||||||
StorageDead(_3);
|
StorageDead(_3);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,12 +25,14 @@ fn unwrap_unchecked(_1: Option<T>) -> T {
|
||||||
|
|
||||||
bb0: {
|
bb0: {
|
||||||
StorageLive(_3);
|
StorageLive(_3);
|
||||||
|
StorageLive(_2);
|
||||||
_2 = discriminant(_1);
|
_2 = discriminant(_1);
|
||||||
switchInt(move _2) -> [1: bb1, otherwise: bb2];
|
switchInt(move _2) -> [1: bb1, otherwise: bb2];
|
||||||
}
|
}
|
||||||
|
|
||||||
bb1: {
|
bb1: {
|
||||||
_0 = move ((_1 as Some).0: T);
|
_0 = move ((_1 as Some).0: T);
|
||||||
|
StorageDead(_2);
|
||||||
StorageDead(_3);
|
StorageDead(_3);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@ fn num_to_digit(_1: char) -> u32 {
|
||||||
}
|
}
|
||||||
|
|
||||||
bb1: {
|
bb1: {
|
||||||
|
StorageLive(_3);
|
||||||
_3 = discriminant(_2);
|
_3 = discriminant(_2);
|
||||||
StorageDead(_7);
|
StorageDead(_7);
|
||||||
StorageDead(_2);
|
StorageDead(_2);
|
||||||
|
@ -37,11 +38,13 @@ fn num_to_digit(_1: char) -> u32 {
|
||||||
}
|
}
|
||||||
|
|
||||||
bb2: {
|
bb2: {
|
||||||
|
StorageDead(_3);
|
||||||
StorageLive(_4);
|
StorageLive(_4);
|
||||||
_4 = char::methods::<impl char>::to_digit(move _1, const 8_u32) -> [return: bb3, unwind unreachable];
|
_4 = char::methods::<impl char>::to_digit(move _1, const 8_u32) -> [return: bb3, unwind unreachable];
|
||||||
}
|
}
|
||||||
|
|
||||||
bb3: {
|
bb3: {
|
||||||
|
StorageLive(_5);
|
||||||
_5 = discriminant(_4);
|
_5 = discriminant(_4);
|
||||||
switchInt(move _5) -> [0: bb4, 1: bb5, otherwise: bb6];
|
switchInt(move _5) -> [0: bb4, 1: bb5, otherwise: bb6];
|
||||||
}
|
}
|
||||||
|
@ -52,6 +55,7 @@ fn num_to_digit(_1: char) -> u32 {
|
||||||
|
|
||||||
bb5: {
|
bb5: {
|
||||||
_0 = move ((_4 as Some).0: u32);
|
_0 = move ((_4 as Some).0: u32);
|
||||||
|
StorageDead(_5);
|
||||||
StorageDead(_4);
|
StorageDead(_4);
|
||||||
goto -> bb8;
|
goto -> bb8;
|
||||||
}
|
}
|
||||||
|
@ -61,6 +65,7 @@ fn num_to_digit(_1: char) -> u32 {
|
||||||
}
|
}
|
||||||
|
|
||||||
bb7: {
|
bb7: {
|
||||||
|
StorageDead(_3);
|
||||||
_0 = const 0_u32;
|
_0 = const 0_u32;
|
||||||
goto -> bb8;
|
goto -> bb8;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@ fn num_to_digit(_1: char) -> u32 {
|
||||||
}
|
}
|
||||||
|
|
||||||
bb1: {
|
bb1: {
|
||||||
|
StorageLive(_3);
|
||||||
_3 = discriminant(_2);
|
_3 = discriminant(_2);
|
||||||
StorageDead(_7);
|
StorageDead(_7);
|
||||||
StorageDead(_2);
|
StorageDead(_2);
|
||||||
|
@ -37,11 +38,13 @@ fn num_to_digit(_1: char) -> u32 {
|
||||||
}
|
}
|
||||||
|
|
||||||
bb2: {
|
bb2: {
|
||||||
|
StorageDead(_3);
|
||||||
StorageLive(_4);
|
StorageLive(_4);
|
||||||
_4 = char::methods::<impl char>::to_digit(move _1, const 8_u32) -> [return: bb3, unwind continue];
|
_4 = char::methods::<impl char>::to_digit(move _1, const 8_u32) -> [return: bb3, unwind continue];
|
||||||
}
|
}
|
||||||
|
|
||||||
bb3: {
|
bb3: {
|
||||||
|
StorageLive(_5);
|
||||||
_5 = discriminant(_4);
|
_5 = discriminant(_4);
|
||||||
switchInt(move _5) -> [0: bb4, 1: bb5, otherwise: bb6];
|
switchInt(move _5) -> [0: bb4, 1: bb5, otherwise: bb6];
|
||||||
}
|
}
|
||||||
|
@ -52,6 +55,7 @@ fn num_to_digit(_1: char) -> u32 {
|
||||||
|
|
||||||
bb5: {
|
bb5: {
|
||||||
_0 = move ((_4 as Some).0: u32);
|
_0 = move ((_4 as Some).0: u32);
|
||||||
|
StorageDead(_5);
|
||||||
StorageDead(_4);
|
StorageDead(_4);
|
||||||
goto -> bb8;
|
goto -> bb8;
|
||||||
}
|
}
|
||||||
|
@ -61,6 +65,7 @@ fn num_to_digit(_1: char) -> u32 {
|
||||||
}
|
}
|
||||||
|
|
||||||
bb7: {
|
bb7: {
|
||||||
|
StorageDead(_3);
|
||||||
_0 = const 0_u32;
|
_0 = const 0_u32;
|
||||||
goto -> bb8;
|
goto -> bb8;
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,8 +36,10 @@ fn step_forward(_1: u32, _2: usize) -> u32 {
|
||||||
|
|
||||||
bb1: {
|
bb1: {
|
||||||
StorageLive(_5);
|
StorageLive(_5);
|
||||||
|
StorageLive(_4);
|
||||||
_4 = discriminant(_3);
|
_4 = discriminant(_3);
|
||||||
_5 = Eq(_4, const 1_isize);
|
_5 = Eq(_4, const 1_isize);
|
||||||
|
StorageDead(_4);
|
||||||
_6 = Not(move _5);
|
_6 = Not(move _5);
|
||||||
StorageDead(_5);
|
StorageDead(_5);
|
||||||
switchInt(move _6) -> [0: bb2, otherwise: bb3];
|
switchInt(move _6) -> [0: bb2, otherwise: bb3];
|
||||||
|
|
|
@ -18,6 +18,7 @@ fn ezmap(_1: Option<i32>) -> Option<i32> {
|
||||||
}
|
}
|
||||||
|
|
||||||
bb0: {
|
bb0: {
|
||||||
|
StorageLive(_2);
|
||||||
_2 = discriminant(_1);
|
_2 = discriminant(_1);
|
||||||
switchInt(move _2) -> [0: bb1, 1: bb2, otherwise: bb4];
|
switchInt(move _2) -> [0: bb1, 1: bb2, otherwise: bb4];
|
||||||
}
|
}
|
||||||
|
@ -37,6 +38,7 @@ fn ezmap(_1: Option<i32>) -> Option<i32> {
|
||||||
}
|
}
|
||||||
|
|
||||||
bb3: {
|
bb3: {
|
||||||
|
StorageDead(_2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -98,6 +98,8 @@ fn variant_a::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:7:25: 7:39}, _2
|
||||||
StorageLive(_35);
|
StorageLive(_35);
|
||||||
StorageLive(_11);
|
StorageLive(_11);
|
||||||
_11 = _8;
|
_11 = _8;
|
||||||
|
StorageLive(_12);
|
||||||
|
StorageLive(_13);
|
||||||
_12 = deref_copy _4;
|
_12 = deref_copy _4;
|
||||||
_13 = deref_copy _11;
|
_13 = deref_copy _11;
|
||||||
StorageLive(_14);
|
StorageLive(_14);
|
||||||
|
@ -107,6 +109,8 @@ fn variant_a::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:7:25: 7:39}, _2
|
||||||
_16 = Le(move _14, move _15);
|
_16 = Le(move _14, move _15);
|
||||||
StorageDead(_15);
|
StorageDead(_15);
|
||||||
StorageDead(_14);
|
StorageDead(_14);
|
||||||
|
StorageDead(_13);
|
||||||
|
StorageDead(_12);
|
||||||
switchInt(move _16) -> [0: bb1, otherwise: bb2];
|
switchInt(move _16) -> [0: bb1, otherwise: bb2];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,6 +130,8 @@ fn variant_a::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:7:25: 7:39}, _2
|
||||||
StorageLive(_37);
|
StorageLive(_37);
|
||||||
StorageLive(_17);
|
StorageLive(_17);
|
||||||
_17 = _6;
|
_17 = _6;
|
||||||
|
StorageLive(_18);
|
||||||
|
StorageLive(_19);
|
||||||
_18 = deref_copy _10;
|
_18 = deref_copy _10;
|
||||||
_19 = deref_copy _17;
|
_19 = deref_copy _17;
|
||||||
StorageLive(_20);
|
StorageLive(_20);
|
||||||
|
@ -135,6 +141,8 @@ fn variant_a::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:7:25: 7:39}, _2
|
||||||
_22 = Le(move _20, move _21);
|
_22 = Le(move _20, move _21);
|
||||||
StorageDead(_21);
|
StorageDead(_21);
|
||||||
StorageDead(_20);
|
StorageDead(_20);
|
||||||
|
StorageDead(_19);
|
||||||
|
StorageDead(_18);
|
||||||
switchInt(move _22) -> [0: bb3, otherwise: bb8];
|
switchInt(move _22) -> [0: bb3, otherwise: bb8];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,6 +159,8 @@ fn variant_a::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:7:25: 7:39}, _2
|
||||||
StorageLive(_39);
|
StorageLive(_39);
|
||||||
StorageLive(_23);
|
StorageLive(_23);
|
||||||
_23 = _4;
|
_23 = _4;
|
||||||
|
StorageLive(_24);
|
||||||
|
StorageLive(_25);
|
||||||
_24 = deref_copy _8;
|
_24 = deref_copy _8;
|
||||||
_25 = deref_copy _23;
|
_25 = deref_copy _23;
|
||||||
StorageLive(_26);
|
StorageLive(_26);
|
||||||
|
@ -160,6 +170,8 @@ fn variant_a::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:7:25: 7:39}, _2
|
||||||
_28 = Le(move _26, move _27);
|
_28 = Le(move _26, move _27);
|
||||||
StorageDead(_27);
|
StorageDead(_27);
|
||||||
StorageDead(_26);
|
StorageDead(_26);
|
||||||
|
StorageDead(_25);
|
||||||
|
StorageDead(_24);
|
||||||
switchInt(move _28) -> [0: bb5, otherwise: bb6];
|
switchInt(move _28) -> [0: bb5, otherwise: bb6];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,6 +191,8 @@ fn variant_a::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:7:25: 7:39}, _2
|
||||||
StorageLive(_41);
|
StorageLive(_41);
|
||||||
StorageLive(_29);
|
StorageLive(_29);
|
||||||
_29 = _10;
|
_29 = _10;
|
||||||
|
StorageLive(_30);
|
||||||
|
StorageLive(_31);
|
||||||
_30 = deref_copy _6;
|
_30 = deref_copy _6;
|
||||||
_31 = deref_copy _29;
|
_31 = deref_copy _29;
|
||||||
StorageLive(_32);
|
StorageLive(_32);
|
||||||
|
@ -188,6 +202,8 @@ fn variant_a::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:7:25: 7:39}, _2
|
||||||
_0 = Le(move _32, move _33);
|
_0 = Le(move _32, move _33);
|
||||||
StorageDead(_33);
|
StorageDead(_33);
|
||||||
StorageDead(_32);
|
StorageDead(_32);
|
||||||
|
StorageDead(_31);
|
||||||
|
StorageDead(_30);
|
||||||
StorageDead(_29);
|
StorageDead(_29);
|
||||||
StorageDead(_41);
|
StorageDead(_41);
|
||||||
StorageDead(_40);
|
StorageDead(_40);
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
|
|
||||||
bb0: {
|
bb0: {
|
||||||
StorageLive(_3);
|
StorageLive(_3);
|
||||||
|
StorageLive(_9);
|
||||||
StorageLive(_10);
|
StorageLive(_10);
|
||||||
StorageLive(_11);
|
StorageLive(_11);
|
||||||
_9 = discriminant(_1);
|
_9 = discriminant(_1);
|
||||||
|
@ -57,6 +58,7 @@
|
||||||
bb1: {
|
bb1: {
|
||||||
StorageDead(_11);
|
StorageDead(_11);
|
||||||
StorageDead(_10);
|
StorageDead(_10);
|
||||||
|
StorageDead(_9);
|
||||||
_5 = discriminant(_3);
|
_5 = discriminant(_3);
|
||||||
switchInt(move _5) -> [0: bb2, 1: bb4, otherwise: bb3];
|
switchInt(move _5) -> [0: bb2, 1: bb4, otherwise: bb3];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue