mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
f3dd31e214
This is a follow-up for https://github.com/rust-lang/rust/pull/121659, since most cases of unintended block quotes are lazy continuations. The lint is designed to be more generally useful than that, though, because it will also catch unintended list items and unintended block quotes that didn't coincidentally hit a pulldown-cmark bug.
42 lines
1 KiB
Rust
42 lines
1 KiB
Rust
#![warn(clippy::doc_lazy_continuation)]
|
|
|
|
/// 1. nest here
|
|
/// lazy continuation
|
|
//~^ ERROR: doc list item missing indentation
|
|
fn one() {}
|
|
|
|
/// 1. first line
|
|
/// lazy list continuations don't make warnings with this lint
|
|
//~^ ERROR: doc list item missing indentation
|
|
/// because they don't have the
|
|
//~^ ERROR: doc list item missing indentation
|
|
fn two() {}
|
|
|
|
/// - nest here
|
|
/// lazy continuation
|
|
//~^ ERROR: doc list item missing indentation
|
|
fn three() {}
|
|
|
|
/// - first line
|
|
/// lazy list continuations don't make warnings with this lint
|
|
//~^ ERROR: doc list item missing indentation
|
|
/// because they don't have the
|
|
//~^ ERROR: doc list item missing indentation
|
|
fn four() {}
|
|
|
|
/// - nest here
|
|
/// lazy continuation
|
|
//~^ ERROR: doc list item missing indentation
|
|
fn five() {}
|
|
|
|
/// - - first line
|
|
/// this will warn on the lazy continuation
|
|
//~^ ERROR: doc list item missing indentation
|
|
/// and so should this
|
|
//~^ ERROR: doc list item missing indentation
|
|
fn six() {}
|
|
|
|
/// - - first line
|
|
///
|
|
/// this is not a lazy continuation
|
|
fn seven() {}
|