Skip to content

Commit

Permalink
Don't assemble bound impls if candidate's ambiguous
Browse files Browse the repository at this point in the history
  • Loading branch information
flaper87 committed Jan 16, 2015
1 parent 39fe05f commit 5aab863
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc/middle/traits/select.rs
Expand Up @@ -725,7 +725,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
try!(self.assemble_candidates_from_impls(obligation, &mut candidates.vec));

// No explicit impls were declared for this type, consider the fallback rules.
if candidates.vec.is_empty() {
if candidates.vec.is_empty() && !candidates.ambiguous {
try!(self.assemble_builtin_bound_candidates(bound, stack, &mut candidates));
}
}
Expand Down

0 comments on commit 5aab863

Please sign in to comment.