Struct rustc_ap_rustc_data_structures::obligation_forest::ObligationForest[][src]

pub struct ObligationForest<O: ForestObligation> { /* fields omitted */ }

Implementations

impl<O: ForestObligation> ObligationForest<O>[src]

pub fn dump_graphviz<P: AsRef<Path>>(&self, dir: P, description: &str)[src]

Creates a graphviz representation of the obligation forest. Given a directory this will create files with name of the format <counter>_<description>.gv. The counter is global and is maintained internally.

Calling this will do nothing unless the environment variable DUMP_OBLIGATION_FOREST_GRAPHVIZ is defined.

A few post-processing that you might want to do make the forest easier to visualize:

  • sed 's,std::[a-z]*::,,g' — Deletes the std::<package>:: prefix of paths.
  • sed 's,"Binder(TraitPredicate(<\(.*\)>)) (\([^)]*\))","\1 (\2)",' — Transforms Binder(TraitPredicate(<predicate>)) into just <predicate>.

impl<O: ForestObligation> ObligationForest<O>[src]

pub fn new() -> ObligationForest<O>[src]

pub fn len(&self) -> usize[src]

Returns the total number of nodes in the forest that have not yet been fully resolved.

pub fn register_obligation(&mut self, obligation: O)[src]

Registers an obligation.

pub fn to_errors<E: Clone>(&mut self, error: E) -> Vec<Error<O, E>>[src]

Converts all remaining obligations to the given error.

pub fn map_pending_obligations<P, F>(&self, f: F) -> Vec<P> where
    F: Fn(&O) -> P, 
[src]

Returns the set of obligations that are in a pending state.

pub fn process_obligations<P, OUT>(&mut self, processor: &mut P) -> OUT where
    P: ObligationProcessor<Obligation = O>,
    OUT: OutcomeTrait<Obligation = O, Error = Error<O, P::Error>>, 
[src]

Performs a pass through the obligation list. This must be called in a loop until outcome.stalled is false.

This cannot be unrolled (presently, at least).

Trait Implementations

impl<'a, O: ForestObligation + 'a> GraphWalk<'a> for &'a ObligationForest<O>[src]

type Node = usize

type Edge = (usize, usize)

fn nodes(&self) -> Nodes<'_, Self::Node>[src]

Returns all the nodes in this graph.

fn edges(&self) -> Edges<'_, Self::Edge>[src]

Returns all of the edges in this graph.

fn source(&self, (s, _): &Self::Edge) -> Self::Node[src]

The source node for edge.

fn target(&self, (_, t): &Self::Edge) -> Self::Node[src]

The target node for edge.

impl<'a, O: ForestObligation + 'a> Labeller<'a> for &'a ObligationForest<O>[src]

type Node = usize

type Edge = (usize, usize)

fn graph_id(&self) -> Id<'_>[src]

Must return a DOT compatible identifier naming the graph.

fn node_id(&self, index: &Self::Node) -> Id<'_>[src]

Maps n to a unique identifier with respect to self. The implementor is responsible for ensuring that the returned name is a valid DOT identifier. Read more

fn node_label(&self, index: &Self::Node) -> LabelText<'_>[src]

Maps n to a label that will be used in the rendered output. The label need not be unique, and may be the empty string; the default is just the output from node_id. Read more

fn edge_label(
    &self,
    (_index_source, _index_target): &Self::Edge
) -> LabelText<'_>
[src]

Maps e to a label that will be used in the rendered output. The label need not be unique, and may be the empty string; the default is in fact the empty string. Read more

fn node_shape(&'a self, _node: &Self::Node) -> Option<LabelText<'a>>[src]

Maps n to one of the graphviz shape names. If None is returned, no shape attribute is specified. Read more

fn node_style(&'a self, _n: &Self::Node) -> Style[src]

Maps n to a style that will be used in the rendered output.

fn edge_style(&'a self, _e: &Self::Edge) -> Style[src]

Maps e to a style that will be used in the rendered output.

Auto Trait Implementations

impl<O> !RefUnwindSafe for ObligationForest<O>

impl<O> Send for ObligationForest<O> where
    O: Send,
    <O as ForestObligation>::CacheKey: Send

impl<O> !Sync for ObligationForest<O>

impl<O> Unpin for ObligationForest<O> where
    O: Unpin,
    <O as ForestObligation>::CacheKey: Unpin

impl<O> UnwindSafe for ObligationForest<O> where
    O: UnwindSafe,
    <O as ForestObligation>::CacheKey: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[src]

fn instrument(self, span: Span) -> Instrumented<Self>[src]

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

fn in_current_span(self) -> Instrumented<Self>[src]

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V

impl<'a, T> Captures<'a> for T where
    T: ?Sized
[src]

impl<T> Erased for T[src]