File tree 1 file changed +5
-8
lines changed
compiler/rustc_middle/src/ty
1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -1590,13 +1590,11 @@ impl<'tcx> TyCtxt<'tcx> {
1590
1590
def_id1 : DefId ,
1591
1591
def_id2 : DefId ,
1592
1592
) -> Option < ImplOverlapKind > {
1593
- let impl_trait_ref1 = self . impl_trait_ref ( def_id1) . unwrap ( ) ;
1594
- let impl_trait_ref2 = self . impl_trait_ref ( def_id2) . unwrap ( ) ;
1593
+ let impl_trait_ref1 = self . impl_trait_ref ( def_id1) . unwrap ( ) . instantiate_identity ( ) ;
1594
+ let impl_trait_ref2 = self . impl_trait_ref ( def_id2) . unwrap ( ) . instantiate_identity ( ) ;
1595
1595
// If either trait impl references an error, they're allowed to overlap,
1596
1596
// as one of them essentially doesn't exist.
1597
- if impl_trait_ref1. instantiate_identity ( ) . references_error ( )
1598
- || impl_trait_ref2. instantiate_identity ( ) . references_error ( )
1599
- {
1597
+ if impl_trait_ref1. references_error ( ) || impl_trait_ref2. references_error ( ) {
1600
1598
return Some ( ImplOverlapKind :: Permitted { marker : false } ) ;
1601
1599
}
1602
1600
@@ -1615,9 +1613,8 @@ impl<'tcx> TyCtxt<'tcx> {
1615
1613
} ;
1616
1614
1617
1615
let is_marker_overlap = {
1618
- let is_marker_impl = |trait_ref : EarlyBinder < TraitRef < ' _ > > | -> bool {
1619
- self . trait_def ( trait_ref. skip_binder ( ) . def_id ) . is_marker
1620
- } ;
1616
+ let is_marker_impl =
1617
+ |trait_ref : TraitRef < ' _ > | -> bool { self . trait_def ( trait_ref. def_id ) . is_marker } ;
1621
1618
is_marker_impl ( impl_trait_ref1) && is_marker_impl ( impl_trait_ref2)
1622
1619
} ;
1623
1620
You can’t perform that action at this time.
0 commit comments