From 6a1f5eab83eda92bbdad3f0e680f4a32f5c8a2a1 Mon Sep 17 00:00:00 2001 From: lcnr Date: Mon, 21 Feb 2022 11:56:36 +0100 Subject: obligation forest docs --- compiler/rustc_data_structures/src/obligation_forest/mod.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'compiler/rustc_data_structures/src') diff --git a/compiler/rustc_data_structures/src/obligation_forest/mod.rs b/compiler/rustc_data_structures/src/obligation_forest/mod.rs index 25b7a84b3a0..5fe2a1fb84b 100644 --- a/compiler/rustc_data_structures/src/obligation_forest/mod.rs +++ b/compiler/rustc_data_structures/src/obligation_forest/mod.rs @@ -132,11 +132,11 @@ type ObligationTreeIdGenerator = std::iter::Map, fn(usize) -> ObligationTreeId>; pub struct ObligationForest { - /// The list of obligations. In between calls to `process_obligations`, + /// The list of obligations. In between calls to [Self::process_obligations], /// this list only contains nodes in the `Pending` or `Waiting` state. /// /// `usize` indices are used here and throughout this module, rather than - /// `rustc_index::newtype_index!` indices, because this code is hot enough + /// [`rustc_index::newtype_index!`] indices, because this code is hot enough /// that the `u32`-to-`usize` conversions that would be required are /// significant, and space considerations are not important. nodes: Vec>, @@ -146,10 +146,11 @@ pub struct ObligationForest { /// A cache of the nodes in `nodes`, indexed by predicate. Unfortunately, /// its contents are not guaranteed to match those of `nodes`. See the - /// comments in `process_obligation` for details. + /// comments in [`Self::process_obligation` for details. active_cache: FxHashMap, - /// A vector reused in compress() and find_cycles_from_node(), to avoid allocating new vectors. + /// A vector reused in [Self::compress()] and [Self::find_cycles_from_node()], + /// to avoid allocating new vectors. reused_node_vec: Vec, obligation_tree_id_generator: ObligationTreeIdGenerator, -- cgit 1.4.1-3-g733a5