Skip to content

Commit

Permalink
Auto merge of rust-lang#13089 - flba-eb:fix_example, r=y21
Browse files Browse the repository at this point in the history
Fix syntax errors in example code (clippy::cast_nan_to_int)

Fix two small syntax errors to make the examples compile.

changelog: none
  • Loading branch information
bors committed Jul 12, 2024
2 parents 86d348d + edeb0fc commit 51a1cf0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clippy_lints/src/casts/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -658,11 +658,11 @@ declare_clippy_lint! {
///
/// ### Example
/// ```rust,ignore
/// let _: (0.0_f32 / 0.0) as u64;
/// let _ = (0.0_f32 / 0.0) as u64;
/// ```
/// Use instead:
/// ```rust,ignore
/// let _: = 0_u64;
/// let _ = 0_u64;
/// ```
#[clippy::version = "1.66.0"]
pub CAST_NAN_TO_INT,
Expand Down

0 comments on commit 51a1cf0

Please sign in to comment.