Rollup merge of #104976 - WaffleLapkin:move_comments, r=cjgillot

Prefer doc comments over `//`-comments in compiler

Doc comments are generally nicer: they show up in the documentation, they are shown in IDEs when you hover other mentions of items, etc. Thus it makes sense to use them instead of `//`-comments.
This commit is contained in:
Matthias Krüger
2022-11-27 22:14:08 +01:00
committed by GitHub
83 changed files with 400 additions and 387 deletions

View File

@@ -861,7 +861,7 @@ impl<'tcx> AutoTraitFinder<'tcx> {
}
}
// Replaces all ReVars in a type with ty::Region's, using the provided map
/// Replaces all ReVars in a type with ty::Region's, using the provided map
pub struct RegionReplacer<'a, 'tcx> {
vid_to_region: &'a FxHashMap<ty::RegionVid, ty::Region<'tcx>>,
tcx: TyCtxt<'tcx>,

View File

@@ -829,7 +829,7 @@ impl<'tcx> TypeFolder<'tcx> for BoundVarReplacer<'_, 'tcx> {
}
}
// The inverse of `BoundVarReplacer`: replaces placeholders with the bound vars from which they came.
/// The inverse of [`BoundVarReplacer`]: replaces placeholders with the bound vars from which they came.
pub struct PlaceholderReplacer<'me, 'tcx> {
infcx: &'me InferCtxt<'tcx>,
mapped_regions: BTreeMap<ty::PlaceholderRegion, ty::BoundRegion>,

View File

@@ -230,7 +230,7 @@ fn fulfill_implication<'tcx>(
Ok(infcx.resolve_vars_if_possible(target_substs))
}
// Query provider for `specialization_graph_of`.
/// Query provider for `specialization_graph_of`.
pub(super) fn specialization_graph_provider(
tcx: TyCtxt<'_>,
trait_id: DefId,