This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +28
-3
lines changed Expand file tree Collapse file tree 2 files changed +28
-3
lines changed Original file line number Diff line number Diff line change @@ -2858,9 +2858,10 @@ impl ClashingExternDeclarations {
2858
2858
let a_poly_sig = a. fn_sig ( tcx) ;
2859
2859
let b_poly_sig = b. fn_sig ( tcx) ;
2860
2860
2861
- // As we don't compare regions, skip_binder is fine.
2862
- let a_sig = a_poly_sig. skip_binder ( ) ;
2863
- let b_sig = b_poly_sig. skip_binder ( ) ;
2861
+ // We don't compare regions, but leaving bound regions around ICEs, so
2862
+ // we erase them.
2863
+ let a_sig = tcx. erase_late_bound_regions ( a_poly_sig) ;
2864
+ let b_sig = tcx. erase_late_bound_regions ( b_poly_sig) ;
2864
2865
2865
2866
( a_sig. abi , a_sig. unsafety , a_sig. c_variadic )
2866
2867
== ( b_sig. abi , b_sig. unsafety , b_sig. c_variadic )
Original file line number Diff line number Diff line change
1
+ // Check that we do not ICE when structurally comparing types with lifetimes present.
2
+ // check-pass
3
+
4
+ pub struct Record < ' a > {
5
+ pub args : & ' a [ ( usize , & ' a str ) ] ,
6
+ }
7
+
8
+ mod a {
9
+ extern "Rust" {
10
+ fn foo < ' a , ' b > ( record : & ' a super :: Record < ' b > ) ;
11
+
12
+ fn bar < ' a , ' b > ( record : & ' a super :: Record < ' b > ) ;
13
+ }
14
+ }
15
+
16
+ mod b {
17
+ extern "Rust" {
18
+ fn foo < ' a , ' b > ( record : & ' a super :: Record < ' b > ) ;
19
+
20
+ fn bar < ' a , ' b > ( record : & ' a super :: Record < ' b > ) ;
21
+ }
22
+ }
23
+
24
+ fn main ( ) { }
You can’t perform that action at this time.
0 commit comments