Struct rustc::middle::region::BlockRemainderUnstable
[-] [+]
[src]
pub struct BlockRemainder {
pub block: NodeId,
pub first_statement_index: usize,
}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 == 0is scope of bothaandb; it does not include EXPR_1, but does include everything after that firstlet. (If you want a scope that includes EXPR_1 as well, then do not useCodeExtent::Remainder, but instead anotherCodeExtentthat encompasses the whole block, e.g.CodeExtent::Misc.the subscope with
first_statement_index == 1is scope ofc, and thus does not include EXPR_2, but covers the....
Fields
block | |
first_statement_index |