mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
13 lines
365 B
Rust
13 lines
365 B
Rust
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
|
|
//~| ERROR this struct takes 0
|
|
}
|