-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Remove queries from the driver interface #134302
base: master
Are you sure you want to change the base?
Conversation
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
&'tcx WorkerLocal<rustc_hir::Arena<'tcx>>, | ||
F, | ||
) -> T, | ||
> = Box::new(move |compiler, gcx_cell, arena, hir_arena, f| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is ugly, but the only way I could figure out to get all invariant lifetimes correctly inferred by rustc.
|
||
let res = f(tcx); | ||
// FIXME maybe run finish even when a fatal error occured? or at least tcx.alloc_self_profile_query_strings()? | ||
tcx.finish(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixme is a pre-existing issue.
This comment has been minimized.
This comment has been minimized.
This allows us to call GlobalCtxt::finish exactly once.
a5188c2
to
7738929
Compare
This comment has been minimized.
This comment has been minimized.
19bf2af
to
b0cd37e
Compare
r? jieyouxu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks very reasonable to me as a first-pass review. This is tricky enough that I want a second pair of eyes on it.
Yea I already reviewed all of it but the lifetime stuff. But since at best I'd have some golfing for it, r=me,jieyouzu I can golf once it's landed |
In that case, I say we try to land this first, the lifetimes in passes are a bit annoying but I don't think is worth blocking, as oli said. @bors r=oli-obk,jieyouxu rollup=never (tricky driver changes) |
@bjorn3 if you feel like it, can you double-check the |
I'm going to update the rustc dev guide. |
All uses of driver queries in the public api of rustc_driver have been removed in #134130 already. This removes driver queries from rustc_interface and does a couple of cleanups around TyCtxt construction and entering enabled by this removal.
Finishes the removal of driver queries started with #126834.