Skip to content

Commit 10f2d3f

Browse files
committed
lint: port test items diagnostics
Signed-off-by: David Wood <[email protected]>
1 parent 3a498a7 commit 10f2d3f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

compiler/rustc_error_messages/locales/en-US/lint.ftl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,3 +371,5 @@ lint-builtin-trivial-bounds = {$predicate_kind_name} bound {$predicate} does not
371371
372372
lint-builtin-ellipsis-inclusive-range-patterns = `...` range patterns are deprecated
373373
.suggestion = use `..=` for an inclusive range
374+
375+
lint-builtin-unnameable-test-items = cannot test inner items

compiler/rustc_lint/src/builtin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1915,7 +1915,7 @@ impl<'tcx> LateLintPass<'tcx> for UnnameableTestItems {
19151915
let attrs = cx.tcx.hir().attrs(it.hir_id());
19161916
if let Some(attr) = cx.sess().find_by_name(attrs, sym::rustc_test_marker) {
19171917
cx.struct_span_lint(UNNAMEABLE_TEST_ITEMS, attr.span, |lint| {
1918-
lint.build("cannot test inner items").emit();
1918+
lint.build(fluent::lint::builtin_unnameable_test_items).emit();
19191919
});
19201920
}
19211921
}

0 commit comments

Comments
 (0)