Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ impl ItemLikeVisitor<'v> for InherentOverlapChecker<'tcx> {
.collect::<SmallVec<[RegionId; 8]>>();
// Sort the id list so that the algorithm is deterministic
ids.sort_unstable();
ids.dedup();
let ids = ids;
match &ids[..] {
// Create a new connected region
Expand Down
19 changes: 19 additions & 0 deletions src/test/ui/inherent-impls-overlap-check/no-overlap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,23 @@ repeat::repeat_with_idents!(impl Bar<A> { fn IDENT() {} });
impl Bar<A> { fn foo() {} }
impl Bar<B> { fn foo() {} }

// Regression test for issue #89820:

impl Bar<u8> {
pub fn a() {}
pub fn aa() {}
}

impl Bar<u16> {
pub fn b() {}
pub fn bb() {}
}

impl Bar<u32> {
pub fn a() {}
pub fn aa() {}
pub fn bb() {}
pub fn b() {}
}

fn main() {}