#![allow(warnings)] // This test verifies that the suggestion to move types before associated type bindings // is correct. trait One { type A; } trait OneWithLifetime<'a, T> { type A; } trait Three { type A; type B; type C; } trait ThreeWithLifetime<'a, 'b, 'c, T, U, V> { type A; type B; type C; } struct A> { //~^ ERROR generic arguments must come before the first constraint m: M, t: T, } struct Al<'a, T, M: OneWithLifetime> { //~^ ERROR generic arguments must come before the first constraint //~^^ ERROR type provided when a lifetime was expected m: M, t: &'a T, } struct B> { //~^ ERROR generic arguments must come before the first constraint m: M, t: T, u: U, v: V, } struct Bl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime> { //~^ ERROR generic arguments must come before the first constraint //~^^ ERROR type provided when a lifetime was expected m: M, t: &'a T, u: &'b U, v: &'c V, } struct C> { //~^ ERROR generic arguments must come before the first constraint m: M, t: T, u: U, v: V, } struct Cl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime> { //~^ ERROR generic arguments must come before the first constraint //~^^ ERROR lifetime provided when a type was expected m: M, t: &'a T, u: &'b U, v: &'c V, } struct D> { //~^ ERROR generic arguments must come before the first constraint m: M, t: T, u: U, v: V, } struct Dl<'a, 'b, 'c, T, U, V, M: ThreeWithLifetime> { //~^ ERROR generic arguments must come before the first constraint //~^^ ERROR lifetime provided when a type was expected m: M, t: &'a T, u: &'b U, v: &'c V, } fn main() {}