diff options
| author | xFrednet <xFrednet@gmail.com> | 2022-02-26 11:32:07 +0100 |
|---|---|---|
| committer | xFrednet <xFrednet@gmail.com> | 2022-02-26 11:36:31 +0100 |
| commit | 2bf56b9aa7f92f665c40ddbe8259417de84bb142 (patch) | |
| tree | b8b63c7360c28f01822595aacdedb573c8eeac90 /compiler | |
| parent | d5a9bc947617babe3833458f3e09f3d6d5e3d736 (diff) | |
| download | rust-2bf56b9aa7f92f665c40ddbe8259417de84bb142.tar.gz rust-2bf56b9aa7f92f665c40ddbe8259417de84bb142.zip | |
Document that pre-expansion lint passes are deprecated
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_lint/src/context.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/context.rs b/compiler/rustc_lint/src/context.rs index 0582a4e01bf..ad9a16fb39a 100644 --- a/compiler/rustc_lint/src/context.rs +++ b/compiler/rustc_lint/src/context.rs @@ -166,7 +166,12 @@ impl LintStore { self.early_passes.push(Box::new(pass)); } - /// Used by clippy. + /// This lint pass is softly deprecated. It misses expanded code and has caused a few + /// errors in the past. Currently, it is only used in Clippy. New implementations + /// should avoid using this interface, as it might be removed in the future. + /// + /// * See [rust#69838](https://github.com/rust-lang/rust/pull/69838) + /// * See [rust-clippy#5518](https://github.com/rust-lang/rust-clippy/pull/5518) pub fn register_pre_expansion_pass( &mut self, pass: impl Fn() -> EarlyLintPassObject + 'static + sync::Send + sync::Sync, |
