1
Fork 0

lint: port unstable feature diagnostics

Signed-off-by: David Wood <david.wood@huawei.com>
This commit is contained in:
David Wood 2022-06-28 13:50:44 +01:00
parent d071f504f8
commit 23ee3e0914
2 changed files with 3 additions and 1 deletions

View file

@ -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

View file

@ -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();
});
}
}