Skip to content

Commit 627aa92

Browse files
authored
Update mod.rs
1 parent 0762b75 commit 627aa92

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

clippy_lints/src/casts/mod.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -668,16 +668,17 @@ declare_clippy_lint! {
668668
///
669669
/// ### Example
670670
/// ```rust,ignore
671-
/// let _: (0.0_f32 / 0.0) as u64;
671+
/// let p = &0u32 as *const u32;
672672
/// ```
673673
/// Use instead:
674674
/// ```rust,ignore
675-
/// let _: = 0_u64;
675+
/// let x = 0u32;
676+
/// let px = &x as *const u32;
676677
/// ```
677678
#[clippy::version = "1.72.0"]
678679
pub PTR_TO_TEMPORARY,
679680
correctness,
680-
"casting a known floating-point NaN into an integer"
681+
"disallows obtaining a raw pointer to a temporary value"
681682
}
682683

683684
pub struct Casts {

0 commit comments

Comments
 (0)