diff options
Diffstat (limited to 'compiler/rustc_lint/src/expect.rs')
| -rw-r--r-- | compiler/rustc_lint/src/expect.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_lint/src/expect.rs b/compiler/rustc_lint/src/expect.rs index 699e8154318..af13f453a50 100644 --- a/compiler/rustc_lint/src/expect.rs +++ b/compiler/rustc_lint/src/expect.rs @@ -43,17 +43,17 @@ fn emit_unfulfilled_expectation_lint( builtin::UNFULFILLED_LINT_EXPECTATIONS, hir_id, expectation.emission_span, - |diag| { - let mut diag = diag.build(fluent::lint::expectation); + fluent::lint::expectation, + |lint| { if let Some(rationale) = expectation.reason { - diag.note(rationale.as_str()); + lint.note(rationale.as_str()); } if expectation.is_unfulfilled_lint_expectations { - diag.note(fluent::lint::note); + lint.note(fluent::lint::note); } - diag.emit(); + lint }, ); } |
