]>
Commit | Line | Data |
---|---|---|
ea8adc8c XL |
1 | struct Foo<'a>(&'a u8); |
2 | struct Baz<'a>(&'_ &'a u8); //~ ERROR missing lifetime specifier | |
3 | ||
0bf4aa26 | 4 | fn foo<'_> //~ ERROR cannot be used here |
ea8adc8c XL |
5 | (_: Foo<'_>) {} |
6 | ||
7 | trait Meh<'a> {} | |
8 | impl<'a> Meh<'a> for u8 {} | |
9 | ||
dc9dc135 | 10 | fn meh() -> Box<dyn for<'_> Meh<'_>> //~ ERROR cannot be used here |
ea8adc8c | 11 | //~^ ERROR missing lifetime specifier |
ea8adc8c XL |
12 | { |
13 | Box::new(5u8) | |
14 | } | |
15 | ||
16 | fn foo2(_: &'_ u8, y: &'_ u8) -> &'_ u8 { y } //~ ERROR missing lifetime specifier | |
17 | ||
18 | fn main() { | |
19 | let x = 5; | |
20 | foo(Foo(&x)); | |
21 | let _ = meh(); | |
22 | } |