Prefer doc comments over //-comments in compiler

This commit is contained in:
Maybe Waffle 2022-11-27 11:15:06 +00:00
parent 0e9eee6811
commit 1d42936b18
83 changed files with 400 additions and 387 deletions

View file

@ -42,22 +42,22 @@ impl<'a> fmt::Debug for VarianceTerm<'a> {
}
}
// The first pass over the crate simply builds up the set of inferreds.
/// The first pass over the crate simply builds up the set of inferreds.
pub struct TermsContext<'a, 'tcx> {
pub tcx: TyCtxt<'tcx>,
pub arena: &'a DroplessArena,
// For marker types, UnsafeCell, and other lang items where
// variance is hardcoded, records the item-id and the hardcoded
// variance.
/// For marker types, `UnsafeCell`, and other lang items where
/// variance is hardcoded, records the item-id and the hardcoded
/// variance.
pub lang_items: Vec<(LocalDefId, Vec<ty::Variance>)>,
// Maps from the node id of an item to the first inferred index
// used for its type & region parameters.
/// Maps from the node id of an item to the first inferred index
/// used for its type & region parameters.
pub inferred_starts: LocalDefIdMap<InferredIndex>,
// Maps from an InferredIndex to the term for that variable.
/// Maps from an InferredIndex to the term for that variable.
pub inferred_terms: Vec<VarianceTermPtr<'a>>,
}