How can a compiler lint pass gain access to conditional-compilation attributes like #[cfg(..)]?

Viewed 110

Rust has a very good lint interface, divided into EarlyLintPass and LateLintPass trait objects. Unfortunately, even the early passes don't see #[cfg] or #[cfg_attr] attributes, and thus cannot lint them. Is there a way to reliably get them while also following lint levels?

0 Answers
Related