rust/tests/ui/generics/generic-arg-mismatch-recover.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
365 B
Rust
Raw Normal View History

struct Foo<'a, T: 'a>(&'a T);
struct Bar<'a>(&'a ());
fn main() {
Foo::<'static, 'static, ()>(&0);
//~^ ERROR this struct takes 1 lifetime argument but 2 lifetime arguments were supplied
Bar::<'static, 'static, ()>(&());
//~^ ERROR this struct takes 1 lifetime argument but 2 lifetime arguments were supplied
2021-02-18 20:01:44 +00:00
//~| ERROR this struct takes 0
}