Can clippy-driver be always used as replacement of rustc? · Issue #8035 · rust-lang/rust-clippy (original) (raw)

When invoking Clippy (via Cargo or clippy-driver), we get the usual rustc outputs + the extra lints. However, is it guaranteed that clippy-driver will work as if rustc was called?

That is, can we rely on the generated objects to be the same as the ones that rustc would have generated (modulo unrelated non-deterministic build issues) or they should always be built without clippy-driver if they are intended for "production"?

A potential use case would be to always use clippy-driver instead of rustc in a build system, thus always having Clippy lints enabled (as long as one is OK paying the performance penalty).

(Followup to #6782.)

@rustbot label +C-question