File tree 1 file changed +6
-6
lines changed
compiler/rustc_middle/src/ty
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1590,12 +1590,12 @@ 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) ;
1594
- let impl_trait_ref2 = self . impl_trait_ref ( def_id2) ;
1593
+ let impl_trait_ref1 = self . impl_trait_ref ( def_id1) . unwrap ( ) ;
1594
+ let impl_trait_ref2 = self . impl_trait_ref ( def_id2) . unwrap ( ) ;
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. is_some_and ( |tr| tr . instantiate_identity ( ) . references_error ( ) )
1598
- || impl_trait_ref2. is_some_and ( |tr| tr . instantiate_identity ( ) . references_error ( ) )
1597
+ if impl_trait_ref1. instantiate_identity ( ) . references_error ( )
1598
+ || impl_trait_ref2. instantiate_identity ( ) . references_error ( )
1599
1599
{
1600
1600
return Some ( ImplOverlapKind :: Permitted { marker : false } ) ;
1601
1601
}
@@ -1615,8 +1615,8 @@ impl<'tcx> TyCtxt<'tcx> {
1615
1615
} ;
1616
1616
1617
1617
let is_marker_overlap = {
1618
- let is_marker_impl = |trait_ref : Option < EarlyBinder < TraitRef < ' _ > > > | -> bool {
1619
- trait_ref . is_some_and ( |tr| self . trait_def ( tr . skip_binder ( ) . def_id ) . is_marker )
1618
+ let is_marker_impl = |trait_ref : EarlyBinder < TraitRef < ' _ > > | -> bool {
1619
+ self . trait_def ( trait_ref . skip_binder ( ) . def_id ) . is_marker
1620
1620
} ;
1621
1621
is_marker_impl ( impl_trait_ref1) && is_marker_impl ( impl_trait_ref2)
1622
1622
} ;
You can’t perform that action at this time.
0 commit comments