summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/min_const_generics/complex-types.rs
blob: 057bd5af89ef70480d8fd41f30f327b73ec1b7e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#![feature(never_type)]

struct Foo<const N: [u8; 0]>;
//~^ ERROR `[u8; 0]` is forbidden

struct Bar<const N: ()>;
//~^ ERROR `()` is forbidden
#[derive(PartialEq, Eq)]
struct No;

struct Fez<const N: No>;
//~^ ERROR `No` is forbidden

struct Faz<const N: &'static u8>;
//~^ ERROR `&'static u8` is forbidden

struct Fiz<const N: !>;
//~^ ERROR `!` is forbidden

enum Goo<const N: ()> { A, B }
//~^ ERROR `()` is forbidden

union Boo<const N: ()> { a: () }
//~^ ERROR `()` is forbidden


fn main() {}