rust/src/test/ui/generics/generic-arg-mismatch-recover.rs
2020-10-15 10:53:09 +09:00

11 lines
282 B
Rust

struct Foo<'a, T: 'a>(&'a T);
struct Bar<'a>(&'a ());
fn main() {
Foo::<'static, 'static, ()>(&0); //~ ERROR wrong number of lifetime arguments
Bar::<'static, 'static, ()>(&()); //~ ERROR wrong number of lifetime arguments
//~^ ERROR wrong number of type arguments
}