diff options
| author | flip1995 <hello@philkrones.com> | 2019-03-10 23:01:56 +0100 |
|---|---|---|
| committer | flip1995 <hello@philkrones.com> | 2019-03-10 23:01:56 +0100 |
| commit | 72aeaa891b0966359a2efb09a1917c6aa41b43c7 (patch) | |
| tree | 831a918d132bff9be7e1be33db9372ff54f72b40 | |
| parent | 44c46d2059a627a6c3c68038993da53472d5a03b (diff) | |
| download | rust-72aeaa891b0966359a2efb09a1917c6aa41b43c7.tar.gz rust-72aeaa891b0966359a2efb09a1917c6aa41b43c7.zip | |
Fix/Ignore doc tests
| -rw-r--r-- | clippy_lints/src/assertions_on_constants.rs | 2 | ||||
| -rw-r--r-- | clippy_lints/src/assign_ops.rs | 3 | ||||
| -rw-r--r-- | clippy_lints/src/erasing_op.rs | 3 | ||||
| -rw-r--r-- | clippy_lints/src/eta_reduction.rs | 2 | ||||
| -rw-r--r-- | clippy_lints/src/misc.rs | 2 | ||||
| -rw-r--r-- | clippy_lints/src/types.rs | 11 |
6 files changed, 13 insertions, 10 deletions
diff --git a/clippy_lints/src/assertions_on_constants.rs b/clippy_lints/src/assertions_on_constants.rs index e2651206e80..9e2a8c451ee 100644 --- a/clippy_lints/src/assertions_on_constants.rs +++ b/clippy_lints/src/assertions_on_constants.rs @@ -16,7 +16,7 @@ declare_clippy_lint! { /// **Known problems:** None /// /// **Example:** - /// ```rust + /// ```rust,ignore /// assert!(false) /// // or /// assert!(true) diff --git a/clippy_lints/src/assign_ops.rs b/clippy_lints/src/assign_ops.rs index b71a5cf87c9..a39685f85ff 100644 --- a/clippy_lints/src/assign_ops.rs +++ b/clippy_lints/src/assign_ops.rs @@ -22,7 +22,8 @@ declare_clippy_lint! { /// **Example:** /// ```rust /// let mut a = 5; - /// ... + /// let b = 0; + /// // ... /// a = a + b; /// ``` pub ASSIGN_OP_PATTERN, diff --git a/clippy_lints/src/erasing_op.rs b/clippy_lints/src/erasing_op.rs index bd53e622217..07909ef587f 100644 --- a/clippy_lints/src/erasing_op.rs +++ b/clippy_lints/src/erasing_op.rs @@ -17,9 +17,10 @@ declare_clippy_lint! { /// /// **Example:** /// ```rust + /// let x = 1; /// 0 / x; /// 0 * x; - /// x & 0 + /// x & 0; /// ``` pub ERASING_OP, correctness, diff --git a/clippy_lints/src/eta_reduction.rs b/clippy_lints/src/eta_reduction.rs index 81c359f25ae..1329e945b37 100644 --- a/clippy_lints/src/eta_reduction.rs +++ b/clippy_lints/src/eta_reduction.rs @@ -23,7 +23,7 @@ declare_clippy_lint! { /// See rust-lang/rust-clippy#1439 for more details. /// /// **Example:** - /// ```rust + /// ```rust,ignore /// xs.map(|x| foo(x)) /// ``` /// where `foo(_)` is a plain function that takes the exact argument type of diff --git a/clippy_lints/src/misc.rs b/clippy_lints/src/misc.rs index fabcf5d8e82..77aee50c6f8 100644 --- a/clippy_lints/src/misc.rs +++ b/clippy_lints/src/misc.rs @@ -37,7 +37,7 @@ declare_clippy_lint! { /// **Example:** /// ```rust /// fn foo(ref x: u8) -> bool { - /// .. + /// true /// } /// ``` pub TOPLEVEL_REF_ARG, diff --git a/clippy_lints/src/types.rs b/clippy_lints/src/types.rs index 889f6023c38..5ad999f7095 100644 --- a/clippy_lints/src/types.rs +++ b/clippy_lints/src/types.rs @@ -40,7 +40,7 @@ declare_clippy_lint! { /// **Known problems:** None. /// /// **Example:** - /// ```rust + /// ```rust,ignore /// struct X { /// values: Box<Vec<Foo>>, /// } @@ -48,7 +48,7 @@ declare_clippy_lint! { /// /// Better: /// - /// ```rust + /// ```rust,ignore /// struct X { /// values: Vec<Foo>, /// } @@ -101,6 +101,7 @@ declare_clippy_lint! { /// fn x() -> Option<Option<u32>> { /// None /// } + /// ``` pub OPTION_OPTION, complexity, "usage of `Option<Option<T>>`" @@ -150,13 +151,13 @@ declare_clippy_lint! { /// **Known problems:** None. /// /// **Example:** - /// ```rust + /// ```rust,ignore /// fn foo(bar: &Box<T>) { ... } /// ``` /// /// Better: /// - /// ```rust + /// ```rust,ignore /// fn foo(bar: &T) { ... } /// ``` pub BORROWED_BOX, @@ -1537,7 +1538,7 @@ declare_clippy_lint! { /// like `#[cfg(target_pointer_width = "64")] ..` instead. /// /// **Example:** - /// ```rust + /// ```rust,ignore /// vec.len() <= 0 /// 100 > std::i32::MAX /// ``` |
