Skip to content

Commit c2f67e1

Browse files
committed
Use integer assoc consts in more lint example code
1 parent 518568a commit c2f67e1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

clippy_lints/src/neg_cmp_op_on_partial_ord.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ declare_clippy_lint! {
2525
///
2626
/// // Bad
2727
/// let a = 1.0;
28-
/// let b = std::f64::NAN;
28+
/// let b = f64::NAN;
2929
///
3030
/// let _not_less_or_equal = !(a <= b);
3131
///
3232
/// // Good
3333
/// let a = 1.0;
34-
/// let b = std::f64::NAN;
34+
/// let b = f64::NAN;
3535
///
3636
/// let _not_less_or_equal = match a.partial_cmp(&b) {
3737
/// None | Some(Ordering::Greater) => true,

clippy_lints/src/types.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ declare_clippy_lint! {
837837
///
838838
/// **Example:**
839839
/// ```rust
840-
/// let x = std::u64::MAX;
840+
/// let x = u64::MAX;
841841
/// x as f64;
842842
/// ```
843843
pub CAST_PRECISION_LOSS,
@@ -904,7 +904,7 @@ declare_clippy_lint! {
904904
///
905905
/// **Example:**
906906
/// ```rust
907-
/// std::u32::MAX as i32; // will yield a value of `-1`
907+
/// u32::MAX as i32; // will yield a value of `-1`
908908
/// ```
909909
pub CAST_POSSIBLE_WRAP,
910910
pedantic,
@@ -1752,7 +1752,7 @@ declare_clippy_lint! {
17521752
/// ```rust
17531753
/// let vec: Vec<isize> = Vec::new();
17541754
/// if vec.len() <= 0 {}
1755-
/// if 100 > std::i32::MAX {}
1755+
/// if 100 > i32::MAX {}
17561756
/// ```
17571757
pub ABSURD_EXTREME_COMPARISONS,
17581758
correctness,

0 commit comments

Comments
 (0)