]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/cast.rs
Auto merge of #3603 - xfix:random-state-lint, r=phansch
[rust.git] / tests / ui / cast.rs
index 2fb865b12b893909ef832b38aa11404c29a71fd7..51e41b701724089606f97fef06e0831ee0c5f9fc 100644 (file)
@@ -7,11 +7,13 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-
-#![feature(tool_lints)]
-
-
-#[warn(clippy::cast_precision_loss, clippy::cast_possible_truncation, clippy::cast_sign_loss, clippy::cast_possible_wrap, clippy::cast_lossless)]
+#[warn(
+    clippy::cast_precision_loss,
+    clippy::cast_possible_truncation,
+    clippy::cast_sign_loss,
+    clippy::cast_possible_wrap,
+    clippy::cast_lossless
+)]
 #[allow(clippy::no_effect, clippy::unnecessary_operation)]
 fn main() {
     // Test clippy::cast_precision_loss
@@ -49,6 +51,7 @@ fn main() {
     false as bool;
     &1i32 as &i32;
     // Should not trigger
+    #[rustfmt::skip]
     let v = vec!(1);
     &v as &[i32];
     1.0 as f64;