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

struct BlockContext(Vec<BlockFrame>);

Implementations

impl BlockContext[src]

fn new() -> Self[src]

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

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

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.

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.