-
Notifications
You must be signed in to change notification settings - Fork 13k
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
impl Trait feature is not make code easy #47348
Comments
fn test0(foo: impl Trait) -> <impl Trait as std::ops::Sub>::Output {
foo - foo
} Should this even compile? I would have figured that the |
#48084 makes the snippet no longer compile.
That said, I can see what originally led the author to write this signature; observe the error message for an incorrect return type:
|
Triage: the error message for
Maybe that's helpful enough? This definitely doesn't seem like a bug though, I'm going to change it to a diagnostic request. |
Current output: playground link
|
Closing this issue as this code doesn't compile any more as intended, and maybe the diagnostic should be improved but i feel that's better as a new issue |
Only the
bar
can be debug.The text was updated successfully, but these errors were encountered: