diff options
| author | Alexis Bourget <alexis.bourget@gmail.com> | 2020-12-28 23:07:20 +0100 |
|---|---|---|
| committer | Joshua Nelson <jyn514@gmail.com> | 2021-05-17 21:31:01 -0400 |
| commit | b574c67b93fbe0fc1194865441a1fa596b8922f1 (patch) | |
| tree | 51b0a7287094c0fe279a339528aa9b514d0962a7 /src/test | |
| parent | 3e99439f4dacc8ba0d2ca48d221694362d587927 (diff) | |
New rustdoc lint to respect -Dwarnings correctly
This adds a new lint to `rustc` that is used in rustdoc when a code block is empty or cannot be parsed as valid Rust code. Previously this was unconditionally a warning. As such some documentation comments were (unknowingly) abusing this to pass despite the `-Dwarnings` used when compiling `rustc`, this should not be the case anymore.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/rustdoc-ui/ignore-block-help.stderr | 5 | ||||
| -rw-r--r-- | src/test/rustdoc-ui/invalid-syntax.stderr | 1 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/test/rustdoc-ui/ignore-block-help.stderr b/src/test/rustdoc-ui/ignore-block-help.stderr index d45cd92d2d1..313b22c4c7c 100644 --- a/src/test/rustdoc-ui/ignore-block-help.stderr +++ b/src/test/rustdoc-ui/ignore-block-help.stderr @@ -7,11 +7,8 @@ LL | | /// let heart = '❤️'; LL | | /// ``` | |_______^ | + = note: `#[warn(invalid_rust_codeblock)]` on by default = note: error from rustc: character literal may only contain one codepoint -help: `ignore` code blocks require valid Rust code for syntax highlighting. Mark blocks that do not contain Rust code as text - | -LL | /// ```text,ignore (to-prevent-tidy-error) - | ^^^^^^^^ warning: 1 warning emitted diff --git a/src/test/rustdoc-ui/invalid-syntax.stderr b/src/test/rustdoc-ui/invalid-syntax.stderr index 75acdc5ab5f..67e093f9de2 100644 --- a/src/test/rustdoc-ui/invalid-syntax.stderr +++ b/src/test/rustdoc-ui/invalid-syntax.stderr @@ -7,6 +7,7 @@ LL | | /// \__________pkt->size___________/ \_result->size_/ \__pkt->si LL | | /// ``` | |_______^ | + = note: `#[warn(invalid_rust_codeblock)]` on by default = note: error from rustc: unknown start of token: \ = note: error from rustc: unknown start of token: \ = note: error from rustc: unknown start of token: \ |
