Rename INVALID_RUST_CODEBLOCK{,S}
This commit is contained in:
parent
4120f7561c
commit
b885d81a4a
5 changed files with 9 additions and 9 deletions
|
@ -294,7 +294,7 @@ warning: unclosed HTML tag `h1`
|
|||
warning: 2 warnings emitted
|
||||
```
|
||||
|
||||
## invalid_rust_codeblock
|
||||
## invalid_rust_codeblocks
|
||||
|
||||
This lint **warns by default**. It detects Rust code blocks in documentation
|
||||
examples that are invalid (e.g. empty, not parsable as Rust). For example:
|
||||
|
@ -322,7 +322,7 @@ warning: Rust code block is empty
|
|||
4 | | /// ```
|
||||
| |_______^
|
||||
|
|
||||
= note: `#[warn(rustdoc::invalid_rust_codeblock)]` on by default
|
||||
= note: `#[warn(rustdoc::invalid_rust_codeblocks)]` on by default
|
||||
|
||||
warning: Rust code block is empty
|
||||
--> src/lib.rs:8:5
|
||||
|
|
|
@ -158,13 +158,13 @@ declare_rustdoc_lint! {
|
|||
}
|
||||
|
||||
declare_rustdoc_lint! {
|
||||
/// The `invalid_rust_codeblock` lint detects Rust code blocks in
|
||||
/// The `invalid_rust_codeblocks` lint detects Rust code blocks in
|
||||
/// documentation examples that are invalid (e.g. empty, not parsable as
|
||||
/// Rust code). This is a `rustdoc` only lint, see the documentation in the
|
||||
/// [rustdoc book].
|
||||
///
|
||||
/// [rustdoc book]: ../../../rustdoc/lints.html#invalid_rust_codeblock
|
||||
INVALID_RUST_CODEBLOCK,
|
||||
/// [rustdoc book]: ../../../rustdoc/lints.html#invalid_rust_codeblocks
|
||||
INVALID_RUST_CODEBLOCKS,
|
||||
Warn,
|
||||
"codeblock could not be parsed as valid Rust or is empty"
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ crate static RUSTDOC_LINTS: Lazy<Vec<&'static Lint>> = Lazy::new(|| {
|
|||
MISSING_DOC_CODE_EXAMPLES,
|
||||
PRIVATE_DOC_TESTS,
|
||||
INVALID_CODEBLOCK_ATTRIBUTES,
|
||||
INVALID_RUST_CODEBLOCK,
|
||||
INVALID_RUST_CODEBLOCKS,
|
||||
INVALID_HTML_TAGS,
|
||||
BARE_URLS,
|
||||
MISSING_CRATE_LEVEL_DOCS,
|
||||
|
|
|
@ -123,7 +123,7 @@ impl<'a, 'tcx> SyntaxChecker<'a, 'tcx> {
|
|||
// All points of divergence have been handled earlier so this can be
|
||||
// done the same way whether the span is precise or not.
|
||||
self.cx.tcx.struct_span_lint_hir(
|
||||
crate::lint::INVALID_RUST_CODEBLOCK,
|
||||
crate::lint::INVALID_RUST_CODEBLOCKS,
|
||||
hir_id,
|
||||
sp,
|
||||
diag_builder,
|
||||
|
|
|
@ -7,7 +7,7 @@ LL | | /// let heart = '❤️';
|
|||
LL | | /// ```
|
||||
| |_______^
|
||||
|
|
||||
= note: `#[warn(rustdoc::invalid_rust_codeblock)]` on by default
|
||||
= note: `#[warn(rustdoc::invalid_rust_codeblocks)]` on by default
|
||||
help: `ignore` code blocks require valid Rust code for syntax highlighting; mark blocks that do not contain Rust code as text: ```text
|
||||
--> $DIR/ignore-block-help.rs:3:5
|
||||
|
|
||||
|
|
|
@ -7,7 +7,7 @@ LL | | /// \__________pkt->size___________/ \_result->size_/ \__pkt->si
|
|||
LL | | /// ```
|
||||
| |_______^
|
||||
|
|
||||
= note: `#[warn(rustdoc::invalid_rust_codeblock)]` on by default
|
||||
= note: `#[warn(rustdoc::invalid_rust_codeblocks)]` 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: \
|
||||
|
|
Loading…
Add table
Reference in a new issue