]> git.lizzy.rs Git - rust.git/blobdiff - tests/fmt.rs
add tests for a false negative on `needless_return`
[rust.git] / tests / fmt.rs
index 3aff8741f6051d7e6b95e525bc1a37812b3e2173..7616d8001e8853bb8e9de4e44659d01b3253bd6f 100644 (file)
@@ -7,7 +7,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 +19,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();