Skip to content

Commit 7f7e822

Browse files
committed
Don't assemble bound impls if candidate's ambiguous
1 parent 64f130b commit 7f7e822

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc/middle/traits/select.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
725725
try!(self.assemble_candidates_from_impls(obligation, &mut candidates.vec));
726726

727727
// No explicit impls were declared for this type, consider the fallback rules.
728-
if candidates.vec.is_empty() {
728+
if candidates.vec.is_empty() && !candidates.ambiguous {
729729
try!(self.assemble_builtin_bound_candidates(bound, stack, &mut candidates));
730730
}
731731
}

0 commit comments

Comments
 (0)