Struct rustc_typeck::middle::region::FirstStatementIndex[−][src]

pub struct FirstStatementIndex {
    private: u32,
}
Expand description

Represents a subscope of block for a binding that is introduced by block.stmts[first_statement_index]. Such subscopes represent a suffix of the block. Note that each subscope does not include the initializer expression, if any, for the statement indexed by first_statement_index.

For example, given { let (a, b) = EXPR_1; let c = EXPR_2; ... }:

  • The subscope with first_statement_index == 0 is scope of both a and b; it does not include EXPR_1, but does include everything after that first let. (If you want a scope that includes EXPR_1 as well, then do not use Scope::Remainder, but instead another Scope that encompasses the whole block, e.g., Scope::Node.

  • The subscope with first_statement_index == 1 is scope of c, and thus does not include EXPR_2, but covers the ....

Fields

private: u32

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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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 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: 4 bytes