We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0762b75 commit 627aa92Copy full SHA for 627aa92
clippy_lints/src/casts/mod.rs
@@ -668,16 +668,17 @@ declare_clippy_lint! {
668
///
669
/// ### Example
670
/// ```rust,ignore
671
- /// let _: (0.0_f32 / 0.0) as u64;
+ /// let p = &0u32 as *const u32;
672
/// ```
673
/// Use instead:
674
675
- /// let _: = 0_u64;
+ /// let x = 0u32;
676
+ /// let px = &x as *const u32;
677
678
#[clippy::version = "1.72.0"]
679
pub PTR_TO_TEMPORARY,
680
correctness,
- "casting a known floating-point NaN into an integer"
681
+ "disallows obtaining a raw pointer to a temporary value"
682
}
683
684
pub struct Casts {
0 commit comments