-
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
Make body_owned_by
return the Body
instead of just the BodyId
#125711
Conversation
Almost all callers want this anyway, and now we can use it to also return fed bodies
r? @Nadrieril rustbot has assigned @Nadrieril. Use |
LGTM @bors r+ |
Make `body_owned_by` return the `Body` instead of just the `BodyId` fixes rust-lang#125677 Almost all `body_owned_by` callers immediately called `body`, too, so just return `Body` directly. This makes the inline-const query feeding more robust, as all calls to `body_owned_by` will now yield a body for inline consts, too. I have not yet figured out a good way to make `tcx.hir().body()` return an inline-const body, but that can be done as a follow-up
Rollup of 6 pull requests Successful merges: - rust-lang#124636 (Make `std::env::{set_var, remove_var}` unsafe in edition 2024) - rust-lang#125342 (Document platform-specifics for `Read` and `Write` of `File`) - rust-lang#125671 (Do not equate `Const`'s ty in `super_combine_const`) - rust-lang#125711 (Make `body_owned_by` return the `Body` instead of just the `BodyId`) - rust-lang#125745 (Bump the stage0 compiler to beta.7 (2024-05-26)) - rust-lang#125753 (compiletest: Unify `cmd2procres` with `run_command_to_procres`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 6 pull requests Successful merges: - rust-lang#124636 (Make `std::env::{set_var, remove_var}` unsafe in edition 2024) - rust-lang#125342 (Document platform-specifics for `Read` and `Write` of `File`) - rust-lang#125671 (Do not equate `Const`'s ty in `super_combine_const`) - rust-lang#125711 (Make `body_owned_by` return the `Body` instead of just the `BodyId`) - rust-lang#125745 (Bump the stage0 compiler to beta.7 (2024-05-26)) - rust-lang#125753 (compiletest: Unify `cmd2procres` with `run_command_to_procres`) r? `@ghost` `@rustbot` modify labels: rollup
Make `body_owned_by` return the `Body` instead of just the `BodyId` fixes rust-lang#125677 Almost all `body_owned_by` callers immediately called `body`, too, so just return `Body` directly. This makes the inline-const query feeding more robust, as all calls to `body_owned_by` will now yield a body for inline consts, too. I have not yet figured out a good way to make `tcx.hir().body()` return an inline-const body, but that can be done as a follow-up
☀️ Test successful - checks-actions |
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#125342 (Document platform-specifics for `Read` and `Write` of `File`) - rust-lang#125711 (Make `body_owned_by` return the `Body` instead of just the `BodyId`) - rust-lang#125739 (drop_in_place: weaken the claim of equivalence with drop(ptr.read())) - rust-lang#125745 (Bump the stage0 compiler to beta.7 (2024-05-26)) - rust-lang#125746 (Fix copy-paste error in `Duration::from_weeks` panic message.) - rust-lang#125753 (compiletest: Unify `cmd2procres` with `run_command_to_procres`) - rust-lang#125754 (coverage: Rename MC/DC `conditions_num` to `num_conditions`) r? `@ghost` `@rustbot` modify labels: rollup
Finished benchmarking commit (d43930d): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary 0.2%)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.2%)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: 667.227s -> 665.728s (-0.22%) |
Make `body_owned_by` return the `Body` instead of just the `BodyId` fixes rust-lang#125677 Almost all `body_owned_by` callers immediately called `body`, too, so just return `Body` directly. This makes the inline-const query feeding more robust, as all calls to `body_owned_by` will now yield a body for inline consts, too. I have not yet figured out a good way to make `tcx.hir().body()` return an inline-const body, but that can be done as a follow-up
Make `body_owned_by` return the `Body` instead of just the `BodyId` fixes rust-lang#125677 Almost all `body_owned_by` callers immediately called `body`, too, so just return `Body` directly. This makes the inline-const query feeding more robust, as all calls to `body_owned_by` will now yield a body for inline consts, too. I have not yet figured out a good way to make `tcx.hir().body()` return an inline-const body, but that can be done as a follow-up
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#125342 (Document platform-specifics for `Read` and `Write` of `File`) - rust-lang#125711 (Make `body_owned_by` return the `Body` instead of just the `BodyId`) - rust-lang#125739 (drop_in_place: weaken the claim of equivalence with drop(ptr.read())) - rust-lang#125745 (Bump the stage0 compiler to beta.7 (2024-05-26)) - rust-lang#125746 (Fix copy-paste error in `Duration::from_weeks` panic message.) - rust-lang#125753 (compiletest: Unify `cmd2procres` with `run_command_to_procres`) - rust-lang#125754 (coverage: Rename MC/DC `conditions_num` to `num_conditions`) r? `@ghost` `@rustbot` modify labels: rollup
fixes #125677
Almost all
body_owned_by
callers immediately calledbody
, too, so just returnBody
directly.This makes the inline-const query feeding more robust, as all calls to
body_owned_by
will now yield a body for inline consts, too.I have not yet figured out a good way to make
tcx.hir().body()
return an inline-const body, but that can be done as a follow-up