"detects URLs that are not hyperlinks"
}
+declare_rustdoc_lint! {
+ /// 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_codeblocks
+ INVALID_RUST_CODEBLOCKS,
+ Warn,
+ "codeblock could not be parsed as valid Rust or is empty"
+}
+
crate static RUSTDOC_LINTS: Lazy<Vec<&'static Lint>> = Lazy::new(|| {
vec![
BROKEN_INTRA_DOC_LINKS,
MISSING_DOC_CODE_EXAMPLES,
PRIVATE_DOC_TESTS,
INVALID_CODEBLOCK_ATTRIBUTES,
+ INVALID_RUST_CODEBLOCKS,
INVALID_HTML_TAGS,
BARE_URLS,
MISSING_CRATE_LEVEL_DOCS,