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

Duplicate error messages in async code #91463

Open
eholk opened this issue Dec 2, 2021 · 4 comments
Open

Duplicate error messages in async code #91463

eholk opened this issue Dec 2, 2021 · 4 comments
Labels
A-async-await Area: Async & Await AsyncAwait-Polish Async-await issues that are part of the "polish" area AsyncAwait-Triaged Async-await issues that have been triaged during a working group meeting.

Comments

@eholk
Copy link
Contributor

eholk commented Dec 2, 2021

We often get multiple copies of the same error message in async code. For example, see unresolved_type_param.stderr. It would be good to only get this error message once.

@eholk
Copy link
Contributor Author

eholk commented Dec 2, 2021

@rustbot label +A-async-await +AsyncAwait-Polish

@rustbot rustbot added A-async-await Area: Async & Await AsyncAwait-Polish Async-await issues that are part of the "polish" area labels Dec 2, 2021
@eholk
Copy link
Contributor Author

eholk commented Dec 6, 2021

We discussed this issue in the async triage meeting meeting today. It seems like this has something to do with the .await desugaring, and probably something to do with generator_interior.rs. @estebank has a PR out that will add some more metadata that might be helpful here as well.

@rustbot label +AsyncAwait-Triaged

@rustbot rustbot added the AsyncAwait-Triaged Async-await issues that have been triaged during a working group meeting. label Dec 6, 2021
@lqd
Copy link
Member

lqd commented Dec 6, 2021

I don't think the example linked above is something that users will actually experience: rustc and cargo deduplicate error messages, but the test suite runs with this deduplication turned off.

Here's how this unresolved_type_param test looks on nightly, for example.

We should probably find another example to link here, with slightly different errors that are thus not deduplicated ?

@eholk
Copy link
Contributor Author

eholk commented Dec 7, 2021

Ah, I didn't realize there was a further deduplication step. It'd be nice to not generate duplicate errors in the first place, but the fact that they get filtered out normally means we can consider this issue to be pretty low priority. If we find a case where they aren't exactly the same but should still be deduplicated, then that would be worth capturing here too.

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 AsyncAwait-Polish Async-await issues that are part of the "polish" area AsyncAwait-Triaged Async-await issues that have been triaged during a working group meeting.
Projects
None yet
Development

No branches or pull requests

3 participants