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
Respect MSRV (MAYBE_BOUND_IN_WHERE) #12388
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,4 +57,26 @@ impl<F> C<F> { | |
} | ||
} | ||
|
||
#[clippy::msrv = "1.14.0"] | ||
mod issue12370_fail { | ||
trait Trait {} | ||
|
||
fn f<T: ?Sized>() | ||
where | ||
T: Trait, | ||
{ | ||
} | ||
} | ||
|
||
#[clippy::msrv = "1.15.0"] | ||
mod issue12370_pass { | ||
trait Trait {} | ||
|
||
fn f<T: ?Sized>() | ||
where | ||
T: Trait, | ||
{ | ||
} | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we have a test case for something like fn f<'a, a: Sized>() where 'a: 'static {} where the type parameter is named after a lifetime? I think this currently happens to work (ie not get linted) because the name of lifetimes include the quote, which differentiates them, but it would be good to have this as a guarantee in the testsuite. |
||
fn main() {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we now not only lint on functions, but also impls and a bunch of other items, I wonder how this interacts with derive macros such as
Debug
. Would be good to have a test, to make sure it doesn't lint here: