2018-08-20 16:32:59 +01:00
|
|
|
struct Foo<'a, T: 'a>(&'a T);
|
|
|
|
|
|
|
|
struct Bar<'a>(&'a ());
|
|
|
|
|
|
|
|
fn main() {
|
2021-01-02 19:45:11 +01:00
|
|
|
Foo::<'static, 'static, ()>(&0);
|
2023-02-23 10:27:06 -07:00
|
|
|
//~^ ERROR struct takes 1 lifetime argument but 2 lifetime arguments were supplied
|
2018-08-20 16:32:59 +01:00
|
|
|
|
2021-01-02 19:45:11 +01:00
|
|
|
Bar::<'static, 'static, ()>(&());
|
2023-02-23 10:27:06 -07:00
|
|
|
//~^ ERROR struct takes 1 lifetime argument but 2 lifetime arguments were supplied
|
|
|
|
//~| ERROR struct takes 0
|
2018-08-20 16:32:59 +01:00
|
|
|
}
|