[−][src]Struct rustc_ap_rustc_data_structures::obligation_forest::ObligationForest
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 thestd::<package>::
prefix of paths.sed 's,"Binder(TraitPredicate(<\(.*\)>)) (\([^)]*\))","\1 (\2)",'
— TransformsBinder(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]
F: Fn(&O) -> P,
Returns the set of obligations that are in a pending state.
pub fn process_obligations<P>(
&mut self,
processor: &mut P,
do_completed: DoCompleted
) -> Outcome<O, P::Error> where
P: ObligationProcessor<Obligation = O>,
[src]
&mut self,
processor: &mut P,
do_completed: DoCompleted
) -> Outcome<O, P::Error> where
P: ObligationProcessor<Obligation = O>,
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]
fn edges(&self) -> Edges<Self::Edge>
[src]
fn source(&self, (s, _): &Self::Edge) -> Self::Node
[src]
fn target(&self, (_, t): &Self::Edge) -> Self::Node
[src]
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]
fn node_id(&self, index: &Self::Node) -> Id
[src]
fn node_label(&self, index: &Self::Node) -> LabelText
[src]
fn edge_label(&self, (_index_source, _index_target): &Self::Edge) -> LabelText
[src]
fn node_shape(&'a self, _node: &Self::Node) -> Option<LabelText<'a>>
[src]
fn node_style(&'a self, _n: &Self::Node) -> Style
[src]
fn edge_style(&'a self, _e: &Self::Edge) -> Style
[src]
Auto Trait Implementations
impl<O> !RefUnwindSafe for ObligationForest<O>
impl<O> Send for ObligationForest<O> where
O: Send,
<O as ForestObligation>::CacheKey: Send,
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,
O: Unpin,
<O as ForestObligation>::CacheKey: Unpin,
impl<O> UnwindSafe for ObligationForest<O> where
O: UnwindSafe,
<O as ForestObligation>::CacheKey: UnwindSafe,
O: UnwindSafe,
<O as ForestObligation>::CacheKey: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<'a, T> Captures<'a> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Erased for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<E> SpecializationError for E
[src]
default fn not_found<S, T>(
trait_name: &'static str,
method_name: &'static str
) -> E where
T: ?Sized,
[src]
trait_name: &'static str,
method_name: &'static str
) -> E where
T: ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,