]> git.lizzy.rs Git - rust.git/blobdiff - tests/fmt.rs
Allow `suboptimal_flops` in const functions
[rust.git] / tests / fmt.rs
index 3aff8741f6051d7e6b95e525bc1a37812b3e2173..be42f1fbb2023b4bb5bd8d4e2937be64cafa6f80 100644 (file)
@@ -1,3 +1,6 @@
+#![cfg_attr(feature = "deny-warnings", deny(warnings))]
+#![warn(rust_2018_idioms, unused_lifetimes)]
+
 use std::path::PathBuf;
 use std::process::Command;
 
@@ -7,7 +10,7 @@ fn fmt() {
         return;
     }
 
-    // Skip this test if rustup nightly is unavailable
+    // Skip this test if nightly rustfmt is unavailable
     let rustup_output = Command::new("rustup")
         .args(&["component", "list", "--toolchain", "nightly"])
         .output()
@@ -19,12 +22,9 @@ fn fmt() {
     }
 
     let root_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
-    let dev_dir = root_dir.join("clippy_dev");
-    let target_dir = root_dir.join("target");
-    let target_dir = target_dir.to_str().unwrap();
     let output = Command::new("cargo")
-        .current_dir(dev_dir)
-        .args(&["+nightly", "run", "--target-dir", target_dir, "--", "fmt", "--check"])
+        .current_dir(root_dir)
+        .args(&["dev", "fmt", "--check"])
         .output()
         .unwrap();