]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/excessive_precision.rs
iterate List by value
[rust.git] / tests / ui / excessive_precision.rs
index b44364d6beb3eab06d6eac2eb774239e29da9ba4..ce4722a90f9002edd571d1d2123861905f5726c3 100644 (file)
@@ -1,6 +1,6 @@
-#![feature(tool_lints)]
+// run-rustfix
 #![warn(clippy::excessive_precision)]
-#![allow(clippy::print_literal)]
+#![allow(dead_code, unused_variables, clippy::print_literal)]
 
 fn main() {
     // Consts
@@ -54,4 +54,10 @@ fn main() {
 
     let good_bige32: f32 = 1E-10;
     let bad_bige32: f32 = 1.123_456_788_888E-10;
+
+    // Inferred type
+    let good_inferred: f32 = 1f32 * 1_000_000_000.;
+
+    // issue #2840
+    let num = 0.000_000_000_01e-10f64;
 }