File tree 2 files changed +20
-0
lines changed
compiler/rustc_typeck/src/coherence
src/test/ui/inherent-impls-overlap-check
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> {
192
192
. collect :: < SmallVec < [ RegionId ; 8 ] > > ( ) ;
193
193
// Sort the id list so that the algorithm is deterministic
194
194
ids. sort_unstable ( ) ;
195
+ ids. dedup ( ) ;
195
196
let ids = ids;
196
197
match & ids[ ..] {
197
198
// 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() {} });
31
31
impl Bar < A > { fn foo ( ) { } }
32
32
impl Bar < B > { fn foo ( ) { } }
33
33
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
+
34
53
fn main ( ) { }
You can’t perform that action at this time.
0 commit comments