@@ -146,6 +146,7 @@ mod field_def;
146
146
mod impl_polarity;
147
147
mod opaque_hidden_type;
148
148
mod param_env;
149
+ mod placeholder;
149
150
mod predicate;
150
151
mod term;
151
152
mod ty_; // FIXME: rename to `ty` once we don't import `crate::ty` here
@@ -158,6 +159,7 @@ pub use field_def::FieldDef;
158
159
pub use impl_polarity:: ImplPolarity ;
159
160
pub use opaque_hidden_type:: OpaqueHiddenType ;
160
161
pub use param_env:: { ParamEnv , ParamEnvAnd } ;
162
+ pub use placeholder:: { Placeholder , PlaceholderConst , PlaceholderRegion , PlaceholderType } ;
161
163
pub use predicate:: {
162
164
CoercePredicate , InstantiatedPredicates , OutlivesPredicate , PolyCoercePredicate ,
163
165
PolyProjectionPredicate , PolyRegionOutlivesPredicate , PolySubtypePredicate , PolyTraitPredicate ,
@@ -417,30 +419,13 @@ pub struct OpaqueTypeKey<'tcx> {
417
419
pub substs : SubstsRef < ' tcx > ,
418
420
}
419
421
420
- /// The "placeholder index" fully defines a placeholder region, type, or const. Placeholders are
421
- /// identified by both a universe, as well as a name residing within that universe. Distinct bound
422
- /// regions/types/consts within the same universe simply have an unknown relationship to one
423
- /// another.
424
- #[ derive( Copy , Clone , Debug , PartialEq , Eq , Hash , PartialOrd , Ord ) ]
425
- #[ derive( HashStable , TyEncodable , TyDecodable ) ]
426
- pub struct Placeholder < T > {
427
- pub universe : UniverseIndex ,
428
- pub bound : T ,
429
- }
430
-
431
- pub type PlaceholderRegion = Placeholder < BoundRegion > ;
432
-
433
- pub type PlaceholderType = Placeholder < BoundTy > ;
434
-
435
422
#[ derive( Copy , Clone , Debug , PartialEq , Eq , Hash , HashStable ) ]
436
423
#[ derive( TyEncodable , TyDecodable , PartialOrd , Ord ) ]
437
424
pub struct BoundConst < ' tcx > {
438
425
pub var : BoundVar ,
439
426
pub ty : Ty < ' tcx > ,
440
427
}
441
428
442
- pub type PlaceholderConst < ' tcx > = Placeholder < BoundVar > ;
443
-
444
429
// FIXME(ecstaticmorse): Audit all occurrences of `without_const().to_predicate(tcx)` to ensure that
445
430
// the constness of trait bounds is being propagated correctly.
446
431
impl < ' tcx > PolyTraitRef < ' tcx > {
0 commit comments