Implment #[cfg] and #[cfg_attr] in where clauses

This commit is contained in:
Frank King
2025-02-05 18:58:29 +08:00
parent 30508faeb3
commit 42f51d4fd4
38 changed files with 3296 additions and 88 deletions

View File

@@ -1529,6 +1529,14 @@ impl<'a, 'ra, 'tcx> Visitor<'a> for BuildReducedGraphVisitor<'a, 'ra, 'tcx> {
visit::walk_variant(self, variant);
}
fn visit_where_predicate(&mut self, p: &'a ast::WherePredicate) {
if p.is_placeholder {
self.visit_invoc(p.id);
} else {
visit::walk_where_predicate(self, p);
}
}
fn visit_crate(&mut self, krate: &'a ast::Crate) {
if krate.is_placeholder {
self.visit_invoc_in_module(krate.id);