diff options
| author | bors <bors@rust-lang.org> | 2024-09-14 16:18:12 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-09-14 16:18:12 +0000 |
| commit | 5fe0e40e05f2d0408c6a292b160f96d595aedfbc (patch) | |
| tree | ec012b7fe5ec3a55d979f5f8ce97a3dbdad94d41 /compiler/rustc_trait_selection/src/traits | |
| parent | e7386b361dda8c2222bee7a1ae79faba7e9a0351 (diff) | |
| parent | 2b40fdbb28009e8f23f34169c6f5579a037eaec5 (diff) | |
| download | rust-5fe0e40e05f2d0408c6a292b160f96d595aedfbc.tar.gz rust-5fe0e40e05f2d0408c6a292b160f96d595aedfbc.zip | |
Auto merge of #130357 - fmease:rollup-j3ej4q0, r=fmease
Rollup of 6 pull requests Successful merges: - #130017 (coverage: Extract `executor::block_on` from several async coverage tests) - #130268 (simd_shuffle: require index argument to be a vector) - #130290 (Stabilize entry_insert) - #130294 (Lifetime cleanups) - #130343 (docs: Enable required feature for 'closure_returning_async_block' lint) - #130349 (Fix `Parser::break_up_float`'s right span) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/query/normalize.rs | 10 | ||||
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/util.rs | 24 |
2 files changed, 17 insertions, 17 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/query/normalize.rs b/compiler/rustc_trait_selection/src/traits/query/normalize.rs index f1b524d1325..525fba69a87 100644 --- a/compiler/rustc_trait_selection/src/traits/query/normalize.rs +++ b/compiler/rustc_trait_selection/src/traits/query/normalize.rs @@ -25,7 +25,7 @@ use crate::traits::{ }; #[extension(pub trait QueryNormalizeExt<'tcx>)] -impl<'cx, 'tcx> At<'cx, 'tcx> { +impl<'a, 'tcx> At<'a, 'tcx> { /// Normalize `value` in the context of the inference context, /// yielding a resulting type, or an error if `value` cannot be /// normalized. If you don't care about regions, you should prefer @@ -160,9 +160,9 @@ impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for MaxEscapingBoundVarVisitor { } } -struct QueryNormalizer<'cx, 'tcx> { - infcx: &'cx InferCtxt<'tcx>, - cause: &'cx ObligationCause<'tcx>, +struct QueryNormalizer<'a, 'tcx> { + infcx: &'a InferCtxt<'tcx>, + cause: &'a ObligationCause<'tcx>, param_env: ty::ParamEnv<'tcx>, obligations: Vec<PredicateObligation<'tcx>>, cache: SsoHashMap<Ty<'tcx>, Ty<'tcx>>, @@ -170,7 +170,7 @@ struct QueryNormalizer<'cx, 'tcx> { universes: Vec<Option<ty::UniverseIndex>>, } -impl<'cx, 'tcx> FallibleTypeFolder<TyCtxt<'tcx>> for QueryNormalizer<'cx, 'tcx> { +impl<'a, 'tcx> FallibleTypeFolder<TyCtxt<'tcx>> for QueryNormalizer<'a, 'tcx> { type Error = NoSolution; fn cx(&self) -> TyCtxt<'tcx> { diff --git a/compiler/rustc_trait_selection/src/traits/util.rs b/compiler/rustc_trait_selection/src/traits/util.rs index 0fb13799e67..99445d03965 100644 --- a/compiler/rustc_trait_selection/src/traits/util.rs +++ b/compiler/rustc_trait_selection/src/traits/util.rs @@ -332,8 +332,8 @@ pub fn with_replaced_escaping_bound_vars< } } -pub struct BoundVarReplacer<'me, 'tcx> { - infcx: &'me InferCtxt<'tcx>, +pub struct BoundVarReplacer<'a, 'tcx> { + infcx: &'a InferCtxt<'tcx>, // These three maps track the bound variable that were replaced by placeholders. It might be // nice to remove these since we already have the `kind` in the placeholder; we really just need // the `var` (but we *could* bring that into scope if we were to track them as we pass them). @@ -345,15 +345,15 @@ pub struct BoundVarReplacer<'me, 'tcx> { current_index: ty::DebruijnIndex, // The `UniverseIndex` of the binding levels above us. These are optional, since we are lazy: // we don't actually create a universe until we see a bound var we have to replace. - universe_indices: &'me mut Vec<Option<ty::UniverseIndex>>, + universe_indices: &'a mut Vec<Option<ty::UniverseIndex>>, } -impl<'me, 'tcx> BoundVarReplacer<'me, 'tcx> { +impl<'a, 'tcx> BoundVarReplacer<'a, 'tcx> { /// Returns `Some` if we *were* able to replace bound vars. If there are any bound vars that /// use a binding level above `universe_indices.len()`, we fail. pub fn replace_bound_vars<T: TypeFoldable<TyCtxt<'tcx>>>( - infcx: &'me InferCtxt<'tcx>, - universe_indices: &'me mut Vec<Option<ty::UniverseIndex>>, + infcx: &'a InferCtxt<'tcx>, + universe_indices: &'a mut Vec<Option<ty::UniverseIndex>>, value: T, ) -> ( T, @@ -479,22 +479,22 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for BoundVarReplacer<'_, 'tcx> { } /// The inverse of [`BoundVarReplacer`]: replaces placeholders with the bound vars from which they came. -pub struct PlaceholderReplacer<'me, 'tcx> { - infcx: &'me InferCtxt<'tcx>, +pub struct PlaceholderReplacer<'a, 'tcx> { + infcx: &'a InferCtxt<'tcx>, mapped_regions: FxIndexMap<ty::PlaceholderRegion, ty::BoundRegion>, mapped_types: FxIndexMap<ty::PlaceholderType, ty::BoundTy>, mapped_consts: BTreeMap<ty::PlaceholderConst, ty::BoundVar>, - universe_indices: &'me [Option<ty::UniverseIndex>], + universe_indices: &'a [Option<ty::UniverseIndex>], current_index: ty::DebruijnIndex, } -impl<'me, 'tcx> PlaceholderReplacer<'me, 'tcx> { +impl<'a, 'tcx> PlaceholderReplacer<'a, 'tcx> { pub fn replace_placeholders<T: TypeFoldable<TyCtxt<'tcx>>>( - infcx: &'me InferCtxt<'tcx>, + infcx: &'a InferCtxt<'tcx>, mapped_regions: FxIndexMap<ty::PlaceholderRegion, ty::BoundRegion>, mapped_types: FxIndexMap<ty::PlaceholderType, ty::BoundTy>, mapped_consts: BTreeMap<ty::PlaceholderConst, ty::BoundVar>, - universe_indices: &'me [Option<ty::UniverseIndex>], + universe_indices: &'a [Option<ty::UniverseIndex>], value: T, ) -> T { let mut replacer = PlaceholderReplacer { |
