add a preferred fix for cast_possible_wrap description (#14225)
close #9250 changelog: none
This commit is contained in:
commit
48fffe7db3
1 changed files with 7 additions and 1 deletions
|
|
@ -134,8 +134,14 @@ declare_clippy_lint! {
|
|||
///
|
||||
/// ### Example
|
||||
/// ```no_run
|
||||
/// u32::MAX as i32; // will yield a value of `-1`
|
||||
/// let _ = u32::MAX as i32; // will yield a value of `-1`
|
||||
/// ```
|
||||
///
|
||||
/// Use instead:
|
||||
/// ```no_run
|
||||
/// let _ = i32::try_from(u32::MAX).ok();
|
||||
/// ```
|
||||
///
|
||||
#[clippy::version = "pre 1.29.0"]
|
||||
pub CAST_POSSIBLE_WRAP,
|
||||
pedantic,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue