]> git.lizzy.rs Git - rust.git/blobdiff - tests/fmt.rs
Don't lint `if_same_then_else` with `if let` conditions
[rust.git] / tests / fmt.rs
index d529952bc69b403d15a5140ab6aa8ca2da491705..0defd45b68b064745537b02321f5bb2b56c688aa 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,17 +10,6 @@ fn fmt() {
         return;
     }
 
-    // Skip this test if rustfmt nightly is unavailable
-    let rustup_output = Command::new("rustup")
-        .args(&["component", "list", "--toolchain", "nightly"])
-        .output()
-        .unwrap();
-    assert!(rustup_output.status.success());
-    let component_output = String::from_utf8_lossy(&rustup_output.stdout);
-    if !component_output.contains("rustfmt") {
-        return;
-    }
-
     let root_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
     let output = Command::new("cargo")
         .current_dir(root_dir)