Remove some `is_nightly` checks from tests
authorAleksey Kladov <aleksey.kladov@gmail.com>
Sun, 22 Apr 2018 15:06:21 +0000 (18:06 +0300)
committerAleksey Kladov <aleksey.kladov@gmail.com>
Sun, 22 Apr 2018 15:08:31 +0000 (18:08 +0300)
tests/testsuite/build.rs
tests/testsuite/check.rs
tests/testsuite/path.rs
tests/testsuite/proc_macro.rs

index 2cb04e1bbbee3900c0dc99df8f4d8c76ad8e77e4..403ef8a3a2d9ca3fe4425c324e46f6ba20f81b69 100644 (file)
@@ -47,10 +47,6 @@ fn cargo_fail_with_no_stderr() {
 /// `rustc` getting `-Zincremental` passed to it.
 #[test]
 fn cargo_compile_incremental() {
-    if !is_nightly() {
-        return;
-    }
-
     let p = project("foo")
         .file("Cargo.toml", &basic_bin_manifest("foo"))
         .file("src/foo.rs", &main_file(r#""i am foo""#, &[]))
@@ -77,10 +73,6 @@ fn cargo_compile_incremental() {
 
 #[test]
 fn incremental_profile() {
-    if !is_nightly() {
-        return;
-    }
-
     let p = project("foo")
         .file(
             "Cargo.toml",
@@ -137,10 +129,6 @@ fn incremental_profile() {
 
 #[test]
 fn incremental_config() {
-    if !is_nightly() {
-        return;
-    }
-
     let p = project("foo")
         .file(
             "Cargo.toml",
@@ -3682,31 +3670,6 @@ fn custom_target_dir() {
     );
 }
 
-#[test]
-fn rustc_no_trans() {
-    if !is_nightly() {
-        return;
-    }
-
-    let p = project("foo")
-        .file(
-            "Cargo.toml",
-            r#"
-            [package]
-            name = "foo"
-            version = "0.0.1"
-            authors = []
-        "#,
-        )
-        .file("src/main.rs", "fn main() {}")
-        .build();
-
-    assert_that(
-        p.cargo("rustc").arg("-v").arg("--").arg("-Zno-trans"),
-        execs().with_status(0),
-    );
-}
-
 #[test]
 fn build_multiple_packages() {
     let p = project("foo")
index b55342d4c328945323cec8a919af9c0eda649313..9c7097075f71c940e14874bb1427263965948c31 100644 (file)
@@ -1,5 +1,4 @@
 use cargotest::install::exe;
-use cargotest::is_nightly;
 use cargotest::support::paths::CargoPathExt;
 use cargotest::support::registry::Package;
 use cargotest::support::{execs, project};
@@ -107,9 +106,6 @@ fn check_fail() {
 
 #[test]
 fn custom_derive() {
-    if !is_nightly() {
-        return;
-    }
     let foo = project("foo")
         .file(
             "Cargo.toml",
@@ -126,8 +122,6 @@ fn custom_derive() {
         .file(
             "src/main.rs",
             r#"
-#![feature(proc_macro)]
-
 #[macro_use]
 extern crate bar;
 
@@ -160,9 +154,6 @@ fn main() {
         .file(
             "src/lib.rs",
             r#"
-#![feature(proc_macro, proc_macro_lib)]
-#![crate_type = "proc-macro"]
-
 extern crate proc_macro;
 
 use proc_macro::TokenStream;
index c3eb71a0e1532a73474dc71d093a7665ab0e3c47..594e0b9a1b05ebdcc59cf6c33ea7b402653b4ecd 100644 (file)
@@ -2,7 +2,6 @@ use std::fs::{self, File};
 use std::io::prelude::*;
 
 use cargo::util::process;
-use cargotest;
 use cargotest::sleep_ms;
 use cargotest::support::paths::{self, CargoPathExt};
 use cargotest::support::{execs, main_file, project};
@@ -1284,9 +1283,6 @@ fn workspace_produces_rlib() {
 
 #[test]
 fn thin_lto_works() {
-    if !cargotest::is_nightly() {
-        return;
-    }
     let p = project("foo")
         .file(
             "Cargo.toml",
index 084a815b871215d65b1f12733716530f7d97830e..3a7b8546c773ae3dbd124787e087fce2791c3f51 100644 (file)
@@ -4,10 +4,6 @@ use hamcrest::assert_that;
 
 #[test]
 fn probe_cfg_before_crate_type_discovery() {
-    if !is_nightly() {
-        return;
-    }
-
     let client = project("client")
         .file(
             "Cargo.toml",
@@ -24,8 +20,6 @@ fn probe_cfg_before_crate_type_discovery() {
         .file(
             "src/main.rs",
             r#"
-            #![feature(proc_macro)]
-
             #[macro_use]
             extern crate noop;
 
@@ -52,8 +46,6 @@ fn probe_cfg_before_crate_type_discovery() {
         .file(
             "src/lib.rs",
             r#"
-            #![feature(proc_macro, proc_macro_lib)]
-
             extern crate proc_macro;
             use proc_macro::TokenStream;
 
@@ -70,10 +62,6 @@ fn probe_cfg_before_crate_type_discovery() {
 
 #[test]
 fn noop() {
-    if !is_nightly() {
-        return;
-    }
-
     let client = project("client")
         .file(
             "Cargo.toml",
@@ -90,8 +78,6 @@ fn noop() {
         .file(
             "src/main.rs",
             r#"
-            #![feature(proc_macro)]
-
             #[macro_use]
             extern crate noop;
 
@@ -118,8 +104,6 @@ fn noop() {
         .file(
             "src/lib.rs",
             r#"
-            #![feature(proc_macro, proc_macro_lib)]
-
             extern crate proc_macro;
             use proc_macro::TokenStream;
 
@@ -137,10 +121,6 @@ fn noop() {
 
 #[test]
 fn impl_and_derive() {
-    if !is_nightly() {
-        return;
-    }
-
     let client = project("client")
         .file(
             "Cargo.toml",
@@ -157,8 +137,6 @@ fn impl_and_derive() {
         .file(
             "src/main.rs",
             r#"
-            #![feature(proc_macro)]
-
             #[macro_use]
             extern crate transmogrify;
 
@@ -193,8 +171,6 @@ fn impl_and_derive() {
         .file(
             "src/lib.rs",
             r#"
-            #![feature(proc_macro, proc_macro_lib)]
-
             extern crate proc_macro;
             use proc_macro::TokenStream;
 
@@ -278,9 +254,6 @@ fn plugin_and_proc_macro() {
 
 #[test]
 fn proc_macro_doctest() {
-    if !is_nightly() {
-        return;
-    }
     let foo = project("foo")
         .file(
             "Cargo.toml",
@@ -296,7 +269,6 @@ fn proc_macro_doctest() {
         .file(
             "src/lib.rs",
             r#"
-#![feature(proc_macro, proc_macro_lib)]
 #![crate_type = "proc-macro"]
 
 extern crate proc_macro;