summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/checked_conversions.fixed
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/checked_conversions.fixed')
-rw-r--r--src/tools/clippy/tests/ui/checked_conversions.fixed16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/checked_conversions.fixed b/src/tools/clippy/tests/ui/checked_conversions.fixed
index cb7100bc9..f936957cb 100644
--- a/src/tools/clippy/tests/ui/checked_conversions.fixed
+++ b/src/tools/clippy/tests/ui/checked_conversions.fixed
@@ -1,7 +1,9 @@
// run-rustfix
+#![feature(custom_inner_attributes)]
#![allow(
clippy::cast_lossless,
+ unused,
// Int::max_value will be deprecated in the future
deprecated,
)]
@@ -76,4 +78,18 @@ pub const fn issue_8898(i: u32) -> bool {
i <= i32::MAX as u32
}
+fn msrv_1_33() {
+ #![clippy::msrv = "1.33"]
+
+ let value: i64 = 33;
+ let _ = value <= (u32::MAX as i64) && value >= 0;
+}
+
+fn msrv_1_34() {
+ #![clippy::msrv = "1.34"]
+
+ let value: i64 = 34;
+ let _ = u32::try_from(value).is_ok();
+}
+
fn main() {}