Skip to content

Commit c925e11

Browse files
no lint for other candidates when creating TraitPick
1 parent 8adfde3 commit c925e11

File tree

1 file changed

+2
-8
lines changed
  • compiler/rustc_hir_typeck/src/method

1 file changed

+2
-8
lines changed

compiler/rustc_hir_typeck/src/method/probe.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2288,10 +2288,7 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
22882288

22892289
let lint_ambiguous = match probes[0].0.kind {
22902290
TraitCandidate(_, lint) => lint,
2291-
WhereClauseCandidate(_) => false,
2292-
InherentImplCandidate { .. } | ObjectCandidate(_) => {
2293-
unreachable!()
2294-
}
2291+
_ => false,
22952292
};
22962293

22972294
// FIXME: check the return type here somehow.
@@ -2370,10 +2367,7 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
23702367

23712368
let lint_ambiguous = match probes[0].0.kind {
23722369
TraitCandidate(_, lint) => lint,
2373-
WhereClauseCandidate(_) => false,
2374-
InherentImplCandidate { .. } | ObjectCandidate(_) => {
2375-
unreachable!()
2376-
}
2370+
_ => false,
23772371
};
23782372

23792373
Some(Pick {

0 commit comments

Comments
 (0)