mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 13:13:34 +00:00
Fix/Ignore doc tests
This commit is contained in:
parent
44c46d2059
commit
72aeaa891b
6 changed files with 13 additions and 10 deletions
|
@ -16,7 +16,7 @@ declare_clippy_lint! {
|
|||
/// **Known problems:** None
|
||||
///
|
||||
/// **Example:**
|
||||
/// ```rust
|
||||
/// ```rust,ignore
|
||||
/// assert!(false)
|
||||
/// // or
|
||||
/// assert!(true)
|
||||
|
|
|
@ -22,7 +22,8 @@ declare_clippy_lint! {
|
|||
/// **Example:**
|
||||
/// ```rust
|
||||
/// let mut a = 5;
|
||||
/// ...
|
||||
/// let b = 0;
|
||||
/// // ...
|
||||
/// a = a + b;
|
||||
/// ```
|
||||
pub ASSIGN_OP_PATTERN,
|
||||
|
|
|
@ -17,9 +17,10 @@ declare_clippy_lint! {
|
|||
///
|
||||
/// **Example:**
|
||||
/// ```rust
|
||||
/// let x = 1;
|
||||
/// 0 / x;
|
||||
/// 0 * x;
|
||||
/// x & 0
|
||||
/// x & 0;
|
||||
/// ```
|
||||
pub ERASING_OP,
|
||||
correctness,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -37,7 +37,7 @@ declare_clippy_lint! {
|
|||
/// **Example:**
|
||||
/// ```rust
|
||||
/// fn foo(ref x: u8) -> bool {
|
||||
/// ..
|
||||
/// true
|
||||
/// }
|
||||
/// ```
|
||||
pub TOPLEVEL_REF_ARG,
|
||||
|
|
|
@ -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
|
||||
/// ```
|
||||
|
|
Loading…
Reference in a new issue