Skip to content

Commit 1036df5

Browse files
committed
Fix clippy_lints doc-tests
1 parent a6601f2 commit 1036df5

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

clippy_lints/src/needless_continue.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//!
33
//! For example, the lint would catch
44
//!
5-
//! ```
5+
//! ```ignore
66
//! while condition() {
77
//! update_condition();
88
//! if x {
@@ -16,7 +16,7 @@
1616
//!
1717
//! And suggest something like this:
1818
//!
19-
//! ```
19+
//! ```ignore
2020
//! while condition() {
2121
//! update_condition();
2222
//! if x {
@@ -365,7 +365,7 @@ fn check_and_warn<'a>(ctx: &EarlyContext, expr: &'a ast::Expr) {
365365
///
366366
/// is transformed to
367367
///
368-
/// ```
368+
/// ```ignore
369369
/// {
370370
/// let x = 5;
371371
/// ```
@@ -388,7 +388,7 @@ pub fn erode_from_back(s: &str) -> String {
388388
/// any number of opening braces are eaten, followed by any number of newlines.
389389
/// e.g., the string
390390
///
391-
/// ```
391+
/// ```ignore
392392
/// {
393393
/// something();
394394
/// inside_a_block();
@@ -397,7 +397,7 @@ pub fn erode_from_back(s: &str) -> String {
397397
///
398398
/// is transformed to
399399
///
400-
/// ```
400+
/// ```ignore
401401
/// something();
402402
/// inside_a_block();
403403
/// }

clippy_lints/src/question_mark.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ impl LintPass for QuestionMarkPass {
4343
impl QuestionMarkPass {
4444
/// Check if the given expression on the given context matches the following structure:
4545
///
46-
/// ```
46+
/// ```ignore
4747
/// if option.is_none() {
4848
/// return None;
4949
/// }

clippy_lints/src/utils/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ pub fn span_lint_and_then<'a, 'tcx: 'a, T: LintContext<'tcx>, F>(
612612
/// These suggestions can be parsed by rustfix to allow it to automatically fix your code.
613613
/// In the example below, `help` is `"try"` and `sugg` is the suggested replacement `".any(|x| x > 2)"`.
614614
///
615-
/// ```
615+
/// ```ignore
616616
/// error: This `.fold` can be more succinctly expressed as `.any`
617617
/// --> $DIR/methods.rs:390:13
618618
/// |

0 commit comments

Comments
 (0)