Skip to content

Commit b92723b

Browse files
committed
Rename INVALID_RUST_CODEBLOCK{,S}
1 parent 04de637 commit b92723b

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

src/doc/rustdoc/src/lints.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ warning: unclosed HTML tag `h1`
294294
warning: 2 warnings emitted
295295
```
296296

297-
## invalid_rust_codeblock
297+
## invalid_rust_codeblocks
298298

299299
This lint **warns by default**. It detects Rust code blocks in documentation
300300
examples that are invalid (e.g. empty, not parsable as Rust). For example:
@@ -322,7 +322,7 @@ warning: Rust code block is empty
322322
4 | | /// ```
323323
| |_______^
324324
|
325-
= note: `#[warn(rustdoc::invalid_rust_codeblock)]` on by default
325+
= note: `#[warn(rustdoc::invalid_rust_codeblocks)]` on by default
326326
327327
warning: Rust code block is empty
328328
--> src/lib.rs:8:5

src/librustdoc/lint.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,13 @@ declare_rustdoc_lint! {
158158
}
159159

160160
declare_rustdoc_lint! {
161-
/// The `invalid_rust_codeblock` lint detects Rust code blocks in
161+
/// The `invalid_rust_codeblocks` lint detects Rust code blocks in
162162
/// documentation examples that are invalid (e.g. empty, not parsable as
163163
/// Rust code). This is a `rustdoc` only lint, see the documentation in the
164164
/// [rustdoc book].
165165
///
166-
/// [rustdoc book]: ../../../rustdoc/lints.html#invalid_rust_codeblock
167-
INVALID_RUST_CODEBLOCK,
166+
/// [rustdoc book]: ../../../rustdoc/lints.html#invalid_rust_codeblocks
167+
INVALID_RUST_CODEBLOCKS,
168168
Warn,
169169
"codeblock could not be parsed as valid Rust or is empty"
170170
}
@@ -176,7 +176,7 @@ crate static RUSTDOC_LINTS: Lazy<Vec<&'static Lint>> = Lazy::new(|| {
176176
MISSING_DOC_CODE_EXAMPLES,
177177
PRIVATE_DOC_TESTS,
178178
INVALID_CODEBLOCK_ATTRIBUTES,
179-
INVALID_RUST_CODEBLOCK,
179+
INVALID_RUST_CODEBLOCKS,
180180
INVALID_HTML_TAGS,
181181
BARE_URLS,
182182
MISSING_CRATE_LEVEL_DOCS,

src/librustdoc/passes/check_code_block_syntax.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ impl<'a, 'tcx> SyntaxChecker<'a, 'tcx> {
123123
// All points of divergence have been handled earlier so this can be
124124
// done the same way whether the span is precise or not.
125125
self.cx.tcx.struct_span_lint_hir(
126-
crate::lint::INVALID_RUST_CODEBLOCK,
126+
crate::lint::INVALID_RUST_CODEBLOCKS,
127127
hir_id,
128128
sp,
129129
diag_builder,

src/test/rustdoc-ui/ignore-block-help.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | | /// let heart = '❤️';
77
LL | | /// ```
88
| |_______^
99
|
10-
= note: `#[warn(rustdoc::invalid_rust_codeblock)]` on by default
10+
= note: `#[warn(rustdoc::invalid_rust_codeblocks)]` on by default
1111
help: `ignore` code blocks require valid Rust code for syntax highlighting; mark blocks that do not contain Rust code as text: ```text
1212
--> $DIR/ignore-block-help.rs:3:5
1313
|

src/test/rustdoc-ui/invalid-syntax.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | | /// \__________pkt->size___________/ \_result->size_/ \__pkt->si
77
LL | | /// ```
88
| |_______^
99
|
10-
= note: `#[warn(rustdoc::invalid_rust_codeblock)]` on by default
10+
= note: `#[warn(rustdoc::invalid_rust_codeblocks)]` on by default
1111
= note: error from rustc: unknown start of token: \
1212
= note: error from rustc: unknown start of token: \
1313
= note: error from rustc: unknown start of token: \

0 commit comments

Comments
 (0)