title: How can a compiler lint pass gain access to conditional-compilation attributes like #[cfg(..)]?
body: <p>Rust has a very good lint interface, divided into <code>EarlyLintPass</code> and <code>LateLintPass</code> trait objects. Unfortunately, even the early passes don't see <code>#[cfg]</code> or <code>#[cfg_attr]</code> attributes, and thus cannot lint them. Is there a way to reliably get them while also following lint levels?</p>