[−][src]Struct rustc_data_structures::obligation_forest::ObligationForest
🔬 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?
Fields
nodes: Vec<Node<O>>
🔬 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?
The list of obligations. In between calls to
process_obligations
, this list only contains nodes in the
Pending
or Success
state (with a non-zero number of
incomplete children). During processing, some of those nodes
may be changed to the error state, or we may find that they
are completed (That is, num_incomplete_children
drops to 0).
At the end of processing, those nodes will be removed by a
call to compress
.
At all times we maintain the invariant that every node appears
at a higher index than its parent. This is needed by the
backtrace iterator (which uses split_at
).
done_cache: FxHashSet<O::Predicate>
🔬 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?
A cache of predicates that have been successfully completed.
waiting_cache: FxHashMap<O::Predicate, NodeIndex>
🔬 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?
An cache of the nodes in nodes
, indexed by predicate.
scratch: Option<Vec<usize>>
🔬 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<O: ForestObligation> ObligationForest<O>
[src]
impl<O: ForestObligation> ObligationForest<O>
pub fn new() -> ObligationForest<O>
[src]
pub fn new() -> ObligationForest<O>
🔬 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 len(&self) -> usize
[src]
pub fn len(&self) -> usize
🔬 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?
Return the total number of nodes in the forest that have not yet been fully resolved.
pub fn register_obligation(&mut self, obligation: O)
[src]
pub fn register_obligation(&mut self, obligation: O)
🔬 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?
Registers an obligation
This CAN be done in a snapshot
fn register_obligation_at(
&mut self,
obligation: O,
parent: Option<NodeIndex>
) -> Result<(), ()>
[src]
fn register_obligation_at(
&mut self,
obligation: O,
parent: Option<NodeIndex>
) -> Result<(), ()>
🔬 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 to_errors<E: Clone>(&mut self, error: E) -> Vec<Error<O, E>>
[src]
pub fn to_errors<E: Clone>(&mut self, error: E) -> Vec<Error<O, E>>
🔬 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?
Convert all remaining obligations to the given error.
This cannot be done during a snapshot.
pub fn map_pending_obligations<P, F>(&self, f: F) -> Vec<P> where
F: Fn(&O) -> P,
[src]
pub fn map_pending_obligations<P, F>(&self, f: F) -> Vec<P> where
F: Fn(&O) -> P,
🔬 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?
Returns the set of obligations that are in a pending state.
pub fn process_obligations<P>(
&mut self,
processor: &mut P
) -> Outcome<O, P::Error> where
P: ObligationProcessor<Obligation = O>,
[src]
pub fn process_obligations<P>(
&mut self,
processor: &mut P
) -> Outcome<O, P::Error> where
P: ObligationProcessor<Obligation = O>,
🔬 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?
Perform 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).
fn process_cycles<P>(&mut self, processor: &mut P) where
P: ObligationProcessor<Obligation = O>,
[src]
fn process_cycles<P>(&mut self, processor: &mut P) where
P: ObligationProcessor<Obligation = O>,
🔬 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?
Mark all NodeState::Success nodes as NodeState::Done and
report all cycles between them. This should be called
after mark_as_waiting
marks all nodes with pending
subobligations as NodeState::Waiting.
fn find_cycles_from_node<P>(
&self,
stack: &mut Vec<usize>,
processor: &mut P,
index: usize
) where
P: ObligationProcessor<Obligation = O>,
[src]
fn find_cycles_from_node<P>(
&self,
stack: &mut Vec<usize>,
processor: &mut P,
index: usize
) where
P: ObligationProcessor<Obligation = O>,
🔬 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?
fn error_at(&mut self, p: usize) -> Vec<O>
[src]
fn error_at(&mut self, p: usize) -> Vec<O>
🔬 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?
Returns a vector of obligations for p
and all of its
ancestors, putting them into the error state in the process.
fn mark_neighbors_as_waiting_from(&self, node: &Node<O>)
[src]
fn mark_neighbors_as_waiting_from(&self, node: &Node<O>)
🔬 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?
fn mark_as_waiting(&self)
[src]
fn mark_as_waiting(&self)
🔬 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?
Marks all nodes that depend on a pending node as NodeState::Waiting.
fn mark_as_waiting_from(&self, node: &Node<O>)
[src]
fn mark_as_waiting_from(&self, node: &Node<O>)
🔬 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?
fn compress(&mut self) -> Vec<O>
[src]
fn compress(&mut self) -> Vec<O>
🔬 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?
Compresses the vector, removing all popped nodes. This adjusts the indices and hence invalidates any outstanding indices. Cannot be used during a transaction.
Beforehand, all nodes must be marked as Done
and no cycles
on these nodes may be present. This is done by e.g. process_cycles
.
fn apply_rewrites(&mut self, node_rewrites: &[usize])
[src]
fn apply_rewrites(&mut self, node_rewrites: &[usize])
🔬 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?
Auto Trait Implementations
impl<O> Send for ObligationForest<O> where
O: Send,
<O as ForestObligation>::Predicate: Send,
impl<O> Send for ObligationForest<O> where
O: Send,
<O as ForestObligation>::Predicate: Send,
impl<O> !Sync for ObligationForest<O>
impl<O> !Sync for ObligationForest<O>
Blanket Implementations
impl<T> Erased for T
[src]
impl<T> Erased for T
impl<T> Send for T where
T: ?Sized,
[src]
impl<T> Send for T where
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
impl<T> Sync for T where
T: ?Sized,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
ⓘImportant traits for &'a mut Rfn borrow(&self) -> &T
[src]
fn borrow(&self) -> &T
Immutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
ⓘImportant traits for &'a mut Rfn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more
impl<E> SpecializationError for E
[src]
impl<E> SpecializationError for E
fn not_found<S, T>(trait_name: &'static str, method_name: &'static str) -> E where
T: ?Sized,
[src]
fn not_found<S, T>(trait_name: &'static str, method_name: &'static str) -> E where
T: ?Sized,
🔬 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?
Create an error for a missing method specialization. Defaults to panicking with type, trait & method names. S
is the encoder/decoder state type, T
is the type being encoded/decoded, and the arguments are the names of the trait and method that should've been overridden. Read more
impl<T> Erased for T
impl<T> Erased for T