Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework rust visitor infrastructure #489

Open
Nadrieril opened this issue Dec 10, 2024 · 0 comments
Open

Rework rust visitor infrastructure #489

Nadrieril opened this issue Dec 10, 2024 · 0 comments
Assignees

Comments

@Nadrieril
Copy link
Member

Nadrieril commented Dec 10, 2024

Right now we're using the derive_visitor crate for our visitors. This has a few limitations I've been running into lately:

  • No support for generics: finding all the uses of RegionBinder to track binding levels is error-prone;
  • No support for composing visitors: I'd like an easy way to make a visitor wrapper that adds binding level information to another visitor, or span information;
  • No control over visits: to avoid traversing all Tys always I use the visit_inside_ty hack today; this is regularly annoying. Moreover in some cases I'd like to stop recursing into a specific variant or similar control.

I'm in the process of thinking through how to solve these problems without having to implement visitors manually for each of our types.

@Nadrieril Nadrieril self-assigned this Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant