@@ -12,11 +12,11 @@ use rustc_middle::ty::{self, GenericArgsRef, Ty as MiddleTy};
12
12
use rustc_session:: { declare_lint_pass, declare_tool_lint} ;
13
13
use rustc_span:: Span ;
14
14
use rustc_span:: hygiene:: { ExpnKind , MacroKind } ;
15
- use rustc_span:: symbol:: { Symbol , kw , sym} ;
15
+ use rustc_span:: symbol:: sym;
16
16
use tracing:: debug;
17
17
18
18
use crate :: lints:: {
19
- BadOptAccessDiag , DefaultHashTypesDiag , DiagOutOfImpl , LintPassByHand , NonExistentDocKeyword ,
19
+ BadOptAccessDiag , DefaultHashTypesDiag , DiagOutOfImpl , LintPassByHand ,
20
20
NonGlobImportTypeIrInherent , QueryInstability , QueryUntracked , SpanUseEqCtxtDiag ,
21
21
SymbolInternStringLiteralDiag , TyQualified , TykindDiag , TykindKind , TypeIrInherentUsage ,
22
22
UntranslatableDiag ,
@@ -375,46 +375,6 @@ impl EarlyLintPass for LintPassImpl {
375
375
}
376
376
}
377
377
378
- declare_tool_lint ! {
379
- /// The `existing_doc_keyword` lint detects use `#[doc()]` keywords
380
- /// that don't exist, e.g. `#[doc(keyword = "..")]`.
381
- pub rustc:: EXISTING_DOC_KEYWORD ,
382
- Allow ,
383
- "Check that documented keywords in std and core actually exist" ,
384
- report_in_external_macro: true
385
- }
386
-
387
- declare_lint_pass ! ( ExistingDocKeyword => [ EXISTING_DOC_KEYWORD ] ) ;
388
-
389
- fn is_doc_keyword ( s : Symbol ) -> bool {
390
- s <= kw:: Union
391
- }
392
-
393
- impl < ' tcx > LateLintPass < ' tcx > for ExistingDocKeyword {
394
- fn check_item ( & mut self , cx : & LateContext < ' _ > , item : & rustc_hir:: Item < ' _ > ) {
395
- for attr in cx. tcx . hir ( ) . attrs ( item. hir_id ( ) ) {
396
- if !attr. has_name ( sym:: doc) {
397
- continue ;
398
- }
399
- if let Some ( list) = attr. meta_item_list ( ) {
400
- for nested in list {
401
- if nested. has_name ( sym:: keyword) {
402
- let keyword = nested
403
- . value_str ( )
404
- . expect ( "#[doc(keyword = \" ...\" )] expected a value!" ) ;
405
- if is_doc_keyword ( keyword) {
406
- return ;
407
- }
408
- cx. emit_span_lint ( EXISTING_DOC_KEYWORD , attr. span , NonExistentDocKeyword {
409
- keyword,
410
- } ) ;
411
- }
412
- }
413
- }
414
- }
415
- }
416
- }
417
-
418
378
declare_tool_lint ! {
419
379
/// The `untranslatable_diagnostic` lint detects messages passed to functions with `impl
420
380
/// Into<{D,Subd}iagMessage` parameters without using translatable Fluent strings.
0 commit comments