Skip to content

Commit 84ac618

Browse files
committed
go back to supplying diagnostic
1 parent 2b5bc48 commit 84ac618

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/librustc/traits/error_reporting.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,8 +449,9 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
449449
&format!("impl has extra requirement {}", requirement));
450450

451451
if let Some(node_id) = lint_id {
452-
let diagnostic = (*err).clone();
453-
self.tcx.sess.add_lint(EXTRA_REQUIREMENT_IN_IMPL, node_id, error_span, diagnostic);
452+
self.tcx.sess.add_lint_diagnostic(EXTRA_REQUIREMENT_IN_IMPL,
453+
node_id,
454+
(*err).clone());
454455
err.cancel();
455456
}
456457

0 commit comments

Comments
 (0)