File tree Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -1808,7 +1808,7 @@ impl Type {
1808
1808
. push ( self . ty . clone ( ) )
1809
1809
. fill ( args. iter ( ) . map ( |t| t. ty . clone ( ) ) )
1810
1810
. build ( ) ;
1811
- let goal = Canonical :: new (
1811
+ let goal = hir_ty :: make_canonical (
1812
1812
InEnvironment :: new (
1813
1813
self . env . env . clone ( ) ,
1814
1814
AliasEq {
Original file line number Diff line number Diff line change @@ -107,16 +107,18 @@ pub fn make_only_type_binders<T>(num_vars: usize, value: T) -> Binders<T> {
107
107
)
108
108
}
109
109
110
- impl < T > Canonical < T > {
111
- pub fn new ( value : T , kinds : impl IntoIterator < Item = TyVariableKind > ) -> Self {
112
- let kinds = kinds. into_iter ( ) . map ( |tk| {
113
- chalk_ir:: CanonicalVarKind :: new (
114
- chalk_ir:: VariableKind :: Ty ( tk) ,
115
- chalk_ir:: UniverseIndex :: ROOT ,
116
- )
117
- } ) ;
118
- Self { value, binders : chalk_ir:: CanonicalVarKinds :: from_iter ( & Interner , kinds) }
119
- }
110
+ // FIXME: get rid of this
111
+ pub fn make_canonical < T > (
112
+ value : T ,
113
+ kinds : impl IntoIterator < Item = TyVariableKind > ,
114
+ ) -> Canonical < T > {
115
+ let kinds = kinds. into_iter ( ) . map ( |tk| {
116
+ chalk_ir:: CanonicalVarKind :: new (
117
+ chalk_ir:: VariableKind :: Ty ( tk) ,
118
+ chalk_ir:: UniverseIndex :: ROOT ,
119
+ )
120
+ } ) ;
121
+ Canonical { value, binders : chalk_ir:: CanonicalVarKinds :: from_iter ( & Interner , kinds) }
120
122
}
121
123
122
124
/// A function signature as seen by type inference: Several parameter types and
You can’t perform that action at this time.
0 commit comments