From 4bc8fe85bd88c9dbf8e8de0eb9823f11d5d9ad58 Mon Sep 17 00:00:00 2001 From: Scott Schafer Date: Thu, 14 Jul 2022 19:55:44 -0500 Subject: [PATCH] remove unneeded nightly flags from various tests --- tests/testsuite/cargo_env_config.rs | 3 +-- tests/testsuite/features2.rs | 1 - tests/testsuite/fix.rs | 7 +------ tests/testsuite/future_incompat_report.rs | 6 ------ tests/testsuite/package_features.rs | 3 --- tests/testsuite/profile_custom.rs | 2 +- 6 files changed, 3 insertions(+), 19 deletions(-) diff --git a/tests/testsuite/cargo_env_config.rs b/tests/testsuite/cargo_env_config.rs index 352d9b39809..6ea34380d4c 100644 --- a/tests/testsuite/cargo_env_config.rs +++ b/tests/testsuite/cargo_env_config.rs @@ -149,8 +149,7 @@ fn env_no_override() { ) .build(); - p.cargo("run -Zconfigurable-env") - .masquerade_as_nightly_cargo() + p.cargo("run") .with_stdout_contains("CARGO_PKG_NAME:unchanged") .run(); } diff --git a/tests/testsuite/features2.rs b/tests/testsuite/features2.rs index af94073da22..6382643d35d 100644 --- a/tests/testsuite/features2.rs +++ b/tests/testsuite/features2.rs @@ -2389,7 +2389,6 @@ foo v0.1.0 [..] // Importantly, this does not include `f1` on `common`. p.cargo("tree -f") .arg("{p} feats:{f}") - .masquerade_as_nightly_cargo() .with_stdout( "\ foo v0.1.0 [..] diff --git a/tests/testsuite/fix.rs b/tests/testsuite/fix.rs index 04278b34415..941006595aa 100644 --- a/tests/testsuite/fix.rs +++ b/tests/testsuite/fix.rs @@ -1563,7 +1563,6 @@ fn fix_edition_2021() { ) .build(); p.cargo("fix --edition --allow-no-vcs") - .masquerade_as_nightly_cargo() .with_stderr( "\ [CHECKING] foo v0.1.0 [..] @@ -1745,7 +1744,6 @@ fn fix_with_run_cargo_in_proc_macros() { ) .build(); p.cargo("fix --allow-no-vcs") - .masquerade_as_nightly_cargo() .with_stderr_does_not_contain("error: could not find .rs file in rustc args") .run(); } @@ -1782,10 +1780,7 @@ fn non_edition_lint_migration() { .with_stderr_contains("[..]unused_imports[..]") .with_stderr_contains("[..]std::str::from_utf8[..]") .run(); - p.cargo("fix --edition --allow-no-vcs") - // Remove once --force-warn is stabilized - .masquerade_as_nightly_cargo() - .run(); + p.cargo("fix --edition --allow-no-vcs").run(); let contents = p.read_file("src/lib.rs"); // Check it does not remove the "unused" import. assert!(contents.contains("use std::str::from_utf8;")); diff --git a/tests/testsuite/future_incompat_report.rs b/tests/testsuite/future_incompat_report.rs index cf398cde42b..74c88bc56f3 100644 --- a/tests/testsuite/future_incompat_report.rs +++ b/tests/testsuite/future_incompat_report.rs @@ -282,12 +282,10 @@ fn color() { .run(); p.cargo("report future-incompatibilities") - .masquerade_as_nightly_cargo() .with_stdout_does_not_contain("[..]\x1b[[..]") .run(); p.cargo("report future-incompatibilities") - .masquerade_as_nightly_cargo() .env("CARGO_TERM_COLOR", "always") .with_stdout_contains("[..]\x1b[[..]") .run(); @@ -303,7 +301,6 @@ fn bad_ids() { let p = simple_project(); p.cargo("report future-incompatibilities --id 1") - .masquerade_as_nightly_cargo() .with_status(101) .with_stderr("error: no reports are currently available") .run(); @@ -314,13 +311,11 @@ fn bad_ids() { .run(); p.cargo("report future-incompatibilities --id foo") - .masquerade_as_nightly_cargo() .with_status(1) .with_stderr("error: Invalid value: could not parse `foo` as a number") .run(); p.cargo("report future-incompatibilities --id 7") - .masquerade_as_nightly_cargo() .with_status(101) .with_stderr( "\ @@ -404,7 +399,6 @@ with_updates v1.0.0 has the following newer versions available: 1.0.1, 1.0.2, 3. .run(); p.cargo("report future-incompatibilities") - .masquerade_as_nightly_cargo() .with_stdout_contains(update_message) .run() } diff --git a/tests/testsuite/package_features.rs b/tests/testsuite/package_features.rs index 31c1867cb03..6a237b1f3e7 100644 --- a/tests/testsuite/package_features.rs +++ b/tests/testsuite/package_features.rs @@ -77,13 +77,11 @@ fn virtual_no_default_features() { .run(); p.cargo("check --features a/dep,b/f1,b/f2,f2") - .masquerade_as_nightly_cargo() .with_status(101) .with_stderr("[ERROR] none of the selected packages contains these features: a/dep, b/f2, f2, did you mean: a/dep1, f1?") .run(); p.cargo("check --features a/dep,a/dep1") - .masquerade_as_nightly_cargo() .with_status(101) .with_stderr("[ERROR] none of the selected packages contains these features: a/dep, did you mean: b/f1?") .run(); @@ -107,7 +105,6 @@ fn virtual_typo_member_feature() { .file("src/lib.rs", "") .build() .cargo("check --features a/deny-warning") - .masquerade_as_nightly_cargo() .with_status(101) .with_stderr( "[ERROR] none of the selected packages contains these features: a/deny-warning, did you mean: a/deny-warnings?", diff --git a/tests/testsuite/profile_custom.rs b/tests/testsuite/profile_custom.rs index 889665baf87..226aa60a667 100644 --- a/tests/testsuite/profile_custom.rs +++ b/tests/testsuite/profile_custom.rs @@ -490,7 +490,7 @@ fn clean_custom_dirname() { ) .run(); - p.cargo("clean -p foo").masquerade_as_nightly_cargo().run(); + p.cargo("clean -p foo").run(); p.cargo("build --release") .with_stdout("")