about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-10-11 17:20:48 +0000
committerbors <bors@rust-lang.org>2022-10-11 17:20:48 +0000
commitdb0597f5619d5ed93feca28e61226d3581cc7867 (patch)
treeb3db8a2ceec219cff713d5ff7f7e22fd84e4ea10 /compiler/rustc_hir_analysis/src
parentcde693cf962f0f606e33eb21242f6bcd2d8d8b7a (diff)
parent3e01d072f7db1279a5d6e15b107040a9a2c78831 (diff)
downloadrust-db0597f5619d5ed93feca28e61226d3581cc7867.tar.gz
rust-db0597f5619d5ed93feca28e61226d3581cc7867.zip
Auto merge of #102926 - matthiaskrgr:rollup-oe2cdzj, r=matthiaskrgr
Rollup of 11 pull requests

Successful merges:

 - #100387 (Check uniqueness of impl items by trait item when applicable.)
 - #101727 (Stabilize map_first_last)
 - #101774 (Warn about safety of `fetch_update`)
 - #102227 (fs::get_path solarish version.)
 - #102445 (Add `is_empty()` method to `core::ffi::CStr`.)
 - #102612 (Migrate `codegen_ssa` to diagnostics structs - [Part 1])
 - #102685 (Interpret EH actions properly)
 - #102869 (Add basename and dirname aliases)
 - #102889 (rustc_hir: Less error-prone methods for accessing `PartialRes` resolution)
 - #102893 (Fix ICE #102878)
 - #102912 (:arrow_up: rust-analyzer)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_hir_analysis/src')
-rw-r--r--compiler/rustc_hir_analysis/src/impl_wf_check.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_hir_analysis/src/impl_wf_check.rs b/compiler/rustc_hir_analysis/src/impl_wf_check.rs
index c499364056f..69155a422b0 100644
--- a/compiler/rustc_hir_analysis/src/impl_wf_check.rs
+++ b/compiler/rustc_hir_analysis/src/impl_wf_check.rs
@@ -197,6 +197,9 @@ fn report_unused_parameter(tcx: TyCtxt<'_>, span: Span, kind: &str, name: Symbol
 
 /// Enforce that we do not have two items in an impl with the same name.
 fn enforce_impl_items_are_distinct(tcx: TyCtxt<'_>, impl_def_id: LocalDefId) {
+    if tcx.impl_trait_ref(impl_def_id).is_some() {
+        return;
+    }
     let mut seen_type_items = FxHashMap::default();
     let mut seen_value_items = FxHashMap::default();
     for &impl_item_ref in tcx.associated_item_def_ids(impl_def_id) {