3

Don't ICE when encountering bound regions in generator interior type by compiler...

 4 weeks ago
source link: https://github.com/rust-lang/rust/pull/122358
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Conversation

I'm pretty sure this meant to say "has_free_regions", probably just a typo in 4a4fc3b. We can have bound regions (because we only convert non-bound regions into existential regions in generator interiors), but we can't have (non-ReErased) free regions.

r? lcnr

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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative

labels

Mar 12, 2024

Collaborator

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

Contributor

maybe change it to !ty.has_free_regions() && !ty.has_escaping_bound_vars()

We can have bound regions (because we only convert non-bound regions into existential regions in generator interiors), but we can't have (non-ReErased) free regions.

given the fact that nested bound regions clearly must exist, it did take me a few minutes to actually understand what this meant here. Though, given that we ICE when tcx.fold_regions encounters a non-erased region, do we even need the debug_assert in the first place?

Member

Author

Yeah that debug assertion does nothing then.

Collaborator

Some changes occurred in src/tools/cargo

cc @ehuss

Contributor

@bors r+ rollup

Contributor

📌 Commit a85dbfb has been approved by lcnr

It is now in the queue for this repository.

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

Mar 14, 2024

This comment has been minimized.

Member

Author

lol I pushed at the same time as the r+

@bors -

Member

Author

@bors r-

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

Mar 14, 2024

compiler-errors

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

Mar 14, 2024

Contributor

@lcnr lcnr

left a comment

edited

please add a "FIXME: use bound_coroutine_hidden_types instead and work towards removing this to coroutine_hidden_types". r=me after

Contributor

@bors r+ rollup

Contributor

📌 Commit bca708b has been approved by lcnr

It is now in the queue for this repository.

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

Mar 21, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

lcnr

lcnr left review comments
Assignees

lcnr

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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative
Projects

None yet

Milestone

1.79.0

Development

Successfully merging this pull request may close these issues.

None yet

5 participants

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK