File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
rustc_error_messages/locales/en-US Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -49,3 +49,8 @@ lint-lintpass-by-hand = implementing `LintPass` by hand
49
49
50
50
lint-non-existant-doc-keyword = found non-existing keyword `{ $keyword } ` used in `#[doc(keyword = \"...\")]`
51
51
.help = only existing keywords are allowed in core/std
52
+
53
+ lint-diag-out-of-impl =
54
+ diagnostics should only be created in `SessionDiagnostic`/`AddSubdiagnostic` impls
55
+
56
+ lint-untranslatable-diag = diagnostics should be created using translatable messages
Original file line number Diff line number Diff line change @@ -423,8 +423,7 @@ impl LateLintPass<'_> for Diagnostics {
423
423
debug ! ( ?found_impl) ;
424
424
if !found_impl {
425
425
cx. struct_span_lint ( DIAGNOSTIC_OUTSIDE_OF_IMPL , span, |lint| {
426
- lint. build ( "diagnostics should only be created in `SessionDiagnostic`/`AddSubdiagnostic` impls" )
427
- . emit ( ) ;
426
+ lint. build ( fluent:: lint:: diag_out_of_impl) . emit ( ) ;
428
427
} )
429
428
}
430
429
@@ -442,7 +441,7 @@ impl LateLintPass<'_> for Diagnostics {
442
441
debug ! ( ?found_diagnostic_message) ;
443
442
if !found_diagnostic_message {
444
443
cx. struct_span_lint ( UNTRANSLATABLE_DIAGNOSTIC , span, |lint| {
445
- lint. build ( "diagnostics should be created using translatable messages" ) . emit ( ) ;
444
+ lint. build ( fluent :: lint :: untranslatable_diag ) . emit ( ) ;
446
445
} )
447
446
}
448
447
}
You can’t perform that action at this time.
0 commit comments