]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/const-param-decl-on-type-instead-of-impl.rs
Account for ADT bodies and struct expressions
[rust.git] / src / test / ui / parser / const-param-decl-on-type-instead-of-impl.rs
1 struct NInts<const N: usize>([u8; N]);
2 impl NInts<const N: usize> {} //~ ERROR unexpected `const` parameter declaration
3
4 fn main() {
5     let _: () = 42; //~ ERROR mismatched types
6 }
7
8 fn banana(a: <T<const N: usize>>::BAR) {}
9 //~^ ERROR unexpected `const` parameter declaration
10 //~| ERROR cannot find type `T` in this scope
11 fn chaenomeles() {
12     path::path::Struct::<const N: usize>()
13     //~^ ERROR unexpected `const` parameter declaration
14     //~| ERROR failed to resolve: use of undeclared crate or module `path`
15 }