[−][src]Struct rustc_mir_build::build::BlockContext

pub(in build) struct BlockContext(Vec<BlockFrame>);

Implementations

impl BlockContext[src]

pub(in build) fn new(
) -> Self
[src]

pub(in build) fn push(
    &mut self,
    bf: BlockFrame
)
[src]

pub(in build) fn pop(
    &mut self
) -> Option<BlockFrame>
[src]

pub(in build) fn currently_in_block_tail(
    &self
) -> Option<BlockTailInfo>
[src]

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]

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

impl Debug for BlockContext[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.