]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_lint/src/context.rs
Document that pre-expansion lint passes are deprecated
[rust.git] / compiler / rustc_lint / src / context.rs
index 0582a4e01bfeb5b7e87ddffb72b9d87a9d718368..ad9a16fb39ae2d5fe3641ec255058e816c96a6e3 100644 (file)
@@ -166,7 +166,12 @@ pub fn register_early_pass(
         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,