diff options
| author | bors <bors@rust-lang.org> | 2024-04-14 09:02:22 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-04-14 09:02:22 +0000 |
| commit | 78bc0a5656337478cb4163d01ee4429bab5087a9 (patch) | |
| tree | c27ada3bd6433ac29be96ef4e6101ab6ecdb4485 /compiler/rustc_hir_analysis | |
| parent | a3269e920cf2f246246d53c8e637570b183960c0 (diff) | |
| parent | ab65c68585bae5bfa5a2deee8416231c0c13e708 (diff) | |
| download | rust-78bc0a5656337478cb4163d01ee4429bab5087a9.tar.gz rust-78bc0a5656337478cb4163d01ee4429bab5087a9.zip | |
Auto merge of #123913 - matthiaskrgr:rollup-w8stnwl, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #123651 (Thread local updates for idiomatic examples) - #123699 (run-make-support: tidy up support library) - #123779 (OpenBSD fix long socket addresses) - #123875 (Doc: replace x with y for hexa-decimal fmt) - #123879 (Add missing `unsafe` to some internal `std` functions) - #123889 (reduce tidy overheads in run-make checks) - #123898 (Generic associated consts: Check regions earlier when comparing impl with trait item def) - #123902 (compiletest: Update rustfix to 0.8.1) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_hir_analysis')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/check/compare_impl_item.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs b/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs index 50f88eb970a..a668a104575 100644 --- a/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs +++ b/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs @@ -1723,6 +1723,7 @@ pub(super) fn compare_impl_const_raw( compare_number_of_generics(tcx, impl_const_item, trait_const_item, false)?; compare_generic_param_kinds(tcx, impl_const_item, trait_const_item, false)?; + check_region_bounds_on_impl_item(tcx, impl_const_item, trait_const_item, false)?; compare_const_predicate_entailment(tcx, impl_const_item, trait_const_item, impl_trait_ref) } @@ -1763,8 +1764,6 @@ fn compare_const_predicate_entailment<'tcx>( let impl_ct_predicates = tcx.predicates_of(impl_ct.def_id); let trait_ct_predicates = tcx.predicates_of(trait_ct.def_id); - check_region_bounds_on_impl_item(tcx, impl_ct, trait_ct, false)?; - // The predicates declared by the impl definition, the trait and the // associated const in the trait are assumed. let impl_predicates = tcx.predicates_of(impl_ct_predicates.parent.unwrap()); @@ -1866,6 +1865,7 @@ pub(super) fn compare_impl_ty<'tcx>( let _: Result<(), ErrorGuaranteed> = try { compare_number_of_generics(tcx, impl_ty, trait_ty, false)?; compare_generic_param_kinds(tcx, impl_ty, trait_ty, false)?; + check_region_bounds_on_impl_item(tcx, impl_ty, trait_ty, false)?; compare_type_predicate_entailment(tcx, impl_ty, trait_ty, impl_trait_ref)?; check_type_bounds(tcx, trait_ty, impl_ty, impl_trait_ref)?; }; @@ -1886,8 +1886,6 @@ fn compare_type_predicate_entailment<'tcx>( let impl_ty_predicates = tcx.predicates_of(impl_ty.def_id); let trait_ty_predicates = tcx.predicates_of(trait_ty.def_id); - check_region_bounds_on_impl_item(tcx, impl_ty, trait_ty, false)?; - let impl_ty_own_bounds = impl_ty_predicates.instantiate_own(tcx, impl_args); if impl_ty_own_bounds.len() == 0 { // Nothing to check. |
