File tree 1 file changed +4
-3
lines changed
compiler/rustc_trait_selection/src/traits/select
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1756,6 +1756,7 @@ impl<'tcx> SelectionContext<'_, 'tcx> {
1756
1756
/// *fairly arbitrary* choices about which candidate is actually used.
1757
1757
///
1758
1758
/// For more details, look at the implementation of this method :)
1759
+ #[ instrument( level = "debug" , skip( self ) , ret) ]
1759
1760
fn winnow_candidates (
1760
1761
& mut self ,
1761
1762
has_non_region_infer : bool ,
@@ -1841,7 +1842,7 @@ impl<'tcx> SelectionContext<'_, 'tcx> {
1841
1842
match alias_bound {
1842
1843
Some ( Some ( index) ) => return Some ( ProjectionCandidate ( index) ) ,
1843
1844
Some ( None ) => { }
1844
- None => { }
1845
+ None => return None ,
1845
1846
}
1846
1847
1847
1848
// Need to prioritize builtin trait object impls as `<dyn Any as Any>::type_id`
@@ -1855,8 +1856,8 @@ impl<'tcx> SelectionContext<'_, 'tcx> {
1855
1856
. try_reduce ( |c1, c2| if has_non_region_infer { None } else { Some ( c1. min ( c2) ) } ) ;
1856
1857
match object_bound {
1857
1858
Some ( Some ( index) ) => return Some ( ObjectCandidate ( index) ) ,
1858
- Some ( None ) => return None ,
1859
- None => { }
1859
+ Some ( None ) => { }
1860
+ None => return None ,
1860
1861
}
1861
1862
1862
1863
// Finally, handle overlapping user-written impls.
You can’t perform that action at this time.
0 commit comments