This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
compiler/rustc_trait_selection/src/traits/select Expand file tree Collapse file tree 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> {
17561756 /// *fairly arbitrary* choices about which candidate is actually used.
17571757 ///
17581758 /// For more details, look at the implementation of this method :)
1759+ #[ instrument( level = "debug" , skip( self ) , ret) ]
17591760 fn winnow_candidates (
17601761 & mut self ,
17611762 has_non_region_infer : bool ,
@@ -1841,7 +1842,7 @@ impl<'tcx> SelectionContext<'_, 'tcx> {
18411842 match alias_bound {
18421843 Some ( Some ( index) ) => return Some ( ProjectionCandidate ( index) ) ,
18431844 Some ( None ) => { }
1844- None => { }
1845+ None => return None ,
18451846 }
18461847
18471848 // Need to prioritize builtin trait object impls as `<dyn Any as Any>::type_id`
@@ -1855,8 +1856,8 @@ impl<'tcx> SelectionContext<'_, 'tcx> {
18551856 . try_reduce ( |c1, c2| if has_non_region_infer { None } else { Some ( c1. min ( c2) ) } ) ;
18561857 match object_bound {
18571858 Some ( Some ( index) ) => return Some ( ObjectCandidate ( index) ) ,
1858- Some ( None ) => return None ,
1859- None => { }
1859+ Some ( None ) => { }
1860+ None => return None ,
18601861 }
18611862
18621863 // Finally, handle overlapping user-written impls.
You can’t perform that action at this time.
0 commit comments