]> git.lizzy.rs Git - rust.git/blob - tests/ui/generics/generic-arg-mismatch-recover.rs
Rollup merge of #107524 - cjgillot:both-storage, r=RalfJung
[rust.git] / tests / ui / generics / generic-arg-mismatch-recover.rs
1 struct Foo<'a, T: 'a>(&'a T);
2
3 struct Bar<'a>(&'a ());
4
5 fn main() {
6     Foo::<'static, 'static, ()>(&0);
7     //~^ ERROR this struct takes 1 lifetime argument but 2 lifetime arguments were supplied
8
9     Bar::<'static, 'static, ()>(&());
10     //~^ ERROR this struct takes 1 lifetime argument but 2 lifetime arguments were supplied
11     //~| ERROR this struct takes 0
12 }