Skip to content

Do not depend on Generator trait when deducing closure signature #107499

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

Conversation

compiler-errors
Copy link
Member

  1. Do not depend on Generator trait when deducing closure signature.
  2. Compare the name of the Generator::Return associated item, rather than its order in the trait. Seems more stable this way.

@compiler-errors compiler-errors added the C-cleanup Category: PRs that clean code up or issues documenting cleanup. label Jan 31, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jan 31, 2023

r? @michaelwoerister

(rustbot has picked a reviewer for you, use r? to override)

@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 Jan 31, 2023
Copy link
Contributor

@eggyal eggyal left a comment

Choose a reason for hiding this comment

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

LGTM

@michaelwoerister
Copy link
Member

Thanks, @compiler-errors!
@bors r+

@bors
Copy link
Collaborator

bors commented Jan 31, 2023

📌 Commit 7892cc3 has been approved by michaelwoerister

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 Jan 31, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 1, 2023
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#107389 (Fixing confusion between mod and remainder)
 - rust-lang#107442 (improve panic message for slice windows and chunks)
 - rust-lang#107470 (Small bootstrap improvements)
 - rust-lang#107487 (Make the "extra if in let...else block" hint a suggestion)
 - rust-lang#107499 (Do not depend on Generator trait when deducing closure signature)
 - rust-lang#107533 (Extend `-Z print-type-sizes` to distinguish generator upvars+locals from "normal" fields.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit a37a59f into rust-lang:master Feb 1, 2023
@rustbot rustbot added this to the 1.69.0 milestone Feb 1, 2023
@compiler-errors compiler-errors deleted the deduce_sig_from_projection-generator-tweak branch August 11, 2023 19:58
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. 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.

5 participants