]> git.lizzy.rs Git - rust.git/commitdiff
Request "-Z unstable-options" for unstable options
authorJubilee <46493976+workingjubilee@users.noreply.github.com>
Tue, 24 Mar 2020 05:54:06 +0000 (22:54 -0700)
committerGitHub <noreply@github.com>
Tue, 24 Mar 2020 05:54:06 +0000 (22:54 -0700)
Explicitly requests the "-Z unstable-options" flag if someone attempts to use
a cargo option gated by it. This enhances discoverability, particularly in the
instance where the user is on the nightly compiler but isn't using the flag.

src/libtest/cli.rs

index 5317063b80d11fec1a7973fe3ebff215d9366e42..aac454c023c8073dc5651cd952c281a1e8ae9192 100644 (file)
@@ -213,7 +213,7 @@ macro_rules! unstable_optflag {
         let opt = $matches.opt_present($option_name);
         if !$allow_unstable && opt {
             return Err(format!(
-                "The \"{}\" flag is only accepted on the nightly compiler",
+                "The \"{}\" flag is only accepted on the nightly compiler with -Z unstable-options",
                 $option_name
             ));
         }