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
..
2024-12-12 23:36:27 +00:00
2024-12-10 11:20:19 +08:00
2024-12-12 23:36:27 +00:00
2024-12-12 23:36:27 +00:00
2024-12-05 14:14:17 -08:00
2024-12-13 00:04:56 +00:00
2024-12-12 23:36:27 +00:00
2024-12-12 23:36:27 +00:00
2024-12-12 23:36:27 +00:00
2024-12-12 23:36:27 +00:00
2024-12-13 00:04:56 +00:00
2024-12-13 14:18:41 -08:00
2024-12-12 23:36:27 +00:00
2024-12-12 23:36:27 +00:00
2024-12-13 00:04:56 +00:00
2024-12-12 23:36:27 +00:00
2024-12-10 11:34:13 +08:00
2024-12-08 20:21:46 +00:00
2024-12-13 00:04:56 +00:00
2024-12-13 00:04:56 +00:00
2024-12-12 23:36:27 +00:00
2024-12-07 22:18:51 +00:00
2024-12-13 00:04:56 +00:00
2024-12-12 16:29:40 +00:00
2024-12-06 16:42:09 -05:00
2024-12-12 23:36:27 +00:00
2024-12-02 03:43:50 -07:00

UI Tests

This folder contains rustc's UI tests.

Test Directives (Headers)

Typically, a UI test will have some test directives / headers which are special comments that tell compiletest how to build and interpret a test.

As part of an ongoing effort to rewrite compiletest (see https://github.com/rust-lang/compiler-team/issues/536), a major change proposal to change legacy compiletest-style headers // <directive> to ui_test-style headers //@ <directive> was accepted (see https://github.com/rust-lang/compiler-team/issues/512.

An example directive is ignore-test. In legacy compiletest style, the header would be written as

// ignore-test

but in ui_test style, the header would be written as

//@ ignore-test

compiletest is changed to accept only //@ directives for UI tests (currently), and will reject and report an error if it encounters any comments // <content> that may be parsed as a legacy compiletest-style test header. To fix this, you should migrate to the ui_test-style header //@ <content>.