Skip to content

Commit a87dc77

Browse files
authored
Rollup merge of rust-lang#94397 - xFrednet:69838-deprecate-pre-expansion, r=cjgillot
Document that pre-expansion lint passes are softly deprecated The pre-expansion lint pass has been softly deprecated since rust-lang#69838. Every once in a while I see someone mention it as a possibility, only get the feedback that it's deprecated. This PR officially documents that the method is soft deprecated to have a single point of truth for it. That's it. Have a great rest of the day 🙃 --- * See [rust#69838](rust-lang#69838) * See [rust-clippy#5518](rust-lang/rust-clippy#5518)
2 parents fdcf90f + 2bf56b9 commit a87dc77

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

compiler/rustc_lint/src/context.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,12 @@ impl LintStore {
166166
self.early_passes.push(Box::new(pass));
167167
}
168168

169-
/// Used by clippy.
169+
/// This lint pass is softly deprecated. It misses expanded code and has caused a few
170+
/// errors in the past. Currently, it is only used in Clippy. New implementations
171+
/// should avoid using this interface, as it might be removed in the future.
172+
///
173+
/// * See [rust#69838](https://github.com/rust-lang/rust/pull/69838)
174+
/// * See [rust-clippy#5518](https://github.com/rust-lang/rust-clippy/pull/5518)
170175
pub fn register_pre_expansion_pass(
171176
&mut self,
172177
pass: impl Fn() -> EarlyLintPassObject + 'static + sync::Send + sync::Sync,

0 commit comments

Comments
 (0)