]> git.proxmox.com Git - rustc.git/blobdiff - src/tools/clippy/tests/ui/checked_conversions.rs
New upstream version 1.63.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / checked_conversions.rs
index 895a301e82126084346a6c56231cf854e86a3f48..ed4e0692388a55a4ad65dee76bf2649af70db3b2 100644 (file)
@@ -7,8 +7,6 @@
 )]
 #![warn(clippy::checked_conversions)]
 
-use std::convert::TryFrom;
-
 // Positive tests
 
 // Signed to unsigned
@@ -73,4 +71,9 @@ pub fn i8_to_u8(value: i8) {
     let _ = value >= 0;
 }
 
+// Do not lint
+pub const fn issue_8898(i: u32) -> bool {
+    i <= i32::MAX as u32
+}
+
 fn main() {}