Skip to content

Commit 2065cb7

Browse files
committed
cool shit
1 parent f727897 commit 2065cb7

File tree

1 file changed

+4
-3
lines changed
  • compiler/rustc_trait_selection/src/traits/select

1 file changed

+4
-3
lines changed

compiler/rustc_trait_selection/src/traits/select/mod.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -1769,6 +1769,7 @@ impl<'tcx> SelectionContext<'_, 'tcx> {
17691769
/// *fairly arbitrary* choices about which candidate is actually used.
17701770
///
17711771
/// For more details, look at the implementation of this method :)
1772+
#[instrument(level = "debug", skip(self), ret)]
17721773
fn winnow_candidates(
17731774
&mut self,
17741775
has_non_region_infer: bool,
@@ -1854,7 +1855,7 @@ impl<'tcx> SelectionContext<'_, 'tcx> {
18541855
match alias_bound {
18551856
Some(Some(index)) => return Some(ProjectionCandidate(index)),
18561857
Some(None) => {}
1857-
None => {}
1858+
None => return None,
18581859
}
18591860

18601861
// Need to prioritize builtin trait object impls as `<dyn Any as Any>::type_id`
@@ -1868,8 +1869,8 @@ impl<'tcx> SelectionContext<'_, 'tcx> {
18681869
.try_reduce(|c1, c2| if has_non_region_infer { None } else { Some(c1.min(c2)) });
18691870
match object_bound {
18701871
Some(Some(index)) => return Some(ObjectCandidate(index)),
1871-
Some(None) => return None,
1872-
None => {}
1872+
Some(None) => {}
1873+
None => return None,
18731874
}
18741875

18751876
// Finally, handle overlapping user-written impls.

0 commit comments

Comments
 (0)