]> git.proxmox.com Git - cargo.git/commitdiff
fix: mark clippy-preview unstable, remove cruft
authorJane Lusby <jlusby42@gmail.com>
Mon, 18 Mar 2019 20:51:29 +0000 (13:51 -0700)
committerJane Lusby <jlusby42@gmail.com>
Sat, 30 Mar 2019 00:39:40 +0000 (17:39 -0700)
src/bin/cargo/commands/clippy.rs
src/cargo/util/config.rs

index bb8fe553b78e00e1a9170c7105c95e506ae1a7fa..5fe703a7143e19bfa943587b871501a0593e3373 100644 (file)
@@ -80,9 +80,17 @@ pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult {
             return Err(CliError::new(err, 101));
         }
     };
+
     let mode = CompileMode::Check { test };
     let compile_opts = args.compile_options(config, mode, Some(&ws))?;
 
+    if !config.cli_unstable().unstable_options {
+        return Err(failure::format_err!(
+            "`clippy-preview` is unstable, pass `-Z unstable-options` to enable it"
+        )
+        .into());
+    }
+
     ops::compile(&ws, &compile_opts)?;
     Ok(())
 }
index 492fc9f1058c8868ab7f0af0a9dd3c186288b4be..c25c7eac892fc51c2eb37a47dc16aca506235a58 100644 (file)
@@ -416,7 +416,6 @@ impl Config {
         match self.get_env(key)? {
             Some(v) => Ok(Some(v)),
             None => {
-                // println!("{:#?}", self);
                 let config_key = key.to_config();
                 let o_cv = self.get_cv(&config_key)?;
                 match o_cv {