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

Please avoid the after_crate_root_parsing driver callback #99

Closed
bjorn3 opened this issue Oct 31, 2024 · 0 comments
Closed

Please avoid the after_crate_root_parsing driver callback #99

bjorn3 opened this issue Oct 31, 2024 · 0 comments

Comments

@bjorn3
Copy link

bjorn3 commented Oct 31, 2024

You are calling queries.global_ctxt() from within it, which makes rustc_driver skip some code that should run before you access the TyCtxt. I would like to either remove this function in the future or change it to only allow access to the AST and not to the TyCtxt. Using the after_analysis or (if you need to avoid tcx.analysis()) the after_expansion callbacks should work better.

Edit: rust-lang/rust#132410 will mark it as deprecated.

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