about summary refs log tree commit diff
path: root/tests/ui/parser/const-param-decl-on-type-instead-of-impl.rs
blob: 3876fb41d23f1b9f2564e68717a0bc9d3fb0f0d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
struct NInts<const N: usize>([u8; N]);
impl NInts<const N: usize> {} //~ ERROR unexpected `const` parameter declaration

fn main() {
    let _: () = 42; //~ ERROR mismatched types
}

fn banana(a: <T<const N: usize>>::BAR) {}
//~^ ERROR unexpected `const` parameter declaration
//~| ERROR cannot find type `T` in this scope
fn chaenomeles() {
    path::path::Struct::<const N: usize>()
    //~^ ERROR unexpected `const` parameter declaration
    //~| ERROR failed to resolve: use of unresolved module or unlinked crate `path`
}