Enum rustc::hir::map::blocks::Code
[−]
[src]
pub enum Code<'a> { FnLike(FnLikeNode<'a>), Expr(&'a 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?
Carries either an FnLikeNode or a Expr, as these are the two constructs that correspond to "code" (as in, something from which we can construct a control-flow graph).
Variants
FnLike(FnLikeNode<'a>)
🔬 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?
Expr(&'a 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?
Methods
impl<'a> Code<'a>
[src]
pub fn id(&self) -> NodeId
[src]
🔬 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?
pub fn from_node(map: &Map<'a>, id: NodeId) -> Option<Code<'a>>
[src]
🔬 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?
Attempts to construct a Code from presumed FnLike or Expr node input.