Struct rustc_middle::thir::Block[−][src]

pub struct Block {
    pub targeted_by_break: bool,
    pub region_scope: Scope,
    pub opt_destruction_scope: Option<Scope>,
    pub span: Span,
    pub stmts: Box<[StmtId]>,
    pub expr: Option<ExprId>,
    pub safety_mode: BlockSafety,
}

Fields

targeted_by_break: bool

Whether the block itself has a label. Used by label: {} and try blocks.

This does not include labels on loops, e.g. 'label: loop {}.

region_scope: Scopeopt_destruction_scope: Option<Scope>span: Span

The span of the block, including the opening braces, the label, and the unsafe keyword, if present.

stmts: Box<[StmtId]>

The statements in the blocK.

expr: Option<ExprId>

The trailing expression of the block, if any.

safety_mode: BlockSafety

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Layout

Note: Most layout information is completely unstable and may be different between compiler versions and platforms. 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: 56 bytes