diff options
| author | lcnr <rust@lcnr.de> | 2024-10-15 18:23:32 +0200 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2024-10-17 09:53:27 +0200 |
| commit | f3ce557fcd9f29893f1d00526edc5dd15c0088eb (patch) | |
| tree | 831e6fac82f7a8d7bbed96333f3002f5ecfd27e8 /compiler/rustc_middle | |
| parent | 9334d85e696164ca2942132bcefcc792bdbd2f22 (diff) | |
| download | rust-f3ce557fcd9f29893f1d00526edc5dd15c0088eb.tar.gz rust-f3ce557fcd9f29893f1d00526edc5dd15c0088eb.zip | |
`DropckOutlives` to `rustc_middle`
Diffstat (limited to 'compiler/rustc_middle')
| -rw-r--r-- | compiler/rustc_middle/src/query/mod.rs | 13 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/traits/query.rs | 8 |
2 files changed, 15 insertions, 6 deletions
diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs index dffb16f398c..2f5e47f6f35 100644 --- a/compiler/rustc_middle/src/query/mod.rs +++ b/compiler/rustc_middle/src/query/mod.rs @@ -65,10 +65,11 @@ use crate::query::plumbing::{ CyclePlaceholder, DynamicQuery, query_ensure, query_ensure_error_guaranteed, query_get_at, }; use crate::traits::query::{ - CanonicalAliasGoal, CanonicalImpliedOutlivesBoundsGoal, CanonicalPredicateGoal, - CanonicalTyGoal, CanonicalTypeOpAscribeUserTypeGoal, CanonicalTypeOpNormalizeGoal, - CanonicalTypeOpProvePredicateGoal, DropckConstraint, DropckOutlivesResult, - MethodAutoderefStepsResult, NoSolution, NormalizationResult, OutlivesBound, + CanonicalAliasGoal, CanonicalDropckOutlivesGoal, CanonicalImpliedOutlivesBoundsGoal, + CanonicalPredicateGoal, CanonicalTyGoal, CanonicalTypeOpAscribeUserTypeGoal, + CanonicalTypeOpNormalizeGoal, CanonicalTypeOpProvePredicateGoal, DropckConstraint, + DropckOutlivesResult, MethodAutoderefStepsResult, NoSolution, NormalizationResult, + OutlivesBound, }; use crate::traits::{ CodegenObligationError, DynCompatibilityViolation, EvaluationResult, ImplSource, @@ -2069,12 +2070,12 @@ rustc_queries! { /// Do not call this query directly: /// invoke `DropckOutlives::new(dropped_ty)).fully_perform(typeck.infcx)` instead. query dropck_outlives( - goal: CanonicalTyGoal<'tcx> + goal: CanonicalDropckOutlivesGoal<'tcx> ) -> Result< &'tcx Canonical<'tcx, canonical::QueryResponse<'tcx, DropckOutlivesResult<'tcx>>>, NoSolution, > { - desc { "computing dropck types for `{}`", goal.value.value } + desc { "computing dropck types for `{}`", goal.value.value.dropped_ty } } /// Do not call this query directly: invoke `infcx.predicate_may_hold()` or diff --git a/compiler/rustc_middle/src/traits/query.rs b/compiler/rustc_middle/src/traits/query.rs index a7990b820e8..6439ab86915 100644 --- a/compiler/rustc_middle/src/traits/query.rs +++ b/compiler/rustc_middle/src/traits/query.rs @@ -51,6 +51,11 @@ pub mod type_op { pub struct ImpliedOutlivesBounds<'tcx> { pub ty: Ty<'tcx>, } + + #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, HashStable, TypeFoldable, TypeVisitable)] + pub struct DropckOutlives<'tcx> { + pub dropped_ty: Ty<'tcx>, + } } pub type CanonicalAliasGoal<'tcx> = Canonical<'tcx, ty::ParamEnvAnd<'tcx, ty::AliasTy<'tcx>>>; @@ -76,6 +81,9 @@ pub type CanonicalTypeOpNormalizeGoal<'tcx, T> = pub type CanonicalImpliedOutlivesBoundsGoal<'tcx> = Canonical<'tcx, ty::ParamEnvAnd<'tcx, type_op::ImpliedOutlivesBounds<'tcx>>>; +pub type CanonicalDropckOutlivesGoal<'tcx> = + Canonical<'tcx, ty::ParamEnvAnd<'tcx, type_op::DropckOutlives<'tcx>>>; + #[derive(Clone, Debug, Default, HashStable, TypeFoldable, TypeVisitable)] pub struct DropckOutlivesResult<'tcx> { pub kinds: Vec<GenericArg<'tcx>>, |
