blob: 78def80925ad0eac90787373765855db03cf28a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
trait X {
type Y<'a, 'b>;
}
struct Foo<'a, 'b, 'c> {
a: &'a u32,
b: &'b str,
c: &'c str,
}
fn foo<'c, 'd>(_arg: Box<dyn X<Y = (&'c u32, &'d u32)>>) {}
//~^ ERROR missing generics for associated type
fn bar<'a, 'b, 'c>(_arg: Foo<'a, 'b>) {}
//~^ ERROR this struct takes 3 lifetime arguments but 2 lifetime
fn f<'a>(_arg: Foo<'a>) {}
//~^ ERROR this struct takes 3 lifetime arguments but 1 lifetime
fn main() {}
|