mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
Auto merge of #89822 - tmiasko:overflap-duplicates, r=cjgillot
Deduplicate regions ids before merging them The merging code does not expect to see any duplicates. Fixes #89820. r? `@cjgillot`
This commit is contained in:
commit
eeb16a2a89
@ -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
|
||||
|
@ -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() {}
|
||||
|
Loading…
Reference in New Issue
Block a user