diff options
| author | David Wood <david.wood@huawei.com> | 2022-06-27 14:15:31 +0100 |
|---|---|---|
| committer | David Wood <david.wood@huawei.com> | 2022-06-30 08:59:21 +0100 |
| commit | a0624eb6c9236323eda00379a8342fba0af2e78d (patch) | |
| tree | 12eefd728db62e98b99508e899c8de933c71bd58 /compiler/rustc_lint/src/expect.rs | |
| parent | 2a69640eb2a8086ed848808efaf79c99781a78e5 (diff) | |
| download | rust-a0624eb6c9236323eda00379a8342fba0af2e78d.tar.gz rust-a0624eb6c9236323eda00379a8342fba0af2e78d.zip | |
lint: port expectation diagnostics
Signed-off-by: David Wood <david.wood@huawei.com>
Diffstat (limited to 'compiler/rustc_lint/src/expect.rs')
| -rw-r--r-- | compiler/rustc_lint/src/expect.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_lint/src/expect.rs b/compiler/rustc_lint/src/expect.rs index 95e3125045d..699e8154318 100644 --- a/compiler/rustc_lint/src/expect.rs +++ b/compiler/rustc_lint/src/expect.rs @@ -1,4 +1,5 @@ use crate::builtin; +use rustc_errors::fluent; use rustc_hir::HirId; use rustc_middle::ty::query::Providers; use rustc_middle::{lint::LintExpectation, ty::TyCtxt}; @@ -43,13 +44,13 @@ fn emit_unfulfilled_expectation_lint( hir_id, expectation.emission_span, |diag| { - let mut diag = diag.build("this lint expectation is unfulfilled"); + let mut diag = diag.build(fluent::lint::expectation); if let Some(rationale) = expectation.reason { diag.note(rationale.as_str()); } if expectation.is_unfulfilled_lint_expectations { - diag.note("the `unfulfilled_lint_expectations` lint can't be expected and will always produce this message"); + diag.note(fluent::lint::note); } diag.emit(); |
