Rollup merge of #5523 - phansch:add-new-ret-no-self-testcase, r=flip1995

Add lifetime test case for `new_ret_no_self`

cc https://github.com/rust-lang/rust-clippy/issues/734#issuecomment-619344352

changelog: none
This commit is contained in:
Philipp Krones 2020-04-25 21:06:31 +02:00 committed by GitHub
commit 9b882bab26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -199,3 +199,14 @@ impl NestedReturnerOk3 {
unimplemented!();
}
}
struct WithLifetime<'a> {
cat: &'a str,
}
impl<'a> WithLifetime<'a> {
// should not trigger the lint, because the lifetimes are different
pub fn new<'b: 'a>(s: &'b str) -> WithLifetime<'b> {
unimplemented!();
}
}