Skip to content

Commit

Permalink
Add comment for mir_opt_level=0
Browse files Browse the repository at this point in the history
  • Loading branch information
flip1995 committed Nov 23, 2019
1 parent e3a74ed commit 7bae5bd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 7bae5bd

Please sign in to comment.