summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/defaults/forward-declared.rs
blob: ede3d873bdcf6b5d8ad2d9f82150da9b2ccdc57a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
struct Foo<const N: usize = M, const M: usize = 10>;
//~^ ERROR generic parameters with a default cannot use forward declared identifiers

enum Bar<const N: usize = M, const M: usize = 10> {}
//~^ ERROR generic parameters with a default cannot use forward declared identifiers

struct Foo2<const N: usize = N>;
//~^ ERROR generic parameters with a default cannot use forward declared identifiers

enum Bar2<const N: usize = N> {}
//~^ ERROR generic parameters with a default cannot use forward declared identifiers

fn main() {}