From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- compiler/rustc_hir_analysis/src/outlives/implicit_infer.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'compiler/rustc_hir_analysis/src/outlives/implicit_infer.rs') diff --git a/compiler/rustc_hir_analysis/src/outlives/implicit_infer.rs b/compiler/rustc_hir_analysis/src/outlives/implicit_infer.rs index 90c6edb65..925042436 100644 --- a/compiler/rustc_hir_analysis/src/outlives/implicit_infer.rs +++ b/compiler/rustc_hir_analysis/src/outlives/implicit_infer.rs @@ -13,9 +13,9 @@ use super::utils::*; /// `global_inferred_outlives`: this is initially the empty map that /// was generated by walking the items in the crate. This will /// now be filled with inferred predicates. -pub(super) fn infer_predicates<'tcx>( - tcx: TyCtxt<'tcx>, -) -> FxHashMap>> { +pub(super) fn infer_predicates( + tcx: TyCtxt<'_>, +) -> FxHashMap>> { debug!("infer_predicates"); let mut explicit_map = ExplicitPredicatesMap::new(); @@ -139,7 +139,7 @@ fn insert_required_predicates_to_be_wf<'tcx>( if let Some(unsubstituted_predicates) = global_inferred_outlives.get(&def.did()) { for (unsubstituted_predicate, &span) in &unsubstituted_predicates.0 { // `unsubstituted_predicate` is `U: 'b` in the - // example above. So apply the substitution to + // example above. So apply the substitution to // get `T: 'a` (or `predicate`): let predicate = unsubstituted_predicates .rebind(*unsubstituted_predicate) @@ -196,13 +196,13 @@ fn insert_required_predicates_to_be_wf<'tcx>( } } - ty::Projection(obj) => { + ty::Alias(ty::Projection, obj) => { // This corresponds to `>::Bar`. In this case, we should use the // explicit predicates as well. debug!("Projection"); check_explicit_predicates( tcx, - tcx.parent(obj.item_def_id), + tcx.parent(obj.def_id), obj.substs, required_predicates, explicit_map, -- cgit v1.2.3