Replace most Ty::new_fn_def calls with type_of queries directly - #159665
Replace most Ty::new_fn_def calls with type_of queries directly#159665addiesh wants to merge 1 commit into
Ty::new_fn_def calls with type_of queries directly#159665Conversation
|
Thanks for the pull request, and welcome! The Rust Project is excited to review your changes, and you should hear from @oli-obk (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
|
i wish github supported funnier reactions for PRs so I could 😭 when CI fails |
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Replace most `Ty::new_fn_def` calls with `type_of` queries directly
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (221275a): comparison URL. Overall result: no relevant changes - no action neededBenchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up. @rustbot label: -S-waiting-on-perf -perf-regression Instruction countThis perf run didn't have relevant results for this metric. Max RSS (memory usage)Results (primary 1.7%, secondary -0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesThis perf run didn't have relevant results for this metric. Binary sizeResults (primary 0.0%, secondary 0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 487.415s -> 487.919s (0.10%) |
|
HIR ty lowering was modified cc @fmease Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred in match lowering cc @Nadrieril |
|
Reminder, once the PR becomes ready for a review, use |
7851107 to
9c91d27
Compare
|
@rustbot ready |
This comment has been minimized.
This comment has been minimized.
9c91d27 to
cee59e3
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This is so we can reduce the amount of code and changes in #159403. It should stand on its own, but really it's meant as an extended part of 159403.
This allows getting the right
ty::FnDefeven cross-crate, as thetype_ofquery results are stored in metadata, in contrast to the queries for computing the binder for various declarations. These binders are already cached viafn_sig, but using that is somewhat overkill and can cause cycle errors in some cases.