Correctly handle normalization in implied bounds
Special-case Bevy dependents to not error
This commit is contained in:
parent
6ae4cfbbb0
commit
d96003dd2a
20 changed files with 375 additions and 170 deletions
|
@ -74,6 +74,10 @@ impl<T> EraseType for Result<&'_ T, traits::query::NoSolution> {
|
|||
type Result = [u8; size_of::<Result<&'static (), traits::query::NoSolution>>()];
|
||||
}
|
||||
|
||||
impl<T> EraseType for Result<&'_ [T], traits::query::NoSolution> {
|
||||
type Result = [u8; size_of::<Result<&'static [()], traits::query::NoSolution>>()];
|
||||
}
|
||||
|
||||
impl<T> EraseType for Result<&'_ T, rustc_errors::ErrorGuaranteed> {
|
||||
type Result = [u8; size_of::<Result<&'static (), rustc_errors::ErrorGuaranteed>>()];
|
||||
}
|
||||
|
|
|
@ -1949,7 +1949,7 @@ rustc_queries! {
|
|||
desc { "normalizing `{}`", goal.value }
|
||||
}
|
||||
|
||||
query implied_outlives_bounds(
|
||||
query implied_outlives_bounds_compat(
|
||||
goal: CanonicalTyGoal<'tcx>
|
||||
) -> Result<
|
||||
&'tcx Canonical<'tcx, canonical::QueryResponse<'tcx, Vec<OutlivesBound<'tcx>>>>,
|
||||
|
@ -1958,6 +1958,15 @@ rustc_queries! {
|
|||
desc { "computing implied outlives bounds for `{}`", goal.value.value }
|
||||
}
|
||||
|
||||
query implied_outlives_bounds(
|
||||
goal: CanonicalTyGoal<'tcx>
|
||||
) -> Result<
|
||||
&'tcx Canonical<'tcx, canonical::QueryResponse<'tcx, Vec<OutlivesBound<'tcx>>>>,
|
||||
NoSolution,
|
||||
> {
|
||||
desc { "computing implied outlives bounds v2 for `{}`", goal.value.value }
|
||||
}
|
||||
|
||||
/// Do not call this query directly:
|
||||
/// invoke `DropckOutlives::new(dropped_ty)).fully_perform(typeck.infcx)` instead.
|
||||
query dropck_outlives(
|
||||
|
|
|
@ -191,7 +191,7 @@ pub struct NormalizationResult<'tcx> {
|
|||
/// case they are called implied bounds). They are fed to the
|
||||
/// `OutlivesEnv` which in turn is supplied to the region checker and
|
||||
/// other parts of the inference system.
|
||||
#[derive(Clone, Debug, TypeFoldable, TypeVisitable, HashStable)]
|
||||
#[derive(Copy, Clone, Debug, TypeFoldable, TypeVisitable, HashStable)]
|
||||
pub enum OutlivesBound<'tcx> {
|
||||
RegionSubRegion(ty::Region<'tcx>, ty::Region<'tcx>),
|
||||
RegionSubParam(ty::Region<'tcx>, ty::ParamTy),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue