Enum rustc_mir_build::build::BlockFrame
source · [−]enum BlockFrame {
Statement {
ignores_expr_result: bool,
},
TailExpr {
tail_result_is_ignored: bool,
span: Span,
},
SubExpr,
}
Variants
Statement
Fields
ignores_expr_result: bool
If true, then statement discards result from evaluating the expression (such as examples 1 and 2 above).
Evaluation is currently within a statement.
Examples include:
EXPR;
let _ = EXPR;
let x = EXPR;
TailExpr
Fields
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.
Evaluation is currently within the tail expression of a block.
Example: { STMT_1; STMT_2; EXPR }
SubExpr
Generic mark meaning that the block occurred as a subexpression where the result might be used.
Examples: foo(EXPR)
, match EXPR { ... }
Implementations
sourceimpl BlockFrame
impl BlockFrame
fn is_tail_expr(&self) -> bool
fn is_statement(&self) -> bool
Trait Implementations
sourceimpl Debug for BlockFrame
impl Debug for BlockFrame
sourceimpl PartialEq<BlockFrame> for BlockFrame
impl PartialEq<BlockFrame> for BlockFrame
sourcefn eq(&self, other: &BlockFrame) -> bool
fn eq(&self, other: &BlockFrame) -> bool
impl Eq for BlockFrame
impl StructuralEq for BlockFrame
impl StructuralPartialEq for BlockFrame
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 12 bytes
Size for each variant:
Statement
: 1 byteTailExpr
: 11 bytesSubExpr
: 0 bytes