about summary refs log tree commit diff
path: root/tests/ui/rustdoc
AgeCommit message (Collapse)AuthorLines
2024-12-17Remove `rustc::existing_doc_keyword` lint.Nicholas Nethercote-5/+16
`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-07-18Be more accurate about calculating `display_col` from a `BytePos`Esteban Küber-1/+1
No longer track "zero-width" chars in `SourceMap`, read directly from the line when calculating the `display_col` of a `BytePos`. Move `char_width` to `rustc_span` and use it from the emitter. This change allows the following to properly align in terminals (depending on the font, the replaced control codepoints are rendered as 1 or 2 width, on my terminal they are rendered as 1, on VSCode text they are rendered as 2): ``` error: this file contains an unclosed delimiter --> $DIR/issue-68629.rs:5:17 | LL | ␜␟ts␀![{i | -- unclosed delimiter | | | unclosed delimiter LL | ␀␀ fn rݻoa>rݻm | ^ ```
2024-02-29Update ui testsGuillaume Gomez-20/+2
2024-02-16[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives许杰友 Jieyou Xu (Joe)-3/+3
2024-01-13Bless testsGeorge-lewis-0/+1
Update tests
2023-11-24Show number in error message even for one errorNilstrieb-7/+7
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-03-30Add test to ensure doc(primitive) is not recognized anymoreGuillaume Gomez-0/+24
2023-03-30Update tests for rustc_doc_primitiveGuillaume Gomez-12/+9
2023-01-11Move /src/test to /testsAlbert Larsan-0/+520