Skip to content

Commit 9d38541

Browse files
committed
improve error reporting
1 parent 2614cc5 commit 9d38541

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/librustc/traits/select.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -1088,15 +1088,14 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
10881088
}
10891089

10901090
match self.is_knowable(stack) {
1091-
Some(Conflict::Downstream { used_to_be_broken: true }) if false => {
1092-
// ignore this for future-compat.
1093-
}
10941091
None => {}
10951092
Some(conflict) => {
10961093
debug!("coherence stage: not knowable");
10971094
// Heuristics: show the diagnostics when there are no candidates in crate.
10981095
let candidate_set = self.assemble_candidates(stack)?;
1099-
if !candidate_set.ambiguous && candidate_set.vec.is_empty() {
1096+
if !candidate_set.ambiguous && candidate_set.vec.iter().all(|c| {
1097+
!self.evaluate_candidate(stack, &c).may_apply()
1098+
}) {
11001099
let trait_ref = stack.obligation.predicate.skip_binder().trait_ref;
11011100
let self_ty = trait_ref.self_ty();
11021101
let trait_desc = trait_ref.to_string();

0 commit comments

Comments
 (0)