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

async/await unresolved type parameter in generator error shouldn't refer to yield #60615

Closed
cramertj opened this issue May 7, 2019 · 0 comments · Fixed by #61941
Closed

async/await unresolved type parameter in generator error shouldn't refer to yield #60615

cramertj opened this issue May 7, 2019 · 0 comments · Fixed by #61941
Assignees
Labels
A-async-await Area: Async & Await A-diagnostics Area: Messages for errors, warnings, and lints AsyncAwait-Polish Async-await issues that are part of the "polish" area

Comments

@cramertj
Copy link
Member

cramertj commented May 7, 2019

This error could be better and shouldn't talk about yield. This requires plumbing through extra information about where generators and yields came from so that we can give appropriate diagnostics at later stages of the compiler.

@cramertj cramertj added A-diagnostics Area: Messages for errors, warnings, and lints A-async-await Area: Async & Await AsyncAwait-Unclear labels May 7, 2019
@nikomatsakis nikomatsakis added AsyncAwait-Polish Async-await issues that are part of the "polish" area and removed AsyncAwait-Unclear labels Jun 11, 2019
@cramertj cramertj self-assigned this Jun 18, 2019
Centril added a commit to Centril/rust that referenced this issue Jun 18, 2019
…ntril

Preserve generator and yield source for error messages

Previously, error messages after HIR lowering all referred
to generators and yield, regardless of whether the original
source was a generator or an async/await body. This change
tracks the kind of each generator and yield source in order
to provide appropriately tailored error messages.

Fixes rust-lang#60615.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-async-await Area: Async & Await A-diagnostics Area: Messages for errors, warnings, and lints AsyncAwait-Polish Async-await issues that are part of the "polish" area
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants