Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Makebody_owned_by return theBody instead of just theBodyId#125711

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
bors merged 2 commits intorust-lang:masterfromoli-obk:const_block_ice2
May 30, 2024

Conversation

@oli-obk
Copy link
Contributor

fixes#125677

Almost allbody_owned_by callers immediately calledbody, too, so just returnBody directly.

This makes the inline-const query feeding more robust, as all calls tobody_owned_by will now yield a body for inline consts, too.

I have not yet figured out a good way to maketcx.hir().body() return an inline-const body, but that can be done as a follow-up

Almost all callers want this anyway, and now we can use it to also return fed bodies
@rustbot
Copy link
Collaborator

r?@Nadrieril

rustbot has assigned@Nadrieril.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

User? to explicitly pick a reviewer

@rustbotrustbot added A-rustdoc-jsonArea: Rustdoc JSON backend S-waiting-on-reviewStatus: Awaiting review from the assignee but also interested parties. T-compilerRelevant to the compiler team, which will review and decide on the PR/issue. T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue. labelsMay 29, 2024
@rustbot
Copy link
Collaborator

Some changes occurred in need_type_info.rs

cc@lcnr

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Some changes occurred in src/librustdoc/clean/types.rs

cc@camelid

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@Nadrieril
Copy link
Member

LGTM

@bors r+

@bors
Copy link
Collaborator

📌 Commita34c26e has been approved byNadrieril

It is now in thequeue for this repository.

@borsbors added S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-reviewStatus: Awaiting review from the assignee but also interested parties. labelsMay 29, 2024
fmease added a commit to fmease/rust that referenced this pull requestMay 30, 2024
Make `body_owned_by` return the `Body` instead of just the `BodyId`fixesrust-lang#125677Almost 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
@fmeasefmease mentioned this pull requestMay 30, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull requestMay 30, 2024
Rollup of 6 pull requestsSuccessful 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
bors added a commit to rust-lang-ci/rust that referenced this pull requestMay 30, 2024
Rollup of 6 pull requestsSuccessful 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
@bors
Copy link
Collaborator

⌛ Testing commita34c26e with merged43930d...

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull requestMay 30, 2024
Make `body_owned_by` return the `Body` instead of just the `BodyId`fixesrust-lang#125677Almost 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
@bors
Copy link
Collaborator

☀️ Test successful -checks-actions
Approved by: Nadrieril
Pushingd43930d to master...

@borsbors added the merged-by-borsThis PR was explicitly merged by bors. labelMay 30, 2024
@borsbors merged commitd43930d intorust-lang:masterMay 30, 2024
@rustbotrustbot added this to the1.80.0 milestoneMay 30, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull requestMay 30, 2024
…iaskrgrRollup of 7 pull requestsSuccessful 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
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (d43930d):comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This 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.

meanrangecount
Regressions ❌
(primary)
2.3%[2.3%, 2.3%]1
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
-2.0%[-2.0%, -2.0%]1
Improvements ✅
(secondary)
--0
All ❌✅ (primary)0.2%[-2.0%, 2.3%]2

Cycles

Results (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.

meanrangecount
Regressions ❌
(primary)
2.2%[2.2%, 2.2%]1
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)2.2%[2.2%, 2.2%]1

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 667.227s -> 665.728s (-0.22%)
Artifact size: 318.88 MiB -> 318.83 MiB (-0.02%)

flip1995 pushed a commit to flip1995/rust that referenced this pull requestJun 13, 2024
Make `body_owned_by` return the `Body` instead of just the `BodyId`fixesrust-lang#125677Almost 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
flip1995 pushed a commit to flip1995/rust that referenced this pull requestJun 13, 2024
Make `body_owned_by` return the `Body` instead of just the `BodyId`fixesrust-lang#125677Almost 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
flip1995 pushed a commit to flip1995/rust that referenced this pull requestJun 13, 2024
…iaskrgrRollup of 7 pull requestsSuccessful 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
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

@NadrierilNadrieril

Labels

A-rustdoc-jsonArea: Rustdoc JSON backendmerged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Milestone

1.80.0

Development

Successfully merging this pull request may close these issues.

ICE: const: body_owned_by exprconst .. has no associated body

5 participants

@oli-obk@rustbot@Nadrieril@bors@rust-timer

[8]ページ先頭

©2009-2025 Movatter.jp