1
1
use crate :: AliasTy ;
2
2
use crate :: ApplicationTy ;
3
3
use crate :: AssocTypeId ;
4
+ use crate :: CanonicalVarKinds ;
4
5
use crate :: Goal ;
5
6
use crate :: GoalData ;
6
7
use crate :: Goals ;
@@ -12,7 +13,6 @@ use crate::Parameter;
12
13
use crate :: ParameterData ;
13
14
use crate :: ParameterKind ;
14
15
use crate :: ParameterKinds ;
15
- use crate :: ParameterKindsWithUniverseIndex ;
16
16
use crate :: ProgramClause ;
17
17
use crate :: ProgramClauseData ;
18
18
use crate :: ProgramClauseImplication ;
@@ -139,13 +139,13 @@ pub trait Interner: Debug + Copy + Eq + Ord + Hash {
139
139
type InternedParameterKinds : Debug + Clone + Eq + Hash ;
140
140
141
141
/// "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.
144
144
///
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 ;
149
149
150
150
/// The core "id" type used for struct-ids and the like.
151
151
type DefId : Debug + Copy + Eq + Ord + Hash ;
@@ -322,8 +322,8 @@ pub trait Interner: Debug + Copy + Eq + Ord + Hash {
322
322
/// Returns `None` to fallback to the default debug output (e.g.,
323
323
/// if no info about current program is available from TLS).
324
324
#[ 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 > ,
327
327
fmt : & mut fmt:: Formatter < ' _ > ,
328
328
) -> Option < fmt:: Result > {
329
329
None
@@ -578,18 +578,18 @@ pub trait Interner: Debug + Copy + Eq + Ord + Hash {
578
578
579
579
/// Create an "interned" parameter kinds with universe index from `data`. This is not
580
580
/// normally invoked directly; instead, you invoke
581
- /// `ParameterKindsWithUniverseIndex ::from` (which will ultimately call this
581
+ /// `CanonicalVarKinds ::from` (which will ultimately call this
582
582
/// method).
583
- fn intern_parameter_kinds_with_universe_index (
583
+ fn intern_canonical_var_kinds (
584
584
& self ,
585
585
data : impl IntoIterator < Item = ParameterKind < UniverseIndex > > ,
586
- ) -> Self :: InternedParameterKindsWithUniverseIndex ;
586
+ ) -> Self :: InternedCanonicalVarKinds ;
587
587
588
588
/// Lookup the slice of `ParameterKind` that was interned to
589
589
/// create a `ParameterKinds`.
590
- fn parameter_kinds_with_universe_index_data < ' a > (
590
+ fn canonical_var_kinds_data < ' a > (
591
591
& self ,
592
- parameter_kinds_with_universe_index : & ' a Self :: InternedParameterKindsWithUniverseIndex ,
592
+ canonical_var_kinds : & ' a Self :: InternedCanonicalVarKinds ,
593
593
) -> & ' a [ ParameterKind < UniverseIndex > ] ;
594
594
}
595
595
@@ -600,9 +600,9 @@ pub trait TargetInterner<I: Interner>: Interner {
600
600
parameter_kinds : I :: InternedParameterKinds ,
601
601
) -> Self :: InternedParameterKinds ;
602
602
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 ;
606
606
}
607
607
608
608
impl < I : Interner > TargetInterner < I > for I {
@@ -616,9 +616,9 @@ impl<I: Interner> TargetInterner<I> for I {
616
616
parameter_kinds
617
617
}
618
618
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 {
622
622
parameter_kinds
623
623
}
624
624
}
@@ -669,7 +669,7 @@ mod default {
669
669
type InternedProgramClauses = Vec < ProgramClause < ChalkIr > > ;
670
670
type InternedQuantifiedWhereClauses = Vec < QuantifiedWhereClause < ChalkIr > > ;
671
671
type InternedParameterKinds = Vec < ParameterKind < ( ) > > ;
672
- type InternedParameterKindsWithUniverseIndex = Vec < ParameterKind < UniverseIndex > > ;
672
+ type InternedCanonicalVarKinds = Vec < ParameterKind < UniverseIndex > > ;
673
673
type DefId = RawId ;
674
674
type Identifier = Identifier ;
675
675
@@ -759,15 +759,12 @@ mod default {
759
759
} )
760
760
}
761
761
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 > ,
764
764
fmt : & mut fmt:: Formatter < ' _ > ,
765
765
) -> Option < fmt:: Result > {
766
766
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) )
771
768
} )
772
769
}
773
770
@@ -948,17 +945,17 @@ mod default {
948
945
) -> & ' a [ ParameterKind < ( ) > ] {
949
946
parameter_kinds
950
947
}
951
- fn intern_parameter_kinds_with_universe_index (
948
+ fn intern_canonical_var_kinds (
952
949
& self ,
953
950
data : impl IntoIterator < Item = ParameterKind < UniverseIndex > > ,
954
- ) -> Self :: InternedParameterKindsWithUniverseIndex {
951
+ ) -> Self :: InternedCanonicalVarKinds {
955
952
data. into_iter ( ) . collect ( )
956
953
}
957
- fn parameter_kinds_with_universe_index_data < ' a > (
954
+ fn canonical_var_kinds_data < ' a > (
958
955
& self ,
959
- parameter_kinds_with_universe_index : & ' a Self :: InternedParameterKindsWithUniverseIndex ,
956
+ canonical_var_kinds : & ' a Self :: InternedCanonicalVarKinds ,
960
957
) -> & ' a [ ParameterKind < UniverseIndex > ] {
961
- parameter_kinds_with_universe_index
958
+ canonical_var_kinds
962
959
}
963
960
}
964
961
0 commit comments