diff options
| author | Linus Färnstrand <faern@faern.net> | 2020-04-08 00:01:27 +0200 |
|---|---|---|
| committer | Linus Färnstrand <faern@faern.net> | 2020-04-08 00:43:27 +0200 |
| commit | c2f67e1e19ba63b96b1b6f7b0fe33d1ea907396e (patch) | |
| tree | b92b0b367b3c2cd32a5c6736d913f458e5a1afa4 | |
| parent | 518568ae0a1a88d3861a78609534ee05d4c86ffb (diff) | |
| download | rust-c2f67e1e19ba63b96b1b6f7b0fe33d1ea907396e.tar.gz rust-c2f67e1e19ba63b96b1b6f7b0fe33d1ea907396e.zip | |
Use integer assoc consts in more lint example code
| -rw-r--r-- | clippy_lints/src/neg_cmp_op_on_partial_ord.rs | 4 | ||||
| -rw-r--r-- | clippy_lints/src/types.rs | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/clippy_lints/src/neg_cmp_op_on_partial_ord.rs b/clippy_lints/src/neg_cmp_op_on_partial_ord.rs index 339c460bbd5..54536ed57d3 100644 --- a/clippy_lints/src/neg_cmp_op_on_partial_ord.rs +++ b/clippy_lints/src/neg_cmp_op_on_partial_ord.rs @@ -25,13 +25,13 @@ declare_clippy_lint! { /// /// // Bad /// let a = 1.0; - /// let b = std::f64::NAN; + /// let b = f64::NAN; /// /// let _not_less_or_equal = !(a <= b); /// /// // Good /// let a = 1.0; - /// let b = std::f64::NAN; + /// let b = f64::NAN; /// /// let _not_less_or_equal = match a.partial_cmp(&b) { /// None | Some(Ordering::Greater) => true, diff --git a/clippy_lints/src/types.rs b/clippy_lints/src/types.rs index 3c8affb367c..732725e1794 100644 --- a/clippy_lints/src/types.rs +++ b/clippy_lints/src/types.rs @@ -837,7 +837,7 @@ declare_clippy_lint! { /// /// **Example:** /// ```rust - /// let x = std::u64::MAX; + /// let x = u64::MAX; /// x as f64; /// ``` pub CAST_PRECISION_LOSS, @@ -904,7 +904,7 @@ declare_clippy_lint! { /// /// **Example:** /// ```rust - /// std::u32::MAX as i32; // will yield a value of `-1` + /// u32::MAX as i32; // will yield a value of `-1` /// ``` pub CAST_POSSIBLE_WRAP, pedantic, @@ -1752,7 +1752,7 @@ declare_clippy_lint! { /// ```rust /// let vec: Vec<isize> = Vec::new(); /// if vec.len() <= 0 {} - /// if 100 > std::i32::MAX {} + /// if 100 > i32::MAX {} /// ``` pub ABSURD_EXTREME_COMPARISONS, correctness, |
