-
Notifications
You must be signed in to change notification settings - Fork 1.6k
needless_lifetimes ignores trait bounds #292
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
Comments
Manishearth
added a commit
that referenced
this issue
Sep 3, 2015
Manishearth
added a commit
that referenced
this issue
Sep 3, 2015
I'd like to add that we still have false positives even after #599 – The followig (from rust-bio) is still linted:
|
Users of Serde are going to start hitting this really badly in the next release as we are adding a lifetime to the Deserializer trait. fn f<'de, D: Deserializer<'de>>(deserializer: D) -> Result<F, D::Error> { /* ... */ } It would be great to fix this before Serde 1.0. |
@mcarton for whatever reason that is not the same. In particular: trait WithLifetime<'a> {}
fn trait_bound<'a, T: WithLifetime<'a>>() { unimplemented!() }
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
fn foo<'a, T: Foo<'a>>(&'a u8, T)
will hit the lint. It shouldn't, whenever we have lifetimes in trait bounds we should bail.The text was updated successfully, but these errors were encountered: