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

Handle type error caused by returning specific type that would be solved by using impl Trait #61271

Open
estebank opened this issue May 28, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@estebank
Copy link
Contributor

commented May 28, 2019

https://mobile.twitter.com/mountain_ghosts/status/1133339596958392320

When encountering a type error on the return expression not matching the return type, which is a type argument for a trait, try to evaluate the return expression as if the return type had been impl of the expected trait. If that would resolve the problem, suggest it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.