Skip to content

Commit c106dd4

Browse files
committed
traits/error_reporting.rs: always note obligation cause
1 parent 157422a commit c106dd4

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/librustc/middle/traits/error_reporting.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -206,13 +206,10 @@ pub fn report_selection_error<'a, 'tcx>(infcx: &InferCtxt<'a, 'tcx>,
206206
// error message, report with that message if it does
207207
let custom_note = report_on_unimplemented(infcx, &trait_ref.0,
208208
obligation.cause.span);
209-
if is_warning {
210-
note_obligation_cause(infcx, obligation);
211-
} else if let Some(s) = custom_note {
209+
if let Some(s) = custom_note {
212210
infcx.tcx.sess.span_note(obligation.cause.span, &s);
213-
} else {
214-
note_obligation_cause(infcx, obligation);
215211
}
212+
note_obligation_cause(infcx, obligation);
216213
}
217214
}
218215

0 commit comments

Comments
 (0)