X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibrustc%2Fty%2Fmod.rs;h=1eda57608e75b8460a3d9f65603b73de2c45b25a;hb=709b9246434944f5eb7c626d43dbaf6cea00e531;hp=8e170578227c0a624f36cf78b96c70b380949d69;hpb=460072ebeed5a2463109894592ac172b47cdfb74;p=rust.git diff --git a/src/librustc/ty/mod.rs b/src/librustc/ty/mod.rs index 8e170578227..1eda57608e7 100644 --- a/src/librustc/ty/mod.rs +++ b/src/librustc/ty/mod.rs @@ -904,7 +904,7 @@ pub struct Generics { pub parent_count: usize, pub params: Vec, - /// Reverse map to the `index` field of each `GenericParamDef` + /// Reverse map to the `index` field of each `GenericParamDef`. #[stable_hasher(ignore)] pub param_def_id_to_index: FxHashMap, @@ -1252,7 +1252,7 @@ pub fn self_ty(&self) -> Ty<'tcx> { impl<'tcx> PolyTraitPredicate<'tcx> { pub fn def_id(&self) -> DefId { - // Ok to skip binder since trait def-ID does not care about regions. + // Ok to skip binder since trait `DefId` does not care about regions. self.skip_binder().def_id() } } @@ -1319,7 +1319,7 @@ pub fn ty(&self) -> Binder> { /// Note that this is not the `DefId` of the `TraitRef` containing this /// associated type, which is in `tcx.associated_item(projection_def_id()).container`. pub fn projection_def_id(&self) -> DefId { - // Ok to skip binder since trait def-ID does not care about regions. + // Ok to skip binder since trait `DefId` does not care about regions. self.skip_binder().projection_ty.item_def_id } } @@ -1646,9 +1646,9 @@ fn hash_stable( /// particular point. #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, HashStable)] pub struct ParamEnv<'tcx> { - /// Obligations that the caller must satisfy. This is basically + /// `Obligation`s that the caller must satisfy. This is basically /// the set of bounds on the in-scope type parameters, translated - /// into Obligations, and elaborated and normalized. + /// into `Obligation`s, and elaborated and normalized. pub caller_bounds: &'tcx List>, /// Typically, this is `Reveal::UserFacing`, but during codegen we @@ -2796,7 +2796,7 @@ pub fn opt_associated_item(self, def_id: DefId) -> Option { _ => false, } } else { - match self.def_kind(def_id).expect("no def for def-id") { + match self.def_kind(def_id).expect("no def for `DefId`") { DefKind::AssocConst | DefKind::Method | DefKind::AssocTy => true,