11use crate :: AliasTy ;
22use crate :: ApplicationTy ;
33use crate :: AssocTypeId ;
4+ use crate :: CanonicalVarKinds ;
45use crate :: Goal ;
56use crate :: GoalData ;
67use crate :: Goals ;
@@ -12,7 +13,6 @@ use crate::Parameter;
1213use crate :: ParameterData ;
1314use crate :: ParameterKind ;
1415use crate :: ParameterKinds ;
15- use crate :: ParameterKindsWithUniverseIndex ;
1616use crate :: ProgramClause ;
1717use crate :: ProgramClauseData ;
1818use crate :: ProgramClauseImplication ;
@@ -139,13 +139,13 @@ pub trait Interner: Debug + Copy + Eq + Ord + Hash {
139139 type InternedParameterKinds : Debug + Clone + Eq + Hash ;
140140
141141 /// "Interned" representation of a list of parameter kind with universe index.
142- /// In normal user code, `Self::InternedParameterKindsWithUniverseIndex ` is not referenced.
143- /// Instead, we refer to `ParameterKindsWithUniverseIndex <Self>`, which wraps this type.
142+ /// In normal user code, `Self::InternedCanonicalVarKinds ` is not referenced.
143+ /// Instead, we refer to `CanonicalVarKinds <Self>`, which wraps this type.
144144 ///
145- /// An `InternedParameterKindsWithUniverseIndex ` is created by
146- /// `intern_parameter_kinds_with_universe_index ` and can be converted back
147- /// to its underlying data via `parameter_kinds_with_universe_index_data `.
148- type InternedParameterKindsWithUniverseIndex : Debug + Clone + Eq + Hash ;
145+ /// An `InternedCanonicalVarKinds ` is created by
146+ /// `intern_canonical_var_kinds ` and can be converted back
147+ /// to its underlying data via `canonical_var_kinds_data `.
148+ type InternedCanonicalVarKinds : Debug + Clone + Eq + Hash ;
149149
150150 /// The core "id" type used for struct-ids and the like.
151151 type DefId : Debug + Copy + Eq + Ord + Hash ;
@@ -322,8 +322,8 @@ pub trait Interner: Debug + Copy + Eq + Ord + Hash {
322322 /// Returns `None` to fallback to the default debug output (e.g.,
323323 /// if no info about current program is available from TLS).
324324 #[ allow( unused_variables) ]
325- fn debug_parameter_kinds_with_universe_index (
326- parameter_kinds_with_universe_index : & ParameterKindsWithUniverseIndex < Self > ,
325+ fn debug_canonical_var_kinds (
326+ canonical_var_kinds : & CanonicalVarKinds < Self > ,
327327 fmt : & mut fmt:: Formatter < ' _ > ,
328328 ) -> Option < fmt:: Result > {
329329 None
@@ -578,18 +578,18 @@ pub trait Interner: Debug + Copy + Eq + Ord + Hash {
578578
579579 /// Create an "interned" parameter kinds with universe index from `data`. This is not
580580 /// normally invoked directly; instead, you invoke
581- /// `ParameterKindsWithUniverseIndex ::from` (which will ultimately call this
581+ /// `CanonicalVarKinds ::from` (which will ultimately call this
582582 /// method).
583- fn intern_parameter_kinds_with_universe_index (
583+ fn intern_canonical_var_kinds (
584584 & self ,
585585 data : impl IntoIterator < Item = ParameterKind < UniverseIndex > > ,
586- ) -> Self :: InternedParameterKindsWithUniverseIndex ;
586+ ) -> Self :: InternedCanonicalVarKinds ;
587587
588588 /// Lookup the slice of `ParameterKind` that was interned to
589589 /// create a `ParameterKinds`.
590- fn parameter_kinds_with_universe_index_data < ' a > (
590+ fn canonical_var_kinds_data < ' a > (
591591 & self ,
592- parameter_kinds_with_universe_index : & ' a Self :: InternedParameterKindsWithUniverseIndex ,
592+ canonical_var_kinds : & ' a Self :: InternedCanonicalVarKinds ,
593593 ) -> & ' a [ ParameterKind < UniverseIndex > ] ;
594594}
595595
@@ -600,9 +600,9 @@ pub trait TargetInterner<I: Interner>: Interner {
600600 parameter_kinds : I :: InternedParameterKinds ,
601601 ) -> Self :: InternedParameterKinds ;
602602
603- fn transfer_parameter_kinds_with_universe_index (
604- parameter_kinds : I :: InternedParameterKindsWithUniverseIndex ,
605- ) -> Self :: InternedParameterKindsWithUniverseIndex ;
603+ fn transfer_canonical_var_kinds (
604+ parameter_kinds : I :: InternedCanonicalVarKinds ,
605+ ) -> Self :: InternedCanonicalVarKinds ;
606606}
607607
608608impl < I : Interner > TargetInterner < I > for I {
@@ -616,9 +616,9 @@ impl<I: Interner> TargetInterner<I> for I {
616616 parameter_kinds
617617 }
618618
619- fn transfer_parameter_kinds_with_universe_index (
620- parameter_kinds : I :: InternedParameterKindsWithUniverseIndex ,
621- ) -> Self :: InternedParameterKindsWithUniverseIndex {
619+ fn transfer_canonical_var_kinds (
620+ parameter_kinds : I :: InternedCanonicalVarKinds ,
621+ ) -> Self :: InternedCanonicalVarKinds {
622622 parameter_kinds
623623 }
624624}
@@ -669,7 +669,7 @@ mod default {
669669 type InternedProgramClauses = Vec < ProgramClause < ChalkIr > > ;
670670 type InternedQuantifiedWhereClauses = Vec < QuantifiedWhereClause < ChalkIr > > ;
671671 type InternedParameterKinds = Vec < ParameterKind < ( ) > > ;
672- type InternedParameterKindsWithUniverseIndex = Vec < ParameterKind < UniverseIndex > > ;
672+ type InternedCanonicalVarKinds = Vec < ParameterKind < UniverseIndex > > ;
673673 type DefId = RawId ;
674674 type Identifier = Identifier ;
675675
@@ -759,15 +759,12 @@ mod default {
759759 } )
760760 }
761761
762- fn debug_parameter_kinds_with_universe_index (
763- parameter_kinds_with_universe_index : & ParameterKindsWithUniverseIndex < Self > ,
762+ fn debug_canonical_var_kinds (
763+ canonical_var_kinds : & CanonicalVarKinds < Self > ,
764764 fmt : & mut fmt:: Formatter < ' _ > ,
765765 ) -> Option < fmt:: Result > {
766766 tls:: with_current_program ( |prog| {
767- Some ( prog?. debug_parameter_kinds_with_universe_index (
768- parameter_kinds_with_universe_index,
769- fmt,
770- ) )
767+ Some ( prog?. debug_canonical_var_kinds ( canonical_var_kinds, fmt) )
771768 } )
772769 }
773770
@@ -948,17 +945,17 @@ mod default {
948945 ) -> & ' a [ ParameterKind < ( ) > ] {
949946 parameter_kinds
950947 }
951- fn intern_parameter_kinds_with_universe_index (
948+ fn intern_canonical_var_kinds (
952949 & self ,
953950 data : impl IntoIterator < Item = ParameterKind < UniverseIndex > > ,
954- ) -> Self :: InternedParameterKindsWithUniverseIndex {
951+ ) -> Self :: InternedCanonicalVarKinds {
955952 data. into_iter ( ) . collect ( )
956953 }
957- fn parameter_kinds_with_universe_index_data < ' a > (
954+ fn canonical_var_kinds_data < ' a > (
958955 & self ,
959- parameter_kinds_with_universe_index : & ' a Self :: InternedParameterKindsWithUniverseIndex ,
956+ canonical_var_kinds : & ' a Self :: InternedCanonicalVarKinds ,
960957 ) -> & ' a [ ParameterKind < UniverseIndex > ] {
961- parameter_kinds_with_universe_index
958+ canonical_var_kinds
962959 }
963960 }
964961
0 commit comments