[−][src]Struct rustc_mir::util::elaborate_drops::DropCtxt
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Fields
elaborator: &'l mut D
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
source_info: SourceInfo
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
place: &'l Place<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
path: D::Path
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
succ: BasicBlock
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
unwind: Unwind
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Methods
impl<'l, 'b, 'tcx, D> DropCtxt<'l, 'b, 'tcx, D> where
D: DropElaborator<'b, 'tcx>, [src]
impl<'l, 'b, 'tcx, D> DropCtxt<'l, 'b, 'tcx, D> where
D: DropElaborator<'b, 'tcx>, fn place_ty(&self, place: &Place<'tcx>) -> Ty<'tcx>[src]
fn place_ty(&self, place: &Place<'tcx>) -> Ty<'tcx>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn tcx(&self) -> TyCtxt<'b, 'tcx, 'tcx>[src]
fn tcx(&self) -> TyCtxt<'b, 'tcx, 'tcx>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn elaborate_drop<'a>(&mut self, bb: BasicBlock)[src]
pub fn elaborate_drop<'a>(&mut self, bb: BasicBlock)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
This elaborates a single drop instruction, located at bb, and
patches over it.
The elaborated drop checks the drop flags to only drop what is initialized.
In addition, the relevant drop flags also need to be cleared to avoid double-drops. However, in the middle of a complex drop, one must avoid clearing some of the flags before they are read, as that would cause a memory leak.
In particular, when dropping an ADT, multiple fields may be
joined together under the rest subpath. They are all controlled
by the primary drop flag, but only the last rest-field dropped
should clear it (and it must also not clear anything else).
FIXME: I think we should just control the flags externally and then we do not need this machinery.
fn move_paths_for_fields(
&self,
base_place: &Place<'tcx>,
variant_path: D::Path,
variant: &'tcx VariantDef,
substs: &'tcx Substs<'tcx>
) -> Vec<(Place<'tcx>, Option<D::Path>)>[src]
fn move_paths_for_fields(
&self,
base_place: &Place<'tcx>,
variant_path: D::Path,
variant: &'tcx VariantDef,
substs: &'tcx Substs<'tcx>
) -> Vec<(Place<'tcx>, Option<D::Path>)>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Return the place and move path for each field of variant,
(the move path is None if the field is a rest field).
fn drop_subpath(
&mut self,
place: &Place<'tcx>,
path: Option<D::Path>,
succ: BasicBlock,
unwind: Unwind
) -> BasicBlock[src]
fn drop_subpath(
&mut self,
place: &Place<'tcx>,
path: Option<D::Path>,
succ: BasicBlock,
unwind: Unwind
) -> BasicBlock🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn drop_halfladder(
&mut self,
unwind_ladder: &[Unwind],
succ: BasicBlock,
fields: &[(Place<'tcx>, Option<D::Path>)]
) -> Vec<BasicBlock>[src]
fn drop_halfladder(
&mut self,
unwind_ladder: &[Unwind],
succ: BasicBlock,
fields: &[(Place<'tcx>, Option<D::Path>)]
) -> Vec<BasicBlock>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Create one-half of the drop ladder for a list of fields, and return the list of steps in it in reverse order, with the first step dropping 0 fields and so on.
unwind_ladder is such a list of steps in reverse order,
which is called if the matching step of the drop glue panics.
fn drop_ladder_bottom(&mut self) -> (BasicBlock, Unwind)[src]
fn drop_ladder_bottom(&mut self) -> (BasicBlock, Unwind)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn drop_ladder<'a>(
&mut self,
fields: Vec<(Place<'tcx>, Option<D::Path>)>,
succ: BasicBlock,
unwind: Unwind
) -> (BasicBlock, Unwind)[src]
fn drop_ladder<'a>(
&mut self,
fields: Vec<(Place<'tcx>, Option<D::Path>)>,
succ: BasicBlock,
unwind: Unwind
) -> (BasicBlock, Unwind)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Create a full drop ladder, consisting of 2 connected half-drop-ladders
For example, with 3 fields, the drop ladder is
.d0:
ELAB(drop location.0 [target=.d1, unwind=.c1])
.d1:
ELAB(drop location.1 [target=.d2, unwind=.c2])
.d2:
ELAB(drop location.2 [target=self.succ, unwind=self.unwind])
.c1:
ELAB(drop location.1 [target=.c2])
.c2:
ELAB(drop location.2 [target=self.unwind])
NOTE: this does not clear the master drop flag, so you need
to point succ/unwind on a drop_ladder_bottom.
fn open_drop_for_tuple<'a>(&mut self, tys: &[Ty<'tcx>]) -> BasicBlock[src]
fn open_drop_for_tuple<'a>(&mut self, tys: &[Ty<'tcx>]) -> BasicBlock🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn open_drop_for_box<'a>(
&mut self,
adt: &'tcx AdtDef,
substs: &'tcx Substs<'tcx>
) -> BasicBlock[src]
fn open_drop_for_box<'a>(
&mut self,
adt: &'tcx AdtDef,
substs: &'tcx Substs<'tcx>
) -> BasicBlock🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn open_drop_for_adt<'a>(
&mut self,
adt: &'tcx AdtDef,
substs: &'tcx Substs<'tcx>
) -> BasicBlock[src]
fn open_drop_for_adt<'a>(
&mut self,
adt: &'tcx AdtDef,
substs: &'tcx Substs<'tcx>
) -> BasicBlock🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn open_drop_for_adt_contents(
&mut self,
adt: &'tcx AdtDef,
substs: &'tcx Substs<'tcx>
) -> (BasicBlock, Unwind)[src]
fn open_drop_for_adt_contents(
&mut self,
adt: &'tcx AdtDef,
substs: &'tcx Substs<'tcx>
) -> (BasicBlock, Unwind)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn open_drop_for_multivariant(
&mut self,
adt: &'tcx AdtDef,
substs: &'tcx Substs<'tcx>,
succ: BasicBlock,
unwind: Unwind
) -> (BasicBlock, Unwind)[src]
fn open_drop_for_multivariant(
&mut self,
adt: &'tcx AdtDef,
substs: &'tcx Substs<'tcx>,
succ: BasicBlock,
unwind: Unwind
) -> (BasicBlock, Unwind)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn adt_switch_block(
&mut self,
adt: &'tcx AdtDef,
blocks: Vec<BasicBlock>,
values: &[u128],
succ: BasicBlock,
unwind: Unwind
) -> BasicBlock[src]
fn adt_switch_block(
&mut self,
adt: &'tcx AdtDef,
blocks: Vec<BasicBlock>,
values: &[u128],
succ: BasicBlock,
unwind: Unwind
) -> BasicBlock🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn destructor_call_block<'a>(
&mut self,
(succ, unwind): (BasicBlock, Unwind)
) -> BasicBlock[src]
fn destructor_call_block<'a>(
&mut self,
(succ, unwind): (BasicBlock, Unwind)
) -> BasicBlock🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn drop_loop(
&mut self,
succ: BasicBlock,
cur: Local,
length_or_end: &Place<'tcx>,
ety: Ty<'tcx>,
unwind: Unwind,
ptr_based: bool
) -> BasicBlock[src]
fn drop_loop(
&mut self,
succ: BasicBlock,
cur: Local,
length_or_end: &Place<'tcx>,
ety: Ty<'tcx>,
unwind: Unwind,
ptr_based: bool
) -> BasicBlock🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
create a loop that drops an array:
loop-block: can_go = cur == length_or_end if can_go then succ else drop-block drop-block: if ptr_based { ptr = &mut *cur cur = cur.offset(1) } else { ptr = &mut P[cur] cur = cur + 1 } drop(ptr)
fn open_drop_for_array(
&mut self,
ety: Ty<'tcx>,
opt_size: Option<u64>
) -> BasicBlock[src]
fn open_drop_for_array(
&mut self,
ety: Ty<'tcx>,
opt_size: Option<u64>
) -> BasicBlock🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn drop_loop_pair(&mut self, ety: Ty<'tcx>, ptr_based: bool) -> BasicBlock[src]
fn drop_loop_pair(&mut self, ety: Ty<'tcx>, ptr_based: bool) -> BasicBlock🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn open_drop<'a>(&mut self) -> BasicBlock[src]
fn open_drop<'a>(&mut self) -> BasicBlock🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
The slow-path - create an "open", elaborated drop for a type
which is moved-out-of only partially, and patch bb to a jump
to it. This must not be called on ADTs with a destructor,
as these can't be moved-out-of, except for Box<T>, which is
special-cased.
This creates a "drop ladder" that drops the needed fields of the ADT, both in the success case or if one of the destructors fail.
fn complete_drop<'a>(
&mut self,
drop_mode: Option<DropFlagMode>,
succ: BasicBlock,
unwind: Unwind
) -> BasicBlock[src]
fn complete_drop<'a>(
&mut self,
drop_mode: Option<DropFlagMode>,
succ: BasicBlock,
unwind: Unwind
) -> BasicBlock🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Return a basic block that drop a place using the context
and path in c. If mode is something, also clear c
according to it.
if FLAG(self.path) if let Some(mode) = mode: FLAG(self.path)[mode] = false drop(self.place)
fn drop_flag_reset_block(
&mut self,
mode: DropFlagMode,
succ: BasicBlock,
unwind: Unwind
) -> BasicBlock[src]
fn drop_flag_reset_block(
&mut self,
mode: DropFlagMode,
succ: BasicBlock,
unwind: Unwind
) -> BasicBlock🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn elaborated_drop_block<'a>(&mut self) -> BasicBlock[src]
fn elaborated_drop_block<'a>(&mut self) -> BasicBlock🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn box_free_block<'a>(
&mut self,
adt: &'tcx AdtDef,
substs: &'tcx Substs<'tcx>,
target: BasicBlock,
unwind: Unwind
) -> BasicBlock[src]
fn box_free_block<'a>(
&mut self,
adt: &'tcx AdtDef,
substs: &'tcx Substs<'tcx>,
target: BasicBlock,
unwind: Unwind
) -> BasicBlock🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn unelaborated_free_block<'a>(
&mut self,
adt: &'tcx AdtDef,
substs: &'tcx Substs<'tcx>,
target: BasicBlock,
unwind: Unwind
) -> BasicBlock[src]
fn unelaborated_free_block<'a>(
&mut self,
adt: &'tcx AdtDef,
substs: &'tcx Substs<'tcx>,
target: BasicBlock,
unwind: Unwind
) -> BasicBlock🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn drop_block<'a>(&mut self, target: BasicBlock, unwind: Unwind) -> BasicBlock[src]
fn drop_block<'a>(&mut self, target: BasicBlock, unwind: Unwind) -> BasicBlock🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn drop_flag_test_block(
&mut self,
on_set: BasicBlock,
on_unset: BasicBlock,
unwind: Unwind
) -> BasicBlock[src]
fn drop_flag_test_block(
&mut self,
on_set: BasicBlock,
on_unset: BasicBlock,
unwind: Unwind
) -> BasicBlock🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn new_block<'a>(
&mut self,
unwind: Unwind,
k: TerminatorKind<'tcx>
) -> BasicBlock[src]
fn new_block<'a>(
&mut self,
unwind: Unwind,
k: TerminatorKind<'tcx>
) -> BasicBlock🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn new_temp(&mut self, ty: Ty<'tcx>) -> Local[src]
fn new_temp(&mut self, ty: Ty<'tcx>) -> Local🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn terminator_loc(&mut self, bb: BasicBlock) -> Location[src]
fn terminator_loc(&mut self, bb: BasicBlock) -> Location🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn constant_usize(&self, val: u16) -> Operand<'tcx>[src]
fn constant_usize(&self, val: u16) -> Operand<'tcx>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn assign(&self, lhs: &Place<'tcx>, rhs: Rvalue<'tcx>) -> Statement<'tcx>[src]
fn assign(&self, lhs: &Place<'tcx>, rhs: Rvalue<'tcx>) -> Statement<'tcx>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Trait Implementations
impl<'l, 'b: 'l, 'tcx: 'b, D: Debug> Debug for DropCtxt<'l, 'b, 'tcx, D> where
D: DropElaborator<'b, 'tcx> + 'l,
D::Path: Debug, [src]
impl<'l, 'b: 'l, 'tcx: 'b, D: Debug> Debug for DropCtxt<'l, 'b, 'tcx, D> where
D: DropElaborator<'b, 'tcx> + 'l,
D::Path: Debug, Auto Trait Implementations
impl<'l, 'b, 'tcx, D> !Send for DropCtxt<'l, 'b, 'tcx, D>
impl<'l, 'b, 'tcx, D> !Send for DropCtxt<'l, 'b, 'tcx, D>impl<'l, 'b, 'tcx, D> !Sync for DropCtxt<'l, 'b, 'tcx, D>
impl<'l, 'b, 'tcx, D> !Sync for DropCtxt<'l, 'b, 'tcx, D>Blanket Implementations
impl<T> From for T[src]
impl<T> From for Timpl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>try_from)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, ⓘImportant traits for &'a mut Rfn borrow(&self) -> &T[src]
fn borrow(&self) -> &TImmutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>try_from)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, ⓘImportant traits for &'a mut Rfn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut TMutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeId🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static
Gets the TypeId of self. Read more
impl<E> SpecializationError for E[src]
impl<E> SpecializationError for Efn not_found<S, T>(trait_name: &'static str, method_name: &'static str) -> E where
T: ?Sized, [src]
fn not_found<S, T>(trait_name: &'static str, method_name: &'static str) -> E where
T: ?Sized, 🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Create an error for a missing method specialization. Defaults to panicking with type, trait & method names. S is the encoder/decoder state type, T is the type being encoded/decoded, and the arguments are the names of the trait and method that should've been overridden. Read more
impl<T> Erased for T[src]
impl<T> Erased for Timpl<T> Send for T where
T: ?Sized, [src]
impl<T> Send for T where
T: ?Sized, impl<T> Sync for T where
T: ?Sized, [src]
impl<T> Sync for T where
T: ?Sized, impl<T> Erased for T
impl<T> Erased for Timpl<T> MaybeResult for T[src]
impl<T> MaybeResult for Tfn from_ok(x: T) -> T[src]
fn from_ok(x: T) -> T🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn map_same<F>(self, f: F) -> T where
F: FnOnce(T) -> T, [src]
fn map_same<F>(self, f: F) -> T where
F: FnOnce(T) -> T, 🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
impl<'a, T> Captures for T where
T: ?Sized, [src]
impl<'a, T> Captures for T where
T: ?Sized,