Struct rustc::hir::Block
[−]
[src]
pub struct Block {
pub stmts: HirVec<Stmt>,
pub expr: Option<P<Expr>>,
pub id: NodeId,
pub hir_id: HirId,
pub rules: BlockCheckMode,
pub span: Span,
pub targeted_by_break: bool,
pub recovered: bool,
}🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Fields
stmts: HirVec<Stmt>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Statements in a block
expr: Option<P<Expr>>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
An expression at the end of the block without a semicolon, if any
id: NodeId
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
hir_id: HirId
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
rules: BlockCheckMode
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Distinguishes between unsafe { ... } and { ... }
span: Span
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
targeted_by_break: bool
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
If true, then there may exist break 'a values that aim to
break out of this block early. As of this writing, this is not
currently permitted in Rust itself, but it is generated as
part of catch statements.
recovered: bool
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
If true, don't emit return value type errors as the parser had to recover from a parse error so this block will not have an appropriate type. A parse error will have been emitted so the compilation will never succeed if this is true.
Trait Implementations
impl Clone for Block[src]
impl Clone for Blockfn clone(&self) -> Block[src]
fn clone(&self) -> BlockReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl PartialEq for Block[src]
impl PartialEq for Blockfn eq(&self, __arg_0: &Block) -> bool[src]
fn eq(&self, __arg_0: &Block) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &Block) -> bool[src]
fn ne(&self, __arg_0: &Block) -> boolThis method tests for !=.
impl Eq for Block[src]
impl Eq for Blockimpl Encodable for Block[src]
impl Encodable for Blockfn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>[src]
fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
impl Decodable for Block[src]
impl Decodable for Blockfn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<Block, __D::Error>[src]
fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<Block, __D::Error>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
impl Hash for Block[src]
impl Hash for Blockfn hash<__H: Hasher>(&self, __arg_0: &mut __H)[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl Debug for Block[src]
impl Debug for Blockfn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
fn fmt(&self, __arg_0: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<'a> HashStable<StableHashingContext<'a>> for Block[src]
impl<'a> HashStable<StableHashingContext<'a>> for Blockfn hash_stable<W: StableHasherResult>(
&self,
hcx: &mut StableHashingContext<'a>,
hasher: &mut StableHasher<W>
)[src]
fn hash_stable<W: StableHasherResult>(
&self,
hcx: &mut StableHashingContext<'a>,
hasher: &mut StableHasher<W>
)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?