Skip to content

Conversation

bend-n
Copy link
Contributor

@bend-n bend-n commented Apr 25, 2025

removes expect() from #136083 and fixes #140277
includes regression test

r? lcnr

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 25, 2025
@rustbot
Copy link
Collaborator

rustbot commented Apr 25, 2025

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a regression test, both to check that this fix indeed fixes the reported regression, and to make sure it doesn't regress in the future.

@oli-obk oli-obk added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 25, 2025
@jieyouxu
Copy link
Member

jieyouxu commented Apr 25, 2025

#140277 has -Z remap-path-scope=all --remap-path-prefix + involvement of the zerocopy macro, that's probably necessary for any smaller reproducer from that report

EDIT: a reproducer #140277 (comment), but try to trim it down further for the regression test.

@jieyouxu jieyouxu added the L-unnecessary_transmutes Lint: unnecessary_transmutes label Apr 25, 2025
@jieyouxu
Copy link
Member

r? jieyouxu

@rustbot rustbot assigned jieyouxu and unassigned lcnr Apr 25, 2025
@bend-n bend-n force-pushed the fix-expectation-unmet branch from a612173 to 29d3e49 Compare April 25, 2025 10:48
@bend-n
Copy link
Contributor Author

bend-n commented Apr 25, 2025

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 25, 2025
@rust-log-analyzer

This comment has been minimized.

@bend-n bend-n force-pushed the fix-expectation-unmet branch from 29d3e49 to b9a5c59 Compare April 25, 2025 11:07
@rust-log-analyzer

This comment has been minimized.

@jieyouxu
Copy link
Member

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 25, 2025
@rustbot
Copy link
Collaborator

rustbot commented Apr 25, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@bend-n bend-n force-pushed the fix-expectation-unmet branch from b9a5c59 to 5b55942 Compare April 25, 2025 12:05
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@jieyouxu
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Apr 25, 2025

📌 Commit 5b55942 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 25, 2025
@bend-n bend-n force-pushed the fix-expectation-unmet branch from 5b55942 to d3a4ebc Compare April 25, 2025 12:07
@jieyouxu
Copy link
Member

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 25, 2025
@jieyouxu
Copy link
Member

r=me after PR CI is green

@bors delegate+ rollup

@bors
Copy link
Collaborator

bors commented Apr 25, 2025

✌️ @bend-n, you can now approve this pull request!

If @jieyouxu told you to "r=me" after making some further change, please make that change, then do @bors r=@jieyouxu

@bend-n
Copy link
Contributor Author

bend-n commented Apr 25, 2025

@rustbot ready
@bors r=@jieyouxu

@bors
Copy link
Collaborator

bors commented Apr 25, 2025

📌 Commit d3a4ebc has been approved by jieyouxu

It is now in the queue for this repository.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 25, 2025
@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 25, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 25, 2025
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#137683 (Add a tidy check for GCC submodule version)
 - rust-lang#138968 (Update the index of Result to make the summary more comprehensive)
 - rust-lang#139572 (docs(std): mention const blocks in const keyword doc page)
 - rust-lang#140152 (Unify the format of rustc cli flags)
 - rust-lang#140193 (fix ICE in `#[naked]` attribute validation)
 - rust-lang#140205 (Tidying up UI tests [2/N])
 - rust-lang#140284 (remove expect() in `unnecessary_transmutes`)
 - rust-lang#140290 (rustdoc: fix typo change from equivelent to equivalent)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 4323939 into rust-lang:master Apr 25, 2025
6 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 25, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 25, 2025
Rollup merge of rust-lang#140284 - bend-n:fix-expectation-unmet, r=jieyouxu

remove expect() in `unnecessary_transmutes`

removes expect() from rust-lang#136083 and fixes rust-lang#140277
includes regression test

r? lcnr
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request May 9, 2025
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#137683 (Add a tidy check for GCC submodule version)
 - rust-lang#138968 (Update the index of Result to make the summary more comprehensive)
 - rust-lang#139572 (docs(std): mention const blocks in const keyword doc page)
 - rust-lang#140152 (Unify the format of rustc cli flags)
 - rust-lang#140193 (fix ICE in `#[naked]` attribute validation)
 - rust-lang#140205 (Tidying up UI tests [2/N])
 - rust-lang#140284 (remove expect() in `unnecessary_transmutes`)
 - rust-lang#140290 (rustdoc: fix typo change from equivelent to equivalent)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L-unnecessary_transmutes Lint: unnecessary_transmutes S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Path remapping ICE from unnecessary_transmutes suggestion
7 participants