@@ -933,7 +933,9 @@ impl Placeholder<BoundVar> {
933
933
934
934
pub type PlaceholderRegion = Placeholder < BoundRegion > ;
935
935
936
- impl rustc_type_ir:: inherent:: PlaceholderLike for PlaceholderRegion {
936
+ impl < ' tcx > rustc_type_ir:: inherent:: PlaceholderLike < TyCtxt < ' tcx > > for PlaceholderRegion {
937
+ type Bound = BoundRegion ;
938
+
937
939
fn universe ( self ) -> UniverseIndex {
938
940
self . universe
939
941
}
@@ -946,14 +948,20 @@ impl rustc_type_ir::inherent::PlaceholderLike for PlaceholderRegion {
946
948
Placeholder { universe : ui, ..self }
947
949
}
948
950
949
- fn new ( ui : UniverseIndex , var : BoundVar ) -> Self {
951
+ fn new ( ui : UniverseIndex , bound : BoundRegion ) -> Self {
952
+ Placeholder { universe : ui, bound }
953
+ }
954
+
955
+ fn new_anon ( ui : UniverseIndex , var : BoundVar ) -> Self {
950
956
Placeholder { universe : ui, bound : BoundRegion { var, kind : BoundRegionKind :: Anon } }
951
957
}
952
958
}
953
959
954
960
pub type PlaceholderType = Placeholder < BoundTy > ;
955
961
956
- impl rustc_type_ir:: inherent:: PlaceholderLike for PlaceholderType {
962
+ impl < ' tcx > rustc_type_ir:: inherent:: PlaceholderLike < TyCtxt < ' tcx > > for PlaceholderType {
963
+ type Bound = BoundTy ;
964
+
957
965
fn universe ( self ) -> UniverseIndex {
958
966
self . universe
959
967
}
@@ -966,7 +974,11 @@ impl rustc_type_ir::inherent::PlaceholderLike for PlaceholderType {
966
974
Placeholder { universe : ui, ..self }
967
975
}
968
976
969
- fn new ( ui : UniverseIndex , var : BoundVar ) -> Self {
977
+ fn new ( ui : UniverseIndex , bound : BoundTy ) -> Self {
978
+ Placeholder { universe : ui, bound }
979
+ }
980
+
981
+ fn new_anon ( ui : UniverseIndex , var : BoundVar ) -> Self {
970
982
Placeholder { universe : ui, bound : BoundTy { var, kind : BoundTyKind :: Anon } }
971
983
}
972
984
}
@@ -980,7 +992,9 @@ pub struct BoundConst<'tcx> {
980
992
981
993
pub type PlaceholderConst = Placeholder < BoundVar > ;
982
994
983
- impl rustc_type_ir:: inherent:: PlaceholderLike for PlaceholderConst {
995
+ impl < ' tcx > rustc_type_ir:: inherent:: PlaceholderLike < TyCtxt < ' tcx > > for PlaceholderConst {
996
+ type Bound = BoundVar ;
997
+
984
998
fn universe ( self ) -> UniverseIndex {
985
999
self . universe
986
1000
}
@@ -993,7 +1007,11 @@ impl rustc_type_ir::inherent::PlaceholderLike for PlaceholderConst {
993
1007
Placeholder { universe : ui, ..self }
994
1008
}
995
1009
996
- fn new ( ui : UniverseIndex , var : BoundVar ) -> Self {
1010
+ fn new ( ui : UniverseIndex , bound : BoundVar ) -> Self {
1011
+ Placeholder { universe : ui, bound }
1012
+ }
1013
+
1014
+ fn new_anon ( ui : UniverseIndex , var : BoundVar ) -> Self {
997
1015
Placeholder { universe : ui, bound : var }
998
1016
}
999
1017
}
0 commit comments