File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
rustc_error_messages/locales/en-US
src/test/ui-fulldeps/internal-lints Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -46,3 +46,6 @@ lint-ty-qualified = usage of qualified `ty::{$ty}`
46
46
47
47
lint-lintpass-by-hand = implementing `LintPass` by hand
48
48
.help = try using `declare_lint_pass!` or `impl_lint_pass!` instead
49
+
50
+ lint-non-existant-doc-keyword = found non-existing keyword `{ $keyword } ` used in `#[doc(keyword = \"...\")]`
51
+ .help = only existing keywords are allowed in core/std
Original file line number Diff line number Diff line change @@ -366,13 +366,10 @@ impl<'tcx> LateLintPass<'tcx> for ExistingDocKeyword {
366
366
return ;
367
367
}
368
368
cx. struct_span_lint ( EXISTING_DOC_KEYWORD , attr. span , |lint| {
369
- lint. build ( & format ! (
370
- "Found non-existing keyword `{}` used in \
371
- `#[doc(keyword = \" ...\" )]`",
372
- v,
373
- ) )
374
- . help ( "only existing keywords are allowed in core/std" )
375
- . emit ( ) ;
369
+ lint. build ( fluent:: lint:: non_existant_doc_keyword)
370
+ . set_arg ( "keyword" , v)
371
+ . help ( fluent:: lint:: help)
372
+ . emit ( ) ;
376
373
} ) ;
377
374
}
378
375
}
Original file line number Diff line number Diff line change 1
- error: Found non-existing keyword `tadam` used in `#[doc(keyword = "...")]`
1
+ error: found non-existing keyword `tadam` used in `#[doc(keyword = \ "...\ ")]`
2
2
--> $DIR/existing_doc_keyword.rs:10:1
3
3
|
4
4
LL | #[doc(keyword = "tadam")]
You can’t perform that action at this time.
0 commit comments