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
|
|
|
|
//~| ERROR this struct takes 0 type arguments but 1 type argument was supplied
|
2018-08-20 16:32:59 +01:00
|
|
|
}
|