Add type to ConstKind::Placeholder
This commit is contained in:
parent
07e968b640
commit
e24a4b4690
8 changed files with 41 additions and 31 deletions
|
@ -1576,11 +1576,9 @@ impl UniverseIndex {
|
|||
}
|
||||
}
|
||||
|
||||
/// The "placeholder index" fully defines a placeholder region.
|
||||
/// Placeholder regions are identified by both a **universe** as well
|
||||
/// as a "bound-region" within that universe. The `bound_region` is
|
||||
/// basically a name -- distinct bound regions within the same
|
||||
/// universe are just two regions with an unknown relationship to one
|
||||
/// The "placeholder index" fully defines a placeholder region, type, or const. Placeholders are
|
||||
/// identified by both a universe, as well as a name residing within that universe. Distinct bound
|
||||
/// regions/types/consts within the same universe simply have an unknown relationship to one
|
||||
/// another.
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, TyEncodable, TyDecodable, PartialOrd, Ord)]
|
||||
pub struct Placeholder<T> {
|
||||
|
@ -1602,7 +1600,14 @@ pub type PlaceholderRegion = Placeholder<BoundRegion>;
|
|||
|
||||
pub type PlaceholderType = Placeholder<BoundVar>;
|
||||
|
||||
pub type PlaceholderConst = Placeholder<BoundVar>;
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, HashStable)]
|
||||
#[derive(TyEncodable, TyDecodable, PartialOrd, Ord)]
|
||||
pub struct BoundConst<'tcx> {
|
||||
pub var: BoundVar,
|
||||
pub ty: Ty<'tcx>,
|
||||
}
|
||||
|
||||
pub type PlaceholderConst<'tcx> = Placeholder<BoundConst<'tcx>>;
|
||||
|
||||
/// A `DefId` which is potentially bundled with its corresponding generic parameter
|
||||
/// in case `did` is a const argument.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue