[−][src]Enum rustc_mir_build::build::BlockFrame

pub(in build) enum BlockFrame {
    Statement {
        ignores_expr_result: bool,
    },
    TailExpr {
        tail_result_is_ignored: bool,
        span: Span,
    },
    SubExpr,
}

Variants

Statement

Evaluation is currently within a statement.

Examples include:

  1. EXPR;
  2. let _ = EXPR;
  3. let x = EXPR;

Fields of Statement

ignores_expr_result: bool

If true, then statement discards result from evaluating the expression (such as examples 1 and 2 above).

TailExpr

Evaluation is currently within the tail expression of a block.

Example: { STMT_1; STMT_2; EXPR }

Fields of TailExpr

tail_result_is_ignored: bool

If true, then the surrounding context of the block ignores the result of evaluating the block's tail expression.

Example: let _ = { STMT_1; EXPR };

span: Span

Span of the tail expression.

SubExpr

Generic mark meaning that the block occurred as a subexpression where the result might be used.

Examples: foo(EXPR), match EXPR { ... }

Implementations

impl BlockFrame[src]

pub(in build) fn is_tail_expr(
    &self
) -> bool
[src]

pub(in build) fn is_statement(
    &self
) -> bool
[src]

Trait Implementations

impl Debug for BlockFrame[src]

impl Eq for BlockFrame[src]

impl PartialEq<BlockFrame> for BlockFrame[src]

impl StructuralEq for BlockFrame[src]

impl StructuralPartialEq for BlockFrame[src]

Auto Trait Implementations

impl RefUnwindSafe for BlockFrame

impl !Send for BlockFrame

impl !Sync for BlockFrame

impl Unpin for BlockFrame

impl UnwindSafe for BlockFrame

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.