diff --git a/clippy_lints/src/needless_continue.rs b/clippy_lints/src/needless_continue.rs index 4f6a8d9e2cb0..3258bcd069a7 100644 --- a/clippy_lints/src/needless_continue.rs +++ b/clippy_lints/src/needless_continue.rs @@ -2,7 +2,7 @@ //! //! For example, the lint would catch //! -//! ``` +//! ```ignore //! while condition() { //! update_condition(); //! if x { @@ -16,7 +16,7 @@ //! //! And suggest something like this: //! -//! ``` +//! ```ignore //! while condition() { //! update_condition(); //! if x { @@ -365,7 +365,7 @@ fn check_and_warn<'a>(ctx: &EarlyContext, expr: &'a ast::Expr) { /// /// is transformed to /// -/// ``` +/// ```ignore /// { /// let x = 5; /// ``` @@ -388,7 +388,7 @@ pub fn erode_from_back(s: &str) -> String { /// any number of opening braces are eaten, followed by any number of newlines. /// e.g., the string /// -/// ``` +/// ```ignore /// { /// something(); /// inside_a_block(); @@ -397,7 +397,7 @@ pub fn erode_from_back(s: &str) -> String { /// /// is transformed to /// -/// ``` +/// ```ignore /// something(); /// inside_a_block(); /// } diff --git a/clippy_lints/src/question_mark.rs b/clippy_lints/src/question_mark.rs index ab98eef36e66..d2d9b22d212e 100644 --- a/clippy_lints/src/question_mark.rs +++ b/clippy_lints/src/question_mark.rs @@ -43,7 +43,7 @@ impl LintPass for QuestionMarkPass { impl QuestionMarkPass { /// Check if the given expression on the given context matches the following structure: /// - /// ``` + /// ```ignore /// if option.is_none() { /// return None; /// } diff --git a/clippy_lints/src/utils/mod.rs b/clippy_lints/src/utils/mod.rs index ae8ffcf2fce6..faecdba357f5 100644 --- a/clippy_lints/src/utils/mod.rs +++ b/clippy_lints/src/utils/mod.rs @@ -612,7 +612,7 @@ pub fn span_lint_and_then<'a, 'tcx: 'a, T: LintContext<'tcx>, F>( /// These suggestions can be parsed by rustfix to allow it to automatically fix your code. /// In the example below, `help` is `"try"` and `sugg` is the suggested replacement `".any(|x| x > 2)"`. /// -/// ``` +/// ```ignore /// error: This `.fold` can be more succinctly expressed as `.any` /// --> $DIR/methods.rs:390:13 /// |