rust/tests/ui/suggestions/return-without-lifetime.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
296 B
Rust
Raw Normal View History

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() {}