rust/tests/ui/suggestions/return-without-lifetime.rs
2023-01-11 09:32:08 +00:00

11 lines
296 B
Rust

struct Thing<'a>(&'a ());
struct Foo<'a>(&usize);
//~^ ERROR missing lifetime specifier
fn func1<'a>(_arg: &'a Thing) -> &() { unimplemented!() }
//~^ ERROR missing lifetime specifier
fn func2<'a>(_arg: &Thing<'a>) -> &() { unimplemented!() }
//~^ ERROR missing lifetime specifier
fn main() {}