Enum rustc::hir::map::blocks::Code [] [src]

pub enum Code<'a> {
    FnLikeCode(FnLikeNode<'a>),
    BlockCode(&'a Block),
}
Unstable (rustc_private)

Carries either an FnLikeNode or a Block, as these are the two constructs that correspond to "code" (as in, something from which we can construct a control-flow graph).

Variants

FnLikeCode(FnLikeNode<'a>)
Unstable (rustc_private)
BlockCode(&'a Block)
Unstable (rustc_private)

Methods

impl<'a> Code<'a>
[src]

fn id(&self) -> NodeId

fn from_node(node: Node) -> Option<Code>

Unstable (rustc_private)

Attempts to construct a Code from presumed FnLike or Block node input.

Trait Implementations

Derived Implementations

impl<'a> Clone for Code<'a>
[src]

fn clone(&self) -> Code<'a>

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl<'a> Copy for Code<'a>
[src]