rust/tests/ui/rustdoc
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
..
cfg-rustdoc.rs
cfg-rustdoc.stderr
check-doc-alias-attr-location.rs
check-doc-alias-attr-location.stderr
check-doc-alias-attr.rs
check-doc-alias-attr.stderr
deny-invalid-doc-attrs.rs Update ui tests 2024-02-29 14:43:43 +01:00
deny-invalid-doc-attrs.stderr Update ui tests 2024-02-29 14:43:43 +01:00
doc_keyword.rs Remove rustc::existing_doc_keyword lint. 2024-12-17 13:56:10 +11:00
doc_keyword.stderr Remove rustc::existing_doc_keyword lint. 2024-12-17 13:56:10 +11:00
doc-alias-crate-level.rs
doc-alias-crate-level.stderr
doc-alias-same-name.rs
doc-alias-same-name.stderr
doc-inline-extern-crate.rs
doc-inline-extern-crate.stderr
doc-primitive.rs Update ui tests 2024-02-29 14:43:43 +01:00
doc-primitive.stderr Update ui tests 2024-02-29 14:43:43 +01:00
doc-test-attr-pass.rs
doc-test-attr.rs Update ui tests 2024-02-29 14:43:43 +01:00
doc-test-attr.stderr Update ui tests 2024-02-29 14:43:43 +01:00
duplicate_doc_alias.rs
duplicate_doc_alias.stderr
feature-gate-doc_primitive.rs
feature-gate-doc_primitive.stderr
hidden-doc-associated-item.rs
README.md
renamed-features-rustdoc_internals.rs
renamed-features-rustdoc_internals.stderr
unterminated-doc-comment.rs
unterminated-doc-comment.stderr Be more accurate about calculating display_col from a BytePos 2024-07-18 20:08:38 +00:00

This directory is for tests that have to do with rustdoc, but test the behavior of rustc. For example, rustc should not warn that an attribute rustdoc uses is unknown.