From 754455e4f25bb55dfafc6422f340d6032d3ac0b7 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Wed, 3 Nov 2021 20:00:00 -0700 Subject: [PATCH] Clean up some `-Z unstable-options` in tests. --- src/test/ui/hello2021.rs | 1 - .../ui/iterators/into-iter-on-arrays-2021.rs | 1 - .../allowed-cli-deny-by-default-lint.rs | 2 +- ...t-group-allowed-cli-warn-by-default-lint.rs | 2 +- .../warn-by-default-lint-two-modules.rs | 2 +- .../ui/lint/force-warn/warnings-lint-group.rs | 2 +- .../lint/force-warn/warnings-lint-group.stderr | 4 +--- .../lint/unused_parens_json_suggestion.fixed | 2 +- .../ui/lint/unused_parens_json_suggestion.rs | 2 +- .../lint/unused_parens_json_suggestion.stderr | 2 +- .../unused_parens_remove_json_suggestion.fixed | 2 +- .../unused_parens_remove_json_suggestion.rs | 2 +- ...unused_parens_remove_json_suggestion.stderr | 18 +++++++++--------- src/test/ui/matches2021.rs | 1 - src/test/ui/privacy/pub-priv-dep/pub-priv1.rs | 1 + .../ui/privacy/pub-priv-dep/pub-priv1.stderr | 8 ++++---- src/test/ui/rust-2021/prelude2021.rs | 1 - .../reserved-prefixes-migration.fixed | 2 +- .../rust-2021/reserved-prefixes-migration.rs | 2 +- .../extern-loc-missing-loc.rs | 2 +- src/tools/compiletest/src/header.rs | 3 --- src/tools/compiletest/src/runtest.rs | 3 --- 22 files changed, 27 insertions(+), 38 deletions(-) diff --git a/src/test/ui/hello2021.rs b/src/test/ui/hello2021.rs index 738f151b0f60b..134d8af5bfb8a 100644 --- a/src/test/ui/hello2021.rs +++ b/src/test/ui/hello2021.rs @@ -1,6 +1,5 @@ // run-pass // edition:2021 -// compile-flags: -Zunstable-options fn main() { println!("hello, 2021"); diff --git a/src/test/ui/iterators/into-iter-on-arrays-2021.rs b/src/test/ui/iterators/into-iter-on-arrays-2021.rs index ec54ed005173b..158317efe4782 100644 --- a/src/test/ui/iterators/into-iter-on-arrays-2021.rs +++ b/src/test/ui/iterators/into-iter-on-arrays-2021.rs @@ -1,6 +1,5 @@ // check-pass // edition:2021 -// compile-flags: -Zunstable-options use std::array::IntoIter; use std::ops::Deref; diff --git a/src/test/ui/lint/force-warn/allowed-cli-deny-by-default-lint.rs b/src/test/ui/lint/force-warn/allowed-cli-deny-by-default-lint.rs index 3fab9148392be..3a3d81176d691 100644 --- a/src/test/ui/lint/force-warn/allowed-cli-deny-by-default-lint.rs +++ b/src/test/ui/lint/force-warn/allowed-cli-deny-by-default-lint.rs @@ -1,6 +1,6 @@ // --force-warn $LINT causes $LINT (which is deny-by-default) to warn // despite $LINT being allowed on command line -// compile-flags: -A const_err --force-warn const_err -Zunstable-options +// compile-flags: -A const_err --force-warn const_err // check-pass const C: i32 = 1 / 0; diff --git a/src/test/ui/lint/force-warn/lint-group-allowed-cli-warn-by-default-lint.rs b/src/test/ui/lint/force-warn/lint-group-allowed-cli-warn-by-default-lint.rs index 4eb05b538b0ba..9736027452a8d 100644 --- a/src/test/ui/lint/force-warn/lint-group-allowed-cli-warn-by-default-lint.rs +++ b/src/test/ui/lint/force-warn/lint-group-allowed-cli-warn-by-default-lint.rs @@ -1,6 +1,6 @@ // --force-warn $LINT_GROUP causes $LINT (which is warn-by-default) to warn // despite $LINT being allowed on command line -// compile-flags: -A bare-trait-objects --force-warn rust-2018-idioms -Zunstable-options +// compile-flags: -A bare-trait-objects --force-warn rust-2018-idioms // check-pass pub trait SomeTrait {} diff --git a/src/test/ui/lint/force-warn/warn-by-default-lint-two-modules.rs b/src/test/ui/lint/force-warn/warn-by-default-lint-two-modules.rs index d2cb3417be68a..267e7b45f0c21 100644 --- a/src/test/ui/lint/force-warn/warn-by-default-lint-two-modules.rs +++ b/src/test/ui/lint/force-warn/warn-by-default-lint-two-modules.rs @@ -1,6 +1,6 @@ // --force-warn $LINT causes $LINT (which is warn-by-default) to warn // despite being allowed in one submodule (but not the other) -// compile-flags: --force-warn dead_code -Zunstable-options +// compile-flags: --force-warn dead_code // check-pass mod one { diff --git a/src/test/ui/lint/force-warn/warnings-lint-group.rs b/src/test/ui/lint/force-warn/warnings-lint-group.rs index fa25a1f8a842a..d1d4f5602f271 100644 --- a/src/test/ui/lint/force-warn/warnings-lint-group.rs +++ b/src/test/ui/lint/force-warn/warnings-lint-group.rs @@ -1,5 +1,5 @@ // --force-warn warnings is an error -// compile-flags: --force-warn warnings -Zunstable-options +// compile-flags: --force-warn warnings // error-pattern: `warnings` lint group is not supported fn main() {} diff --git a/src/test/ui/lint/force-warn/warnings-lint-group.stderr b/src/test/ui/lint/force-warn/warnings-lint-group.stderr index 03f5788b527d3..1faeed3370451 100644 --- a/src/test/ui/lint/force-warn/warnings-lint-group.stderr +++ b/src/test/ui/lint/force-warn/warnings-lint-group.stderr @@ -2,8 +2,6 @@ error[E0602]: `warnings` lint group is not supported with ´--force-warn´ error[E0602]: `warnings` lint group is not supported with ´--force-warn´ -error[E0602]: `warnings` lint group is not supported with ´--force-warn´ - -error: aborting due to 3 previous errors +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0602`. diff --git a/src/test/ui/lint/unused_parens_json_suggestion.fixed b/src/test/ui/lint/unused_parens_json_suggestion.fixed index 15ee19755bffc..c400454046748 100644 --- a/src/test/ui/lint/unused_parens_json_suggestion.fixed +++ b/src/test/ui/lint/unused_parens_json_suggestion.fixed @@ -1,4 +1,4 @@ -// compile-flags: --error-format json -Zunstable-options +// compile-flags: --error-format json // run-rustfix // The output for humans should just highlight the whole span without showing diff --git a/src/test/ui/lint/unused_parens_json_suggestion.rs b/src/test/ui/lint/unused_parens_json_suggestion.rs index d72df21e09ae2..962c8bdd7d789 100644 --- a/src/test/ui/lint/unused_parens_json_suggestion.rs +++ b/src/test/ui/lint/unused_parens_json_suggestion.rs @@ -1,4 +1,4 @@ -// compile-flags: --error-format json -Zunstable-options +// compile-flags: --error-format json // run-rustfix // The output for humans should just highlight the whole span without showing diff --git a/src/test/ui/lint/unused_parens_json_suggestion.stderr b/src/test/ui/lint/unused_parens_json_suggestion.stderr index 498c25d2e1c44..169fb824021ed 100644 --- a/src/test/ui/lint/unused_parens_json_suggestion.stderr +++ b/src/test/ui/lint/unused_parens_json_suggestion.stderr @@ -1,4 +1,4 @@ -{"message":"unnecessary parentheses around assigned value","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":596,"byte_end":597,"line_start":16,"line_end":16,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" let _a = (1 / (2 + 3)); +{"message":"unnecessary parentheses around assigned value","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_json_suggestion.rs","byte_start":577,"byte_end":578,"line_start":16,"line_end":16,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" let _a = (1 / (2 + 3)); --> $DIR/unused_parens_json_suggestion.rs:16:14 | LL | let _a = (1 / (2 + 3)); diff --git a/src/test/ui/lint/unused_parens_remove_json_suggestion.fixed b/src/test/ui/lint/unused_parens_remove_json_suggestion.fixed index 1d891d328dd5a..8a57cd57385f3 100644 --- a/src/test/ui/lint/unused_parens_remove_json_suggestion.fixed +++ b/src/test/ui/lint/unused_parens_remove_json_suggestion.fixed @@ -1,4 +1,4 @@ -// compile-flags: --error-format json -Zunstable-options +// compile-flags: --error-format json // run-rustfix // The output for humans should just highlight the whole span without showing diff --git a/src/test/ui/lint/unused_parens_remove_json_suggestion.rs b/src/test/ui/lint/unused_parens_remove_json_suggestion.rs index 494cd18450630..952332d54e9c1 100644 --- a/src/test/ui/lint/unused_parens_remove_json_suggestion.rs +++ b/src/test/ui/lint/unused_parens_remove_json_suggestion.rs @@ -1,4 +1,4 @@ -// compile-flags: --error-format json -Zunstable-options +// compile-flags: --error-format json // run-rustfix // The output for humans should just highlight the whole span without showing diff --git a/src/test/ui/lint/unused_parens_remove_json_suggestion.stderr b/src/test/ui/lint/unused_parens_remove_json_suggestion.stderr index 08291b10fcc20..43367aaa9113b 100644 --- a/src/test/ui/lint/unused_parens_remove_json_suggestion.stderr +++ b/src/test/ui/lint/unused_parens_remove_json_suggestion.stderr @@ -1,4 +1,4 @@ -{"message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":500,"byte_end":501,"line_start":17,"line_end":17,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (_b) { +{"message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":481,"byte_end":482,"line_start":17,"line_end":17,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (_b) { --> $DIR/unused_parens_remove_json_suggestion.rs:17:8 | LL | if (_b) { @@ -16,7 +16,7 @@ LL + if _b { | "} -{"message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":631,"byte_end":632,"line_start":28,"line_end":28,"column_start":7,"column_end":8,"is_primary":true,"text":[{"text":" if(c) { +{"message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":612,"byte_end":613,"line_start":28,"line_end":28,"column_start":7,"column_end":8,"is_primary":true,"text":[{"text":" if(c) { --> $DIR/unused_parens_remove_json_suggestion.rs:28:7 | LL | if(c) { @@ -29,7 +29,7 @@ LL + if c { | "} -{"message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":711,"byte_end":712,"line_start":32,"line_end":32,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (c){ +{"message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":692,"byte_end":693,"line_start":32,"line_end":32,"column_start":8,"column_end":9,"is_primary":true,"text":[{"text":" if (c){ --> $DIR/unused_parens_remove_json_suggestion.rs:32:8 | LL | if (c){ @@ -42,7 +42,7 @@ LL + if c { | "} -{"message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":793,"byte_end":794,"line_start":36,"line_end":36,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":807,"byte_end":808,"line_start":36,"line_end":36,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":793,"byte_end":794,"line_start":36,"line_end":36,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":807,"byte_end":808,"line_start":36,"line_end":36,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `while` condition +{"message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":774,"byte_end":775,"line_start":36,"line_end":36,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":788,"byte_end":789,"line_start":36,"line_end":36,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove these parentheses","code":null,"level":"help","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":774,"byte_end":775,"line_start":36,"line_end":36,"column_start":11,"column_end":12,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":11,"highlight_end":12}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null},{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":788,"byte_end":789,"line_start":36,"line_end":36,"column_start":25,"column_end":26,"is_primary":true,"text":[{"text":" while (false && true){","highlight_start":25,"highlight_end":26}],"label":null,"suggested_replacement":" ","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"error: unnecessary parentheses around `while` condition --> $DIR/unused_parens_remove_json_suggestion.rs:36:11 | LL | while (false && true){ @@ -55,7 +55,7 @@ LL + while false && true { | "} -{"message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":821,"byte_end":822,"line_start":37,"line_end":37,"column_start":12,"column_end":13,"is_primary":true,"text":[{"text":" if (c) { +{"message":"unnecessary parentheses around `if` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":802,"byte_end":803,"line_start":37,"line_end":37,"column_start":12,"column_end":13,"is_primary":true,"text":[{"text":" if (c) { --> $DIR/unused_parens_remove_json_suggestion.rs:37:12 | LL | if (c) { @@ -68,7 +68,7 @@ LL + if c { | "} -{"message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":918,"byte_end":919,"line_start":43,"line_end":43,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":" while(true && false) { +{"message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":899,"byte_end":900,"line_start":43,"line_end":43,"column_start":10,"column_end":11,"is_primary":true,"text":[{"text":" while(true && false) { --> $DIR/unused_parens_remove_json_suggestion.rs:43:10 | LL | while(true && false) { @@ -81,7 +81,7 @@ LL + while true && false { | "} -{"message":"unnecessary parentheses around `for` iterator expression","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":987,"byte_end":988,"line_start":44,"line_end":44,"column_start":18,"column_end":19,"is_primary":true,"text":[{"text":" for _ in (0 .. 3){ +{"message":"unnecessary parentheses around `for` iterator expression","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":968,"byte_end":969,"line_start":44,"line_end":44,"column_start":18,"column_end":19,"is_primary":true,"text":[{"text":" for _ in (0 .. 3){ --> $DIR/unused_parens_remove_json_suggestion.rs:44:18 | LL | for _ in (0 .. 3){ @@ -94,7 +94,7 @@ LL + for _ in 0 .. 3 { | "} -{"message":"unnecessary parentheses around `for` iterator expression","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":1088,"byte_end":1089,"line_start":49,"line_end":49,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" for _ in (0 .. 3) { +{"message":"unnecessary parentheses around `for` iterator expression","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":1069,"byte_end":1070,"line_start":49,"line_end":49,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":" for _ in (0 .. 3) { --> $DIR/unused_parens_remove_json_suggestion.rs:49:14 | LL | for _ in (0 .. 3) { @@ -107,7 +107,7 @@ LL + for _ in 0 .. 3 { | "} -{"message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":1147,"byte_end":1148,"line_start":50,"line_end":50,"column_start":15,"column_end":16,"is_primary":true,"text":[{"text":" while (true && false) { +{"message":"unnecessary parentheses around `while` condition","code":{"code":"unused_parens","explanation":null},"level":"error","spans":[{"file_name":"$DIR/unused_parens_remove_json_suggestion.rs","byte_start":1128,"byte_end":1129,"line_start":50,"line_end":50,"column_start":15,"column_end":16,"is_primary":true,"text":[{"text":" while (true && false) { --> $DIR/unused_parens_remove_json_suggestion.rs:50:15 | LL | while (true && false) { diff --git a/src/test/ui/matches2021.rs b/src/test/ui/matches2021.rs index f5497c1d16de6..9143a8cdd59bc 100644 --- a/src/test/ui/matches2021.rs +++ b/src/test/ui/matches2021.rs @@ -1,6 +1,5 @@ // run-pass // edition:2021 -// compile-flags: -Zunstable-options // regression test for https://github.com/rust-lang/rust/pull/85678 diff --git a/src/test/ui/privacy/pub-priv-dep/pub-priv1.rs b/src/test/ui/privacy/pub-priv-dep/pub-priv1.rs index f926eee9d92b2..ec8666f93f096 100644 --- a/src/test/ui/privacy/pub-priv-dep/pub-priv1.rs +++ b/src/test/ui/privacy/pub-priv-dep/pub-priv1.rs @@ -1,5 +1,6 @@ // aux-crate:priv:priv_dep=priv_dep.rs // aux-build:pub_dep.rs +// compile-flags: -Zunstable-options #![deny(exported_private_dependencies)] // This crate is a private dependency diff --git a/src/test/ui/privacy/pub-priv-dep/pub-priv1.stderr b/src/test/ui/privacy/pub-priv-dep/pub-priv1.stderr index e6b4d33f10316..f64b8569015d8 100644 --- a/src/test/ui/privacy/pub-priv-dep/pub-priv1.stderr +++ b/src/test/ui/privacy/pub-priv-dep/pub-priv1.stderr @@ -1,23 +1,23 @@ error: type `OtherType` from private dependency 'priv_dep' in public interface - --> $DIR/pub-priv1.rs:20:5 + --> $DIR/pub-priv1.rs:21:5 | LL | pub field: OtherType, | ^^^^^^^^^^^^^^^^^^^^ | note: the lint level is defined here - --> $DIR/pub-priv1.rs:3:9 + --> $DIR/pub-priv1.rs:4:9 | LL | #![deny(exported_private_dependencies)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: type `OtherType` from private dependency 'priv_dep' in public interface - --> $DIR/pub-priv1.rs:27:5 + --> $DIR/pub-priv1.rs:28:5 | LL | pub fn pub_fn(param: OtherType) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: trait `OtherTrait` from private dependency 'priv_dep' in public interface - --> $DIR/pub-priv1.rs:34:5 + --> $DIR/pub-priv1.rs:35:5 | LL | type Foo: OtherTrait; | ^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/rust-2021/prelude2021.rs b/src/test/ui/rust-2021/prelude2021.rs index 3a9fd69322869..a63b6fcf2627a 100644 --- a/src/test/ui/rust-2021/prelude2021.rs +++ b/src/test/ui/rust-2021/prelude2021.rs @@ -1,6 +1,5 @@ // check-pass // edition:2021 -// compile-flags: -Zunstable-options fn main() { let _: u16 = 123i32.try_into().unwrap(); diff --git a/src/test/ui/rust-2021/reserved-prefixes-migration.fixed b/src/test/ui/rust-2021/reserved-prefixes-migration.fixed index e026f01e93fb0..eed2f313abe6e 100644 --- a/src/test/ui/rust-2021/reserved-prefixes-migration.fixed +++ b/src/test/ui/rust-2021/reserved-prefixes-migration.fixed @@ -1,6 +1,6 @@ // check-pass // run-rustfix -// compile-flags: -Z unstable-options --edition 2018 +// edition:2018 #![warn(rust_2021_prefixes_incompatible_syntax)] diff --git a/src/test/ui/rust-2021/reserved-prefixes-migration.rs b/src/test/ui/rust-2021/reserved-prefixes-migration.rs index d24f29634806d..0565db793df66 100644 --- a/src/test/ui/rust-2021/reserved-prefixes-migration.rs +++ b/src/test/ui/rust-2021/reserved-prefixes-migration.rs @@ -1,6 +1,6 @@ // check-pass // run-rustfix -// compile-flags: -Z unstable-options --edition 2018 +// edition:2018 #![warn(rust_2021_prefixes_incompatible_syntax)] diff --git a/src/test/ui/unused-crate-deps/extern-loc-missing-loc.rs b/src/test/ui/unused-crate-deps/extern-loc-missing-loc.rs index 9339a004d3b74..6ac558974d0c5 100644 --- a/src/test/ui/unused-crate-deps/extern-loc-missing-loc.rs +++ b/src/test/ui/unused-crate-deps/extern-loc-missing-loc.rs @@ -1,7 +1,7 @@ // --extern-location with a raw reference // aux-crate:bar=bar.rs -// compile-flags:--extern-location bar +// compile-flags:--extern-location bar -Zunstable-options #![warn(unused_crate_dependencies)] diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index 98d1ee19f69a1..5fcaa452ca30e 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -242,9 +242,6 @@ impl TestProps { if let Some(edition) = config.parse_edition(ln) { self.compile_flags.push(format!("--edition={}", edition)); has_edition = true; - if edition == "2021" { - self.compile_flags.push("-Zunstable-options".to_string()); - } } config.parse_and_update_revisions(ln, &mut self.revisions); diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 4470272a9f866..3c85b9076dd1a 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -1607,9 +1607,6 @@ impl<'test> TestCx<'test> { get_lib_name(&aux_path.trim_end_matches(".rs").replace('-', "_"), is_dylib); rustc.arg("--extern").arg(format!("{}={}/{}", aux_name, aux_dir.display(), lib_name)); } - if !self.props.aux_crates.is_empty() { - rustc.arg("-Zunstable-options"); - } aux_dir }