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);
|
|
|
|
//~^ ERROR this 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, ()>(&());
|
|
|
|
//~^ 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 10:32:59 -05:00
|
|
|
}
|