summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/argument_order.rs
blob: 196d9b8a1e210df32588f4489f6f3cca73a8b517 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
struct Bad<const N: usize, T> {
    arr: [u8; { N }],
    another: T,
}

struct AlsoBad<const N: usize, 'a, T, 'b, const M: usize, U> {
    //~^ ERROR lifetime parameters must be declared prior
    a: &'a T,
    b: &'b U,
}

fn main() {
    let _: AlsoBad<7, 'static, u32, 'static, 17, u16>;
    //~^ ERROR lifetime provided when a type was expected
 }