about summary refs log tree commit diff
path: root/tests/rustdoc-ui/lints
AgeCommit message (Collapse)AuthorLines
2025-09-27Improve code and better check `doc(cfg(...))` attributesGuillaume Gomez-1/+1
2025-09-27Add code documentation, improve code and improve error messageGuillaume Gomez-2/+2
2025-09-27Put back the `doc_cfg` code behind a nightly featureGuillaume Gomez-3/+4
2025-09-27Strenghten checks for `doc(auto_cfg(show/hide))` attributesGuillaume Gomez-1/+8
2025-09-27Update rustdoc testsGuillaume Gomez-27/+11
2025-09-22fix ICE in rustdoc::invalid_html_tagsbinarycat-0/+63
2025-09-10Add new ui tests for `rustdoc::bare_urls`Guillaume Gomez-1/+97
2025-08-21refactor rustdoc::invalid_html_tags tag parserbinarycat-19/+117
previously, this lint did not distinguish between `<img` and `<img>`, and since the latter should be accepted under html5, the former was also accepted. the parser now also handles multi-line tags and multi-line attributes.
2025-08-21add regression test for #145529binarycat-1/+44
2025-07-24adjust more unit tests to reflect more aggressive intra-doc lintingbinarycat-4/+69
2025-06-23Improve code and documentationGuillaume Gomez-3/+31
2025-06-23Add ui test for `redundant_explicit_links` rustdoc lint for items coming ↵Guillaume Gomez-0/+51
from expansion
2025-05-22rustdoc: improve diagnostics on raw doc fragmentsbinarycat-1/+87
1. rustdoc::bare_urls doesn't output invalid suggestions if source_span_for_markdown_range fails to find a span 2. source_span_for_markdown_range tries harder to return a span by applying an additional diagnostic fixes https://github.com/rust-lang/rust/issues/135851
2025-04-03compiletest: Require `//~` annotations even if `error-pattern` is specifiedVadim Petrochenkov-2/+3
2025-03-25compiletest: Support matching on diagnostics without a spanVadim Petrochenkov-0/+2
2025-02-10Show diff suggestion format on verbose replacementEsteban Küber-120/+180
``` error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields --> $DIR/attempted-access-non-fatal.rs:7:15 | LL | let _ = 2.l; | ^ | help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix | LL - let _ = 2.l; LL + let _ = 2.0f64; | ```
2024-12-27Remove the `-test` suffix from normalize directivesZalathar-2/+2
2024-12-18Point at lint name instead of whole attr for gated lintsEsteban Küber-2/+2
``` warning: unknown lint: `test_unstable_lint` --> $DIR/warn-unknown-unstable-lint-inline.rs:4:10 | LL | #![allow(test_unstable_lint, another_unstable_lint)] | ^^^^^^^^^^^^^^^^^^ | = note: the `test_unstable_lint` lint is unstable = help: add `#![feature(test_unstable_lint)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date note: the lint level is defined here --> $DIR/warn-unknown-unstable-lint-inline.rs:3:9 | LL | #![warn(unknown_lints)] | ^^^^^^^^^^^^^ warning: unknown lint: `test_unstable_lint` --> $DIR/warn-unknown-unstable-lint-inline.rs:4:29 | LL | #![allow(test_unstable_lint, another_unstable_lint)] | ^^^^^^^^^^^^^^^^^^^^^ | = note: the `test_unstable_lint` lint is unstable = help: add `#![feature(test_unstable_lint)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date note: the lint level is defined here --> $DIR/warn-unknown-unstable-lint-inline.rs:3:9 | LL | #![warn(unknown_lints)] | ^^^^^^^^^^^^^ ``` This is particularly relevant when there are multiple lints in the same `warn` attribute. Pointing at the smaller span makes it clearer which one the warning is complaining about.
2024-12-13Account for `///` when rendering multiline spansEsteban Küber-6/+35
Don't consider `///` and `//!` docstrings to be empty for the purposes of multiline span rendering.
2024-12-12Filter empty lines, comments and delimiters from previous to last multiline ↵Esteban Küber-15/+0
span rendering
2024-12-12Tweak multispan renderingEsteban Küber-57/+6
Consider comments and bare delimiters the same as an "empty line" for purposes of hiding rendered code output of long multispans. This results in more aggressive shortening of rendered output without losing too much context, specially in `*.stderr` tests that have "hidden" comments.
2024-11-28Do not emit `missing_doc_code_examples` rustdoc lint on module and a few ↵Guillaume Gomez-55/+19
other items
2024-09-28Improve mistyped docblock attribute warning messagesGuillaume Gomez-30/+30
2024-07-04Adjust rustdoc automatic link suggestionEsteban Küber-18/+90
Use more accurate spans for multipart suggestion.
2024-06-25RFC 2373: Update tests for rustdoc for `lint_reasons`xFrednet-4/+4
2024-06-25RFC 2383: Stabilize `lint_reasons` :tada:xFrednet-1/+0
2024-03-18When displaying multispans, ignore empty lines adjacent to `...`Esteban Küber-2/+0
``` error[E0308]: `match` arms have incompatible types --> tests/ui/codemap_tests/huge_multispan_highlight.rs:98:18 | 6 | let _ = match true { | ---------- `match` arms have incompatible types 7 | true => ( | _________________- 8 | | // last line shown in multispan header ... | 96 | | 97 | | ), | |_________- this is found to be of type `()` 98 | false => " | __________________^ ... | 119 | | 120 | | ", | |_________^ expected `()`, found `&str` error[E0308]: `match` arms have incompatible types --> tests/ui/codemap_tests/huge_multispan_highlight.rs:215:18 | 122 | let _ = match true { | ---------- `match` arms have incompatible types 123 | true => ( | _________________- 124 | | 125 | | 1 // last line shown in multispan header ... | 213 | | 214 | | ), | |_________- this is found to be of type `{integer}` 215 | false => " | __________________^ 216 | | 217 | | 218 | | 1 last line shown in multispan ... | 237 | | 238 | | ", | |_________^ expected integer, found `&str` ```
2024-02-29Update ui testsGuillaume Gomez-120/+28
2024-02-29Fix tests that are affected by this changesisungo-2/+2
2024-02-22[AUTO_GENERATED] Migrate compiletest to use `ui_test`-style `//@` directives许杰友 Jieyou Xu (Joe)-20/+20
2024-01-26remove illegal_floating_point_literal_pattern lintRalf Jung-7/+6
2024-01-13Bless testsGeorge-lewis-0/+2
Update tests
2023-12-12Add a test for a codeblock with multiple invalid attributesGuillaume Gomez-1/+39
2023-12-12Follow guidelines for lint suggestionsGuillaume Gomez-15/+31
2023-12-12Add test for `rustX` codeblock attributeGuillaume Gomez-1/+20
2023-11-24Bless rustdoc-ui testsNilstrieb-4/+4
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-10-05Add a note to duplicate diagnosticsAlex Macleod-29/+4
2023-08-21rustdoc: use unicode-aware checks for redundant explicit link fastpathMichael Howell-0/+18
Fixes #115064
2023-08-18Add regression test for inline docKyle Lin-0/+13
2023-08-18narrow down the lint trigger constraintKyle Lin-0/+1
2023-08-18add missing deny lintKyle Lin-0/+2
2023-08-18Add check-pass tests and fix test behaviorKyle Lin-0/+4
2023-08-18Still resolving rustdoc resolution panickingKyle Lin-6/+6
2023-08-18Support Reference & ReferenceUnknown link lintKyle Lin-1/+909
2023-08-18Refactor lint from rustc to rustdocKyle Lin-74/+327
2023-08-18fix trailing whitespaceKyle Lin-2/+2
2023-08-18bless test outputKyle Lin-9/+45
2023-08-18add more testsKyle Lin-0/+8
2023-08-18Fix resolution cachingKyle Lin-1/+113
2023-08-18Add warn level lint `redundant_explicit_links`Kyle Lin-0/+6
- Currently it will panic due to the resolution's caching issue