Struct rustc::cfg::CFG [] [src]

pub struct CFG {
    pub graph: CFGGraph,
    pub entry: CFGIndex,
    pub exit: CFGIndex,
}
Unstable (rustc_private)

Fields

graph: CFGGraph
Unstable (rustc_private)
entry: CFGIndex
Unstable (rustc_private)
exit: CFGIndex
Unstable (rustc_private)

Methods

impl CFG
[src]

fn new<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, blk: &Block) -> CFG

fn node_is_reachable(&self, id: NodeId) -> bool

Trait Implementations

impl<'a> GraphWalk<'a> for &'a CFG
[src]

type Node = Node<'a>

type Edge = Edge<'a>

fn nodes(&'a self) -> Nodes<'a, Node<'a>>

Returns all the nodes in this graph.

fn edges(&'a self) -> Edges<'a, Edge<'a>>

Returns all of the edges in this graph.

fn source(&'a self, edge: &Edge<'a>) -> Node<'a>

The source node for edge.

fn target(&'a self, edge: &Edge<'a>) -> Node<'a>

The target node for edge.