Skip to content

Record coroutine kind in coroutine generics #120746

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Feb 7, 2024

Oops, added a new substitution (the "kind" ty) to coroutines but forgot to record it in the generics_of. I'm surprised I left this out of the coroutine-closure PR -- I thought I made this change; I possibly rebased it out by accident.

Fixes #120732

r? oli-obk

@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 Feb 7, 2024
@compiler-errors compiler-errors changed the title Record coroutine kind in generics Record coroutine kind in coroutine generics Feb 7, 2024
@oli-obk
Copy link
Contributor

oli-obk commented Feb 7, 2024

@bors r+ rollup

oh fun, this seems generally like a footgun. I wonder where we could add assertions to catch missing such things.

@bors
Copy link
Collaborator

bors commented Feb 7, 2024

📌 Commit dcca9a1 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 Feb 7, 2024
@compiler-errors
Copy link
Member Author

Yes, it's a footgun. Confusingly, we don't really use these generics anywhere, which is why Matthias only found this when messing with -Zpolymorphize.

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 7, 2024
Rollup of 13 pull requests

Successful merges:

 - rust-lang#110482 (Add armv8r-none-eabihf target for the Cortex-R52.)
 - rust-lang#119162 (Add unstable `-Z direct-access-external-data` cmdline flag for `rustc`)
 - rust-lang#120302 (various const interning cleanups)
 - rust-lang#120455 ( Add FileCheck annotations to MIR-opt SROA tests)
 - rust-lang#120470 (Mark "unused binding" suggestion as maybe incorrect)
 - rust-lang#120479 (Suggest turning `if let` into irrefutable `let` if appropriate)
 - rust-lang#120564 (coverage: Split out counter increment sites from BCB node/edge counters)
 - rust-lang#120633 (pattern_analysis: gather up place-relevant info)
 - rust-lang#120664 (Add parallel rustc ui tests)
 - rust-lang#120726 (Don't use bashism in checktools.sh)
 - rust-lang#120733 (MirPass: make name more const)
 - rust-lang#120735 (Remove some `unchecked_claim_error_was_emitted` calls)
 - rust-lang#120746 (Record coroutine kind in coroutine generics)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b715d93 into rust-lang:master Feb 7, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 7, 2024
Rollup merge of rust-lang#120746 - compiler-errors:kind-ty, r=oli-obk

Record coroutine kind in coroutine generics

Oops, added a new substitution (the "kind" ty) to coroutines but forgot to record it in the `generics_of`. I'm surprised I left this out of the coroutine-closure PR -- I thought I made this change; I possibly rebased it out by accident.

Fixes rust-lang#120732

r? oli-obk
@rustbot rustbot added this to the 1.78.0 milestone Feb 7, 2024
# for free to join this conversation on GitHub. Already have an account? # 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: coroutine constructed with incorrect number of substitutions
4 participants