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

Traits are not implemented for functions with higher-ranked lifetime bounds #29056

Closed
wthrowe opened this issue Oct 14, 2015 · 2 comments
Closed

Comments

@wthrowe
Copy link
Contributor

wthrowe commented Oct 14, 2015

Also the error is really confusing, because the compiler omits the troublesome bound in the error message.

trait IsClone: Clone {}
impl IsClone for fn(&()) {}
//~^ error: the trait `core::clone::Clone` is not implemented for the type `fn(&())`
impl IsClone for for<'a> fn(&'a ()) {}
//~^ error: the trait `core::clone::Clone` is not implemented for the type `fn(&'a ())`
impl<'a> IsClone for fn(&'a ()) {} // OK
@petrochenkov
Copy link
Contributor

Duplicate of #24000

@wthrowe
Copy link
Contributor Author

wthrowe commented Oct 14, 2015

Yep.

@wthrowe wthrowe closed this as completed Oct 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants