diff options
| author | David Wood <david.wood@huawei.com> | 2022-06-28 13:50:44 +0100 |
|---|---|---|
| committer | David Wood <david.wood@huawei.com> | 2022-06-30 08:59:22 +0100 |
| commit | 23ee3e09141fd01ba3ec648123aa319810867c86 (patch) | |
| tree | 77cb66e17ce3eff11c6412475704d4575e9046e9 | |
| parent | d071f504f80767b1686b176b72fdcf87a35f8dca (diff) | |
| download | rust-23ee3e09141fd01ba3ec648123aa319810867c86.tar.gz rust-23ee3e09141fd01ba3ec648123aa319810867c86.zip | |
lint: port unstable feature diagnostics
Signed-off-by: David Wood <david.wood@huawei.com>
| -rw-r--r-- | compiler/rustc_error_messages/locales/en-US/lint.ftl | 2 | ||||
| -rw-r--r-- | compiler/rustc_lint/src/builtin.rs | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_error_messages/locales/en-US/lint.ftl b/compiler/rustc_error_messages/locales/en-US/lint.ftl index de2d21ff355..7c6a17aec58 100644 --- a/compiler/rustc_error_messages/locales/en-US/lint.ftl +++ b/compiler/rustc_error_messages/locales/en-US/lint.ftl @@ -352,3 +352,5 @@ lint-builtin-const-no-mangle = const items should never be `#[no_mangle]` lint-builtin-mutable-transmutes = transmuting &T to &mut T is undefined behavior, even if the reference is unused, consider instead using an UnsafeCell + +lint-builtin-unstable-features = unstable feature diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs index c2729b543c4..4787d2ee92a 100644 --- a/compiler/rustc_lint/src/builtin.rs +++ b/compiler/rustc_lint/src/builtin.rs @@ -1323,7 +1323,7 @@ impl<'tcx> LateLintPass<'tcx> for UnstableFeatures { if let Some(items) = attr.meta_item_list() { for item in items { cx.struct_span_lint(UNSTABLE_FEATURES, item.span(), |lint| { - lint.build("unstable feature").emit(); + lint.build(fluent::lint::builtin_unstable_features).emit(); }); } } |
