Make const bound handling more like types/regions.
Currently there is `Ty` and `BoundTy`, and `Region` and `BoundRegion`, and `Const` and... `BoundVar`. An annoying inconsistency. This commit repurposes the existing `BoundConst`, which was barely used, so it's the partner to `Const`. Unlike `BoundTy`/`BoundRegion` it lacks a `kind` field but it's still nice to have because it makes the const code more similar to the ty/region code everywhere. The commit also removes `impl From<BoundVar> for BoundTy`, which has a single use and doesn't seem worth it. These changes fix the "FIXME: We really should have a separate `BoundConst` for consts".
This commit is contained in:
@@ -535,7 +535,10 @@ fn plug_infer_with_placeholders<'tcx>(
|
||||
ct,
|
||||
ty::Const::new_placeholder(
|
||||
self.infcx.tcx,
|
||||
ty::Placeholder { universe: self.universe, bound: self.next_var() },
|
||||
ty::Placeholder {
|
||||
universe: self.universe,
|
||||
bound: ty::BoundConst { var: self.next_var() },
|
||||
},
|
||||
),
|
||||
)
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user