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);
|
|
|
|
//~^ ERROR this 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, ()>(&());
|
|
|
|
//~^ ERROR this struct takes 1 lifetime argument but 2 lifetime arguments were supplied
|
2021-02-18 21:01:44 +01:00
|
|
|
//~| ERROR this struct takes 0
|
2018-08-20 16:32:59 +01:00
|
|
|
}
|