]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic/generic-arg-mismatch-recover.rs
Rollup merge of #61207 - taiki-e:arbitrary_self_types-lifetime-elision-2, r=Centril
[rust.git] / src / test / ui / generic / 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); //~ ERROR wrong number of lifetime arguments
7     //~^ ERROR mismatched types
8
9     Bar::<'static, 'static, ()>(&()); //~ ERROR wrong number of lifetime arguments
10     //~^ ERROR wrong number of type arguments
11 }