mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-11 07:34:18 +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
|
/// **Known problems:** None
|
||||||
///
|
///
|
||||||
/// **Example:**
|
/// **Example:**
|
||||||
/// ```rust
|
/// ```rust,ignore
|
||||||
/// assert!(false)
|
/// assert!(false)
|
||||||
/// // or
|
/// // or
|
||||||
/// assert!(true)
|
/// assert!(true)
|
||||||
|
|
|
@ -22,7 +22,8 @@ declare_clippy_lint! {
|
||||||
/// **Example:**
|
/// **Example:**
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// let mut a = 5;
|
/// let mut a = 5;
|
||||||
/// ...
|
/// let b = 0;
|
||||||
|
/// // ...
|
||||||
/// a = a + b;
|
/// a = a + b;
|
||||||
/// ```
|
/// ```
|
||||||
pub ASSIGN_OP_PATTERN,
|
pub ASSIGN_OP_PATTERN,
|
||||||
|
|
|
@ -17,9 +17,10 @@ declare_clippy_lint! {
|
||||||
///
|
///
|
||||||
/// **Example:**
|
/// **Example:**
|
||||||
/// ```rust
|
/// ```rust
|
||||||
|
/// let x = 1;
|
||||||
/// 0 / x;
|
/// 0 / x;
|
||||||
/// 0 * x;
|
/// 0 * x;
|
||||||
/// x & 0
|
/// x & 0;
|
||||||
/// ```
|
/// ```
|
||||||
pub ERASING_OP,
|
pub ERASING_OP,
|
||||||
correctness,
|
correctness,
|
||||||
|
|
|
@ -23,7 +23,7 @@ declare_clippy_lint! {
|
||||||
/// See rust-lang/rust-clippy#1439 for more details.
|
/// See rust-lang/rust-clippy#1439 for more details.
|
||||||
///
|
///
|
||||||
/// **Example:**
|
/// **Example:**
|
||||||
/// ```rust
|
/// ```rust,ignore
|
||||||
/// xs.map(|x| foo(x))
|
/// xs.map(|x| foo(x))
|
||||||
/// ```
|
/// ```
|
||||||
/// where `foo(_)` is a plain function that takes the exact argument type of
|
/// where `foo(_)` is a plain function that takes the exact argument type of
|
||||||
|
|
|
@ -37,7 +37,7 @@ declare_clippy_lint! {
|
||||||
/// **Example:**
|
/// **Example:**
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// fn foo(ref x: u8) -> bool {
|
/// fn foo(ref x: u8) -> bool {
|
||||||
/// ..
|
/// true
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
pub TOPLEVEL_REF_ARG,
|
pub TOPLEVEL_REF_ARG,
|
||||||
|
|
|
@ -40,7 +40,7 @@ declare_clippy_lint! {
|
||||||
/// **Known problems:** None.
|
/// **Known problems:** None.
|
||||||
///
|
///
|
||||||
/// **Example:**
|
/// **Example:**
|
||||||
/// ```rust
|
/// ```rust,ignore
|
||||||
/// struct X {
|
/// struct X {
|
||||||
/// values: Box<Vec<Foo>>,
|
/// values: Box<Vec<Foo>>,
|
||||||
/// }
|
/// }
|
||||||
|
@ -48,7 +48,7 @@ declare_clippy_lint! {
|
||||||
///
|
///
|
||||||
/// Better:
|
/// Better:
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust,ignore
|
||||||
/// struct X {
|
/// struct X {
|
||||||
/// values: Vec<Foo>,
|
/// values: Vec<Foo>,
|
||||||
/// }
|
/// }
|
||||||
|
@ -101,6 +101,7 @@ declare_clippy_lint! {
|
||||||
/// fn x() -> Option<Option<u32>> {
|
/// fn x() -> Option<Option<u32>> {
|
||||||
/// None
|
/// None
|
||||||
/// }
|
/// }
|
||||||
|
/// ```
|
||||||
pub OPTION_OPTION,
|
pub OPTION_OPTION,
|
||||||
complexity,
|
complexity,
|
||||||
"usage of `Option<Option<T>>`"
|
"usage of `Option<Option<T>>`"
|
||||||
|
@ -150,13 +151,13 @@ declare_clippy_lint! {
|
||||||
/// **Known problems:** None.
|
/// **Known problems:** None.
|
||||||
///
|
///
|
||||||
/// **Example:**
|
/// **Example:**
|
||||||
/// ```rust
|
/// ```rust,ignore
|
||||||
/// fn foo(bar: &Box<T>) { ... }
|
/// fn foo(bar: &Box<T>) { ... }
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// Better:
|
/// Better:
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust,ignore
|
||||||
/// fn foo(bar: &T) { ... }
|
/// fn foo(bar: &T) { ... }
|
||||||
/// ```
|
/// ```
|
||||||
pub BORROWED_BOX,
|
pub BORROWED_BOX,
|
||||||
|
@ -1537,7 +1538,7 @@ declare_clippy_lint! {
|
||||||
/// like `#[cfg(target_pointer_width = "64")] ..` instead.
|
/// like `#[cfg(target_pointer_width = "64")] ..` instead.
|
||||||
///
|
///
|
||||||
/// **Example:**
|
/// **Example:**
|
||||||
/// ```rust
|
/// ```rust,ignore
|
||||||
/// vec.len() <= 0
|
/// vec.len() <= 0
|
||||||
/// 100 > std::i32::MAX
|
/// 100 > std::i32::MAX
|
||||||
/// ```
|
/// ```
|
||||||
|
|
Loading…
Reference in a new issue