1 // All lifetime parameters in struct constructors are currently considered early bound,
2 // i.e., `S::<ARGS>` is interpreted kinda like an associated item `S::<ARGS>::ctor`.
3 // This behavior is a bit weird, because if equivalent constructor were written manually
4 // it would get late bound lifetime parameters.
5 // Variant constructors behave in the same way, lifetime parameters are considered
6 // belonging to the enum and being early bound.
7 // https://github.com/rust-lang/rust/issues/30904
9 struct S<'a, 'b>(&'a u8, &'b u8);
18 //~^ ERROR wrong number of lifetime arguments: expected 2, found 1
19 S::<'static, 'static, 'static>(&0, &0);
20 //~^ ERROR wrong number of lifetime arguments: expected 2, found 3
23 //~^ ERROR wrong number of lifetime arguments: expected 2, found 1
24 E::V::<'static, 'static, 'static>(&0);
25 //~^ ERROR wrong number of lifetime arguments: expected 2, found 3