From 4051b0cb571a82eb91d4664a24c8c5028aea8f32 Mon Sep 17 00:00:00 2001 From: Jane Lusby Date: Mon, 18 Mar 2019 13:51:29 -0700 Subject: [PATCH] fix: mark clippy-preview unstable, remove cruft --- src/bin/cargo/commands/clippy.rs | 8 ++++++++ src/cargo/util/config.rs | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/bin/cargo/commands/clippy.rs b/src/bin/cargo/commands/clippy.rs index bb8fe553b..5fe703a71 100644 --- a/src/bin/cargo/commands/clippy.rs +++ b/src/bin/cargo/commands/clippy.rs @@ -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(()) } diff --git a/src/cargo/util/config.rs b/src/cargo/util/config.rs index 492fc9f10..c25c7eac8 100644 --- a/src/cargo/util/config.rs +++ b/src/cargo/util/config.rs @@ -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 { -- 2.39.5