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