1 // ignore-tidy-linelength
5 // This test verifies that the suggestion to move types before associated type bindings
12 trait OneWithLifetime<'a, T> {
16 trait Three<T, U, V> {
22 trait ThreeWithLifetime<'a, 'b, 'c, T, U, V> {
28 struct A<T, M: One<A=(), T>> { //~ ERROR associated type bindings must be declared after generic parameters
34 struct Al<'a, T, M: OneWithLifetime<A=(), T, 'a>> {
35 //~^ ERROR associated type bindings must be declared after generic parameters
36 //~^^ ERROR lifetime arguments must be declared prior to type arguments
41 struct B<T, U, V, M: Three<A=(), B=(), C=(), T, U, V>> { //~ ERROR associated type bindings must be declared after generic parameters
48 struct Bl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<A=(), B=(), C=(), T, U, V, 'a, 'b, 'c>> {
49 //~^ ERROR associated type bindings must be declared after generic parameters
50 //~^^ ERROR lifetime arguments must be declared prior to type arguments
57 struct C<T, U, V, M: Three<T, A=(), B=(), C=(), U, V>> { //~ ERROR associated type bindings must be declared after generic parameters
64 struct Cl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<T, 'a, A=(), B=(), C=(), U, 'b, V, 'c>> {
65 //~^ ERROR associated type bindings must be declared after generic parameters
66 //~^^ ERROR lifetime arguments must be declared prior to type arguments
73 struct D<T, U, V, M: Three<T, A=(), B=(), U, C=(), V>> { //~ ERROR associated type bindings must be declared after generic parameters
80 struct Dl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime<T, 'a, A=(), B=(), U, 'b, C=(), V, 'c>> {
81 //~^ ERROR associated type bindings must be declared after generic parameters
82 //~^^ ERROR lifetime arguments must be declared prior to type arguments