rust/compiler/rustc_span/src
Nicholas Nethercote 121e87bf14 Remove rustc::existing_doc_keyword lint.
`CheckAttrVisitor::check_doc_keyword` checks `#[doc(keyword = "..")]`
attributes to ensure they are on an empty module, and that the value is
a non-empty identifier.

The `rustc::existing_doc_keyword` lint checks these attributes to ensure
that the value is the name of a keyword.

It's silly to have two different checking mechanisms for these
attributes. This commit does the following.
- Changes `check_doc_keyword` to check that the value is the name of a
  keyword (avoiding the need for the identifier check, which removes a
  dependency on `rustc_lexer`).
- Removes the lint.
- Updates tests accordingly.

There is one hack: the `SelfTy` FIXME case used to used to be handled by
disabling the lint, but now is handled with a special case in
`is_doc_keyword`. That hack will go away if/when the FIXME is fixed.

Co-Authored-By: Guillaume Gomez <guillaume1.gomez@gmail.com>
2024-12-17 13:56:10 +11:00
..
analyze_source_file Be more accurate about calculating display_col from a BytePos 2024-07-18 20:08:38 +00:00
edit_distance allow symbol_intern_string_literal lint in test modules 2024-12-11 20:38:55 +03:00
source_map Avoid another &Lrc<..> in a return value. 2024-10-07 13:59:50 +11:00
symbol Reformat use declarations. 2024-07-29 08:26:52 +10:00
analyze_source_file.rs Add warn(unreachable_pub) to rustc_span. 2024-09-03 08:49:54 +10:00
caching_source_map_view.rs fix clippy::clone_on_ref_ptr for compiler 2024-10-28 18:05:08 +03:00
def_id.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
edit_distance.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
edition.rs Stabilize the 2024 edition 2024-11-22 11:12:15 -08:00
fatal_error.rs Auto merge of #117557 - Zoxc:panic-prio, r=petrochenkov 2023-11-09 00:39:02 +00:00
hygiene.rs Don't retag the PtrMetadata(&raw const *_n) in slice indexing 2024-12-13 02:00:20 -08:00
lib.rs Remove support for specializing ToString outside the standard library 2024-12-13 13:48:19 +00:00
profiling.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
source_map.rs Auto merge of #132791 - tyilo:big-file-fail-fast, r=compiler-errors 2024-11-24 07:37:32 +00:00
span_encoding.rs Rollup merge of #128197 - Alexendoo:span-ctxt, r=davidtwco 2024-11-14 20:45:12 +01:00
symbol.rs Remove rustc::existing_doc_keyword lint. 2024-12-17 13:56:10 +11:00
tests.rs add unstable support for outputting file checksums for use in cargo 2024-10-01 21:23:20 -06:00