diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-07-31 09:02:15 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-07-31 15:17:20 +1000 |
| commit | a949c47f0d3c0fb0b444c25cb2eb3323fcc845e6 (patch) | |
| tree | ce7313c9fb900711cf9d5f43961b5281eb8bdd5b /compiler/rustc_traits | |
| parent | c4e3cc02281d898a6c9424f1bcebfb5ca38ca37f (diff) | |
| download | rust-a949c47f0d3c0fb0b444c25cb2eb3323fcc845e6.tar.gz rust-a949c47f0d3c0fb0b444c25cb2eb3323fcc845e6.zip | |
Remove `ParamEnvAnd::into_parts`.
The fields are public, so this doesn't need a method, normal deconstruction and/or field access is good enough.
Diffstat (limited to 'compiler/rustc_traits')
| -rw-r--r-- | compiler/rustc_traits/src/implied_outlives_bounds.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_traits/src/type_op.rs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_traits/src/implied_outlives_bounds.rs b/compiler/rustc_traits/src/implied_outlives_bounds.rs index 6fb483e6dac..397c24ff70c 100644 --- a/compiler/rustc_traits/src/implied_outlives_bounds.rs +++ b/compiler/rustc_traits/src/implied_outlives_bounds.rs @@ -7,7 +7,7 @@ use rustc_infer::infer::canonical::{self, Canonical}; use rustc_infer::traits::query::OutlivesBound; use rustc_infer::traits::query::type_op::ImpliedOutlivesBounds; use rustc_middle::query::Providers; -use rustc_middle::ty::TyCtxt; +use rustc_middle::ty::{ParamEnvAnd, TyCtxt}; use rustc_span::DUMMY_SP; use rustc_trait_selection::infer::InferCtxtBuilderExt; use rustc_trait_selection::traits::query::type_op::implied_outlives_bounds::compute_implied_outlives_bounds_inner; @@ -25,7 +25,7 @@ fn implied_outlives_bounds<'tcx>( NoSolution, > { tcx.infer_ctxt().enter_canonical_trait_query(&goal, |ocx, key| { - let (param_env, ImpliedOutlivesBounds { ty }) = key.into_parts(); + let ParamEnvAnd { param_env, value: ImpliedOutlivesBounds { ty } } = key; compute_implied_outlives_bounds_inner( ocx, param_env, diff --git a/compiler/rustc_traits/src/type_op.rs b/compiler/rustc_traits/src/type_op.rs index e58ad639d20..f77e1994cf4 100644 --- a/compiler/rustc_traits/src/type_op.rs +++ b/compiler/rustc_traits/src/type_op.rs @@ -43,7 +43,7 @@ fn type_op_normalize<'tcx, T>( where T: fmt::Debug + TypeFoldable<TyCtxt<'tcx>>, { - let (param_env, Normalize { value }) = key.into_parts(); + let ParamEnvAnd { param_env, value: Normalize { value } } = key; let Normalized { value, obligations } = ocx.infcx.at(&ObligationCause::dummy(), param_env).query_normalize(value)?; ocx.register_obligations(obligations); @@ -96,6 +96,6 @@ pub fn type_op_prove_predicate_with_cause<'tcx>( key: ParamEnvAnd<'tcx, ProvePredicate<'tcx>>, cause: ObligationCause<'tcx>, ) { - let (param_env, ProvePredicate { predicate }) = key.into_parts(); + let ParamEnvAnd { param_env, value: ProvePredicate { predicate } } = key; ocx.register_obligation(Obligation::new(ocx.infcx.tcx, cause, param_env, predicate)); } |
