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

Do not allow typeck children items to constrain outer RPITs #99345

Merged
merged 2 commits into from
Jul 20, 2022

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Jul 16, 2022

Fixes #99073 in a simpler and more conservative way than #99079. Simply raise a mismatched types error if we try to constrain an RPIT in an item that isn't the RPIT's parent.

r? @oli-obk

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

oli-obk commented Jul 18, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Jul 18, 2022

📌 Commit 273b977 has been approved by oli-obk

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-review Status: Awaiting review from the assignee but also interested parties. labels Jul 18, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Jul 18, 2022
…r=oli-obk

Do not allow typeck children items to constrain outer RPITs

Fixes rust-lang#99073 in a simpler and more conservative way than rust-lang#99079. Simply raise a mismatched types error if we try to constrain an RPIT in an item that isn't the RPIT's parent.

r? `@oli-obk`
@bors
Copy link
Contributor

bors commented Jul 19, 2022

☔ The latest upstream changes (presumably #99451) made this pull request unmergeable. Please resolve the merge conflicts.

@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 Jul 19, 2022
@compiler-errors
Copy link
Member Author

@bors r=oli-obk

@bors
Copy link
Contributor

bors commented Jul 19, 2022

📌 Commit 5a4601f has been approved by oli-obk

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 Jul 19, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 20, 2022
Rollup of 7 pull requests

Successful merges:

 - rust-lang#98101 (stdlib support for Apple WatchOS)
 - rust-lang#99345 (Do not allow typeck children items to constrain outer RPITs)
 - rust-lang#99383 (Formalize defining_use_anchor)
 - rust-lang#99436 (Add flag to configure `noalias` on `Box<T>`)
 - rust-lang#99483 (Fix a numerical underflow in tuple wrap suggestion)
 - rust-lang#99485 (Stop injecting `#[allow(unused_qualifications)]` in generated `derive` implementations)
 - rust-lang#99486 (Refactor: remove a string comparison between types in `check_str_addition`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3c3c5da into rust-lang:master Jul 20, 2022
@rustbot rustbot added this to the 1.64.0 milestone Jul 20, 2022
@RalfJung
Copy link
Member

I think this is at least partially responsible for an ICE in Miri -- a regression that started showing up when #99506 landed. See rust-lang/miri#2433.

@compiler-errors
Copy link
Member Author

compiler-errors commented Aug 23, 2022

@RalfJung how exactly are you testing this? Master + reverting a PR? Or bisecting nightly builds? Because the code I added in this PR I later reverted in #99079.

#99079 (or this PR, for that matter) itself should not cause any change in normalization behavior, since all it does is cause an extra error to be raised in some cases. Though I guess you could try reverting #99079 on master and see if it causes the ICE to go away. Feel free to ping me on zulip if you'd like to dig deeper together.

@RalfJung
Copy link
Member

(Continuing the discussion in rust-lang/miri#2433)

@compiler-errors compiler-errors deleted the issue-99073-redux 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
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 with probably recursive opaque types and closures
6 participants