Skip to content
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

don't do Sized and other return type checks on RPIT's real type #97431

Merged
merged 1 commit into from
May 31, 2022

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented May 26, 2022

Fixes an ICE where we're doing Sized check against the RPIT's real type, instead of against the opaque type. This differs from what we're doing in MIR typeck, which causes ICE #97226.

This regressed in #96516 -- this adjusts that fix to be a bit more conservative. That PR was backported and thus the ICE is also present in stable. Not sure if it's worth to beta and/or stable backport, probably not the latter but I could believe the former.

r? @oli-obk

cc: another attempt to fix this ICE #97413. I believe this PR addresses the root cause.

Fixes #97226

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label May 26, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 26, 2022
@oli-obk
Copy link
Contributor

oli-obk commented May 30, 2022

@bors r+

Yea, that's the only intended effect of my change, thanks!

1 similar comment
@oli-obk
Copy link
Contributor

oli-obk commented May 30, 2022

@bors r+

Yea, that's the only intended effect of my change, thanks!

@bors
Copy link
Contributor

bors commented May 30, 2022

📌 Commit 126ef8e has been approved by oli-obk

1 similar comment
@bors
Copy link
Contributor

bors commented May 30, 2022

📌 Commit 126ef8e has been approved by oli-obk

@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 May 30, 2022
@oli-obk oli-obk added beta-nominated Nominated for backporting to the compiler in the beta channel. labels May 30, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request May 31, 2022
…piler-errors

Rollup of 6 pull requests

Successful merges:

 - rust-lang#89685 (refactor: VecDeques Iter fields to private)
 - rust-lang#97172 (Optimize the diagnostic generation for `extern unsafe`)
 - rust-lang#97395 (Miri call ABI check: ensure type size+align stay the same)
 - rust-lang#97431 (don't do `Sized` and other return type checks on RPIT's real type)
 - rust-lang#97555 (Source code page: line number click adds `NaN`)
 - rust-lang#97558 (Fix typos in comment)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 6718723 into rust-lang:master May 31, 2022
@rustbot rustbot added this to the 1.63.0 milestone May 31, 2022
@apiraino
Copy link
Contributor

apiraino commented Jun 2, 2022

Beta backport approved as per compiler team on Zulip

@rustbot label +beta-accepted

@rustbot rustbot added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Jun 2, 2022
ehuss pushed a commit to ehuss/rust that referenced this pull request Jun 24, 2022
don't do `Sized` and other return type checks on RPIT's real type

Fixes an ICE where we're doing `Sized` check against the RPIT's real type, instead of against the opaque type. This differs from what we're doing in MIR typeck, which causes ICE rust-lang#97226.

This regressed in rust-lang#96516 -- this adjusts that fix to be a bit more conservative. That PR was backported and thus the ICE is also present in stable. Not sure if it's worth to beta and/or stable backport, probably not the latter but I could believe the former.

r? `@oli-obk`

cc: another attempt to fix this ICE rust-lang#97413. I believe this PR addresses the root cause.
@ehuss ehuss mentioned this pull request Jun 24, 2022
@ehuss ehuss modified the milestones: 1.63.0, 1.62.0 Jun 24, 2022
@ehuss ehuss removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jun 24, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 24, 2022
[beta] Beta backports

* Remove the unused-#[doc(hidden)] logic from the unused_attributes lint rust-lang#98336
* debuginfo: Fix NatVis for Rc and Arc with unsized pointees. rust-lang#98137
* Revert "remove num_cpus dependency" in rustc and update cargo rust-lang#97911
* Update LLVM submodule rust-lang#97690
* Revert rust-lang#96682. rust-lang#97636
* don't do Sized and other return type checks on RPIT's real type rust-lang#97431
* Temporarily disable submodule archive downloads. rust-lang#98423
@compiler-errors compiler-errors deleted the issue-97413 branch August 11, 2023 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. 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.

ICE using impl ?Sized in return position
7 participants