We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
-Z unstable-options
1 parent c574ded commit 3d9d0e9Copy full SHA for 3d9d0e9
compiler/rustc_session/src/config.rs
@@ -1308,12 +1308,11 @@ fn parse_crate_edition(matches: &getopts::Matches) -> Edition {
1308
None => DEFAULT_EDITION,
1309
};
1310
1311
- if !edition.is_stable() && !nightly_options::match_is_nightly_build(matches) {
+ if !edition.is_stable() && !nightly_options::is_unstable_enabled(matches) {
1312
early_error(
1313
ErrorOutputType::default(),
1314
&format!(
1315
- "edition {} is unstable and only \
1316
- available for nightly builds of rustc.",
+ "edition {} is unstable and only available with -Z unstable-options.",
1317
edition,
1318
),
1319
)
src/test/ui/hello2021.rs
@@ -1,5 +1,6 @@
1
// run-pass
2
// edition:2021
3
+// compile-flags: -Zunstable-options
4
5
fn main() {
6
println!("hello, 2021");
0 commit comments