-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Rollup of 5 pull requests #133551
Rollup of 5 pull requests #133551
Conversation
This allows simplifying the call site and make_input by using a single match instead of two levels of if's.
This allows re-entrant entering of the GlobalCtxt
We now only exit the GlobalCtxt when calling a callback and all the way at the end when the GlobalCtxt is about to be destroyed.
There is no other query that may need to be called at that point anyway.
Several custom drivers are incorrectly calling queries.global_ctxt() from inside of it, which causes some driver code to be skipped. As such I would like to either remove it in the future or if custom drivers still need it, change it to accept an &rustc_ast::Crate instead.
A used function with no mappings has historically indicated a bug, but that will no longer be the case after moving some fallible span-processing steps into codegen.
This will avoid confusion with actual `Span` spans.
…t are not WF It's okay though b/c these are duplicated diagnostics.
…_round, r=cjgillot Some more refactorings towards removing driver queries Follow up to rust-lang#127184 ## Custom driver breaking change The `after_analysis` callback is changed to accept `TyCtxt` instead of `Queries`. The only safe query in `Queries` to call at this point is `global_ctxt()` which allows you to enter the `TyCtxt` either way. To fix your custom driver, replace the `queries: &'tcx Queries<'tcx>` argument with `tcx: TyCtxt<'tcx>` and remove your `queries.global_ctxt().unwrap().enter(|tcx| { ... })` call and only keep the contents of the closure. ## Custom driver deprecation The `after_crate_root_parsing` callback is now deprecated. Several custom drivers are incorrectly calling `queries.global_ctxt()` from inside of it, which causes some driver code to be skipped. As such I would like to either remove it in the future or if custom drivers still need it, change it to accept an `&rustc_ast::Crate` instead.
coverage: Store coverage source regions as `Span` until codegen Historically, coverage spans were converted into line/column coordinates during the MIR instrumentation pass. This PR moves that conversion step into codegen, so that coverage spans spend most of their time stored as `Span` instead. In addition to being conceptually nicer, this also reduces the size of coverage mappings in MIR, because `Span` is smaller than 4x u32. --- There should be no changes to coverage output.
…=joboet Add missing code examples on `LocalKey` r? ``@Amanieu``
…ve-never, r=lcnr Structurally resolve before checking `!` in HIR typeck Some more missing structural resolves in HIR typeck :> r? lcnr
…ve-cat-proj, r=lcnr Structurally resolve before matching on type of projection Another missing structural resolve in closure upvar analysis. I think it's better to place the normalization here rather than trying to guarantee that all types returned by the expr use visitor are structurally normalized, which I don't think we do now. Thoughts? r? lcnr
@bors r+ rollup=never p=5 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: 66adeaf46b In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (eddb717): comparison URL. Overall result: ❌ regressions - please read the text belowOur benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary -0.3%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (primary -2.0%, secondary 2.1%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 794.328s -> 795.273s (0.12%) |
The regression seems to be caused by #133518. |
Successful merges:
Span
until codegen #133418 (coverage: Store coverage source regions asSpan
until codegen)LocalKey
#133498 (Add missing code examples onLocalKey
)!
in HIR typeck #133518 (Structurally resolve before checking!
in HIR typeck)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup