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 #1331

Open
bjorn3 opened this issue Oct 31, 2024 · 1 comment
Open

Please avoid the after_crate_root_parsing driver callback #1331

bjorn3 opened this issue Oct 31, 2024 · 1 comment

Comments

@bjorn3
Copy link
Contributor

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.

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

@utaal
Copy link
Collaborator

utaal commented Nov 1, 2024

Thank you @bjorn3 for the heads up, we'll try and move away from it soon.

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

2 participants