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

enum BlockFrame {
    Statement {
        ignores_expr_result: bool,
    },
    TailExpr {
        tail_result_is_ignored: bool,
        span: Span,
    },
    SubExpr,
}

Variants

Statement
Expand description

Evaluation is currently within a statement.

Examples include:

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

Fields of Statement

ignores_expr_result: bool
Expand description

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

TailExpr
Expand description

Evaluation is currently within the tail expression of a block.

Example: { STMT_1; STMT_2; EXPR }

Show fields

Fields of TailExpr

tail_result_is_ignored: bool
Expand description

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
Expand description

Span of the tail expression.

SubExpr
Expand description

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]

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

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

Trait Implementations

impl Debug for BlockFrame[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl PartialEq<BlockFrame> for BlockFrame[src]

fn eq(&self, other: &BlockFrame) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &BlockFrame) -> bool[src]

This method tests for !=.

impl Eq 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]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

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