[−][src]Struct rustc_mir_build::build::BlockContext
Implementations
impl BlockContext[src]
pub(in build) fn new(
) -> Self[src]
) -> Self
pub(in build) fn push(
&mut self,
bf: BlockFrame
)[src]
&mut self,
bf: BlockFrame
)
pub(in build) fn pop(
&mut self
) -> Option<BlockFrame>[src]
&mut self
) -> Option<BlockFrame>
pub(in build) fn currently_in_block_tail(
&self
) -> Option<BlockTailInfo>[src]
&self
) -> Option<BlockTailInfo>
Traverses the frames on the BlockContext, searching for either
the first block-tail expression frame with no intervening
statement frame.
Notably, this skips over SubExpr frames; this method is
meant to be used in the context of understanding the
relationship of a temp (created within some complicated
expression) with its containing expression, and whether the
value of that containing expression (not the temp!) is
ignored.
pub(in build) fn currently_ignores_tail_results(
&self
) -> bool[src]
&self
) -> bool
Looks at the topmost frame on the BlockContext and reports whether its one that would discard a block tail result.
Unlike currently_within_ignored_tail_expression, this does
not skip over SubExpr frames: here, we want to know
whether the block result itself is discarded.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for BlockContext
impl !Send for BlockContext
impl !Sync for BlockContext
impl Unpin for BlockContext
impl UnwindSafe for BlockContext
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<'a, T> Captures<'a> for T where
T: ?Sized, [src]
T: ?Sized,
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>,