[−][src]Struct rustc_mir::transform::elaborate_drops::ElaborateDropsCtxt
Fields
tcx: TyCtxt<'tcx>body: &'a Body<'tcx>env: &'a MoveDataParamEnv<'tcx>init_data: InitializationData<'a, 'tcx>drop_flags: FxHashMap<MovePathIndex, Local>patch: MirPatch<'tcx>Implementations
impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx>[src]
pub(in transform::elaborate_drops) fn move_data(
&self
) -> &'b MoveData<'tcx>[src]
&self
) -> &'b MoveData<'tcx>
pub(in transform::elaborate_drops) fn param_env(
&self
) -> ParamEnv<'tcx>[src]
&self
) -> ParamEnv<'tcx>
pub(in transform::elaborate_drops) fn create_drop_flag(
&mut self,
index: MovePathIndex,
span: Span
)[src]
&mut self,
index: MovePathIndex,
span: Span
)
pub(in transform::elaborate_drops) fn drop_flag(
&mut self,
index: MovePathIndex
) -> Option<Place<'tcx>>[src]
&mut self,
index: MovePathIndex
) -> Option<Place<'tcx>>
pub(in transform::elaborate_drops) fn elaborate(
self
) -> MirPatch<'tcx>[src]
self
) -> MirPatch<'tcx>
create a patch that elaborates all drops in the input MIR.
pub(in transform::elaborate_drops) fn collect_drop_flags(
&mut self
)[src]
&mut self
)
pub(in transform::elaborate_drops) fn elaborate_drops(
&mut self
)[src]
&mut self
)
pub(in transform::elaborate_drops) fn elaborate_replace(
&mut self,
loc: Location,
place: Place<'tcx>,
value: &Operand<'tcx>,
target: BasicBlock,
unwind: Option<BasicBlock>
)[src]
&mut self,
loc: Location,
place: Place<'tcx>,
value: &Operand<'tcx>,
target: BasicBlock,
unwind: Option<BasicBlock>
)
Elaborate a MIR replace terminator. This instruction
is not directly handled by codegen, and therefore
must be desugared.
The desugaring drops the location if needed, and then writes the value (including setting the drop flag) over it in both arms.
The replace terminator can also be called on places that
are not tracked by elaboration (for example,
replace x[i] <- tmp0). The borrow checker requires that
these locations are initialized before the assignment,
so we just generate an unconditional drop.
pub(in transform::elaborate_drops) fn constant_bool(
&self,
span: Span,
val: bool
) -> Rvalue<'tcx>[src]
&self,
span: Span,
val: bool
) -> Rvalue<'tcx>
pub(in transform::elaborate_drops) fn set_drop_flag(
&mut self,
loc: Location,
path: MovePathIndex,
val: DropFlagState
)[src]
&mut self,
loc: Location,
path: MovePathIndex,
val: DropFlagState
)
pub(in transform::elaborate_drops) fn drop_flags_on_init(
&mut self
)[src]
&mut self
)
pub(in transform::elaborate_drops) fn drop_flags_for_fn_rets(
&mut self
)[src]
&mut self
)
pub(in transform::elaborate_drops) fn drop_flags_for_args(
&mut self
)[src]
&mut self
)
pub(in transform::elaborate_drops) fn drop_flags_for_locs(
&mut self
)[src]
&mut self
)
Auto Trait Implementations
impl<'a, 'tcx> !RefUnwindSafe for ElaborateDropsCtxt<'a, 'tcx>
impl<'a, 'tcx> !Send for ElaborateDropsCtxt<'a, 'tcx>
impl<'a, 'tcx> !Sync for ElaborateDropsCtxt<'a, 'tcx>
impl<'a, 'tcx> Unpin for ElaborateDropsCtxt<'a, 'tcx> where
'tcx: 'a,
'tcx: 'a,
impl<'a, 'tcx> !UnwindSafe for ElaborateDropsCtxt<'a, 'tcx>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.