1
Fork 0

Refactor where predicates, and reserve for attributes support

This commit is contained in:
Frank King 2024-11-25 16:38:35 +08:00
parent 67a8c64259
commit 161221da9e
44 changed files with 394 additions and 408 deletions

View file

@ -360,11 +360,10 @@ impl<'v> hir_visit::Visitor<'v> for StatCollector<'v> {
}
fn visit_where_predicate(&mut self, p: &'v hir::WherePredicate<'v>) {
record_variants!((self, p, p, None, hir, WherePredicate, WherePredicate), [
BoundPredicate,
RegionPredicate,
EqPredicate
]);
record_variants!(
(self, p, p.kind, Some(p.hir_id), hir, WherePredicate, WherePredicateKind),
[BoundPredicate, RegionPredicate, EqPredicate]
);
hir_visit::walk_where_predicate(self, p)
}
@ -611,7 +610,7 @@ impl<'v> ast_visit::Visitor<'v> for StatCollector<'v> {
}
fn visit_where_predicate(&mut self, p: &'v ast::WherePredicate) {
record_variants!((self, p, p, None, ast, WherePredicate, WherePredicate), [
record_variants!((self, p, &p.kind, None, ast, WherePredicate, WherePredicateKind), [
BoundPredicate,
RegionPredicate,
EqPredicate