From: Aleksey Kladov Date: Sun, 22 Apr 2018 15:06:21 +0000 (+0300) Subject: Remove some `is_nightly` checks from tests X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~1^2~50^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=14067b952e21aab0abc22452eb114bb23bd113c5;p=cargo.git Remove some `is_nightly` checks from tests --- diff --git a/tests/testsuite/build.rs b/tests/testsuite/build.rs index 2cb04e1bb..403ef8a3a 100644 --- a/tests/testsuite/build.rs +++ b/tests/testsuite/build.rs @@ -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") diff --git a/tests/testsuite/check.rs b/tests/testsuite/check.rs index b55342d4c..9c7097075 100644 --- a/tests/testsuite/check.rs +++ b/tests/testsuite/check.rs @@ -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; diff --git a/tests/testsuite/path.rs b/tests/testsuite/path.rs index c3eb71a0e..594e0b9a1 100644 --- a/tests/testsuite/path.rs +++ b/tests/testsuite/path.rs @@ -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", diff --git a/tests/testsuite/proc_macro.rs b/tests/testsuite/proc_macro.rs index 084a815b8..3a7b8546c 100644 --- a/tests/testsuite/proc_macro.rs +++ b/tests/testsuite/proc_macro.rs @@ -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;