File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
compiler/rustc_typeck/src/coherence
src/test/ui/inherent-impls-overlap-check Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -192,6 +192,7 @@ impl ItemLikeVisitor<'v> for InherentOverlapChecker<'tcx> {
192192 . collect :: < SmallVec < [ RegionId ; 8 ] > > ( ) ;
193193 // Sort the id list so that the algorithm is deterministic
194194 ids. sort_unstable ( ) ;
195+ ids. dedup ( ) ;
195196 let ids = ids;
196197 match & ids[ ..] {
197198 // Create a new connected region
Original file line number Diff line number Diff line change @@ -31,4 +31,23 @@ repeat::repeat_with_idents!(impl Bar<A> { fn IDENT() {} });
3131impl Bar < A > { fn foo ( ) { } }
3232impl Bar < B > { fn foo ( ) { } }
3333
34+ // Regression test for issue #89820:
35+
36+ impl Bar < u8 > {
37+ pub fn a ( ) { }
38+ pub fn aa ( ) { }
39+ }
40+
41+ impl Bar < u16 > {
42+ pub fn b ( ) { }
43+ pub fn bb ( ) { }
44+ }
45+
46+ impl Bar < u32 > {
47+ pub fn a ( ) { }
48+ pub fn aa ( ) { }
49+ pub fn bb ( ) { }
50+ pub fn b ( ) { }
51+ }
52+
3453fn main ( ) { }
You can’t perform that action at this time.
0 commit comments