Skip to content

Commit

Permalink
Document that pre-expansion lint passes are deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
xFrednet committed Feb 26, 2022
1 parent d5a9bc9 commit 2bf56b9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion compiler/rustc_lint/src/context.rs
Expand Up @@ -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,
Expand Down

0 comments on commit 2bf56b9

Please sign in to comment.