mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 15:32:06 +00:00
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:
commit
9b882bab26
@ -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!();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user