Add lifetime test case for new_ret_no_self
This commit is contained in:
parent
02c94352d4
commit
bf73d51959
@ -199,3 +199,14 @@ pub fn new() -> Option<(Self, u32)> {
|
||||
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