From 7bae5bd828e98af9d245b77118c075a7f1a036b9 Mon Sep 17 00:00:00 2001 From: flip1995 Date: Sat, 23 Nov 2019 01:26:19 +0100 Subject: [PATCH] Add comment for mir_opt_level=0 --- src/driver.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/driver.rs b/src/driver.rs index bd19127b3ce8..2a4448cc0ec4 100644 --- a/src/driver.rs +++ b/src/driver.rs @@ -76,6 +76,10 @@ impl rustc_driver::Callbacks for ClippyCallbacks { clippy_lints::register_renamed(&mut lint_store); })); + // FIXME: #4825; This is required, because Clippy lints that are based on MIR have to be + // run on the unoptimized MIR. On the other hand this results in some false negatives. If + // MIR passes can be enabled / disabled separately, we should figure out, what passes to + // use for Clippy. config.opts.debugging_opts.mir_opt_level = 0; } }