@@ -933,7 +933,9 @@ impl Placeholder<BoundVar> {
933933
934934pub type PlaceholderRegion = Placeholder < BoundRegion > ;
935935
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+
937939 fn universe ( self ) -> UniverseIndex {
938940 self . universe
939941 }
@@ -946,14 +948,20 @@ impl rustc_type_ir::inherent::PlaceholderLike for PlaceholderRegion {
946948 Placeholder { universe : ui, ..self }
947949 }
948950
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 {
950956 Placeholder { universe : ui, bound : BoundRegion { var, kind : BoundRegionKind :: Anon } }
951957 }
952958}
953959
954960pub type PlaceholderType = Placeholder < BoundTy > ;
955961
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+
957965 fn universe ( self ) -> UniverseIndex {
958966 self . universe
959967 }
@@ -966,7 +974,11 @@ impl rustc_type_ir::inherent::PlaceholderLike for PlaceholderType {
966974 Placeholder { universe : ui, ..self }
967975 }
968976
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 {
970982 Placeholder { universe : ui, bound : BoundTy { var, kind : BoundTyKind :: Anon } }
971983 }
972984}
@@ -980,7 +992,9 @@ pub struct BoundConst<'tcx> {
980992
981993pub type PlaceholderConst = Placeholder < BoundVar > ;
982994
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+
984998 fn universe ( self ) -> UniverseIndex {
985999 self . universe
9861000 }
@@ -993,7 +1007,11 @@ impl rustc_type_ir::inherent::PlaceholderLike for PlaceholderConst {
9931007 Placeholder { universe : ui, ..self }
9941008 }
9951009
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 {
9971015 Placeholder { universe : ui, bound : var }
9981016 }
9991017}
0 commit comments