11error: `[u8; 0]` is forbidden as the type of a const generic parameter
2- --> $DIR/complex-types.rs:3 :21
2+ --> $DIR/complex-types.rs:4 :21
33 |
44LL | struct Foo<const N: [u8; 0]>;
55 | ^^^^^^^
@@ -8,7 +8,7 @@ LL | struct Foo<const N: [u8; 0]>;
88 = note: more complex types are supported with `#[feature(const_generics)]`
99
1010error: `()` is forbidden as the type of a const generic parameter
11- --> $DIR/complex-types.rs:6 :21
11+ --> $DIR/complex-types.rs:7 :21
1212 |
1313LL | struct Bar<const N: ()>;
1414 | ^^
@@ -17,7 +17,7 @@ LL | struct Bar<const N: ()>;
1717 = note: more complex types are supported with `#[feature(const_generics)]`
1818
1919error: `No` is forbidden as the type of a const generic parameter
20- --> $DIR/complex-types.rs:11 :21
20+ --> $DIR/complex-types.rs:12 :21
2121 |
2222LL | struct Fez<const N: No>;
2323 | ^^
@@ -26,13 +26,40 @@ LL | struct Fez<const N: No>;
2626 = note: more complex types are supported with `#[feature(const_generics)]`
2727
2828error: `&'static u8` is forbidden as the type of a const generic parameter
29- --> $DIR/complex-types.rs:14 :21
29+ --> $DIR/complex-types.rs:15 :21
3030 |
3131LL | struct Faz<const N: &'static u8>;
3232 | ^^^^^^^^^^^
3333 |
3434 = note: the only supported types are integers, `bool` and `char`
3535 = note: more complex types are supported with `#[feature(const_generics)]`
3636
37- error: aborting due to 4 previous errors
37+ error: `!` is forbidden as the type of a const generic parameter
38+ --> $DIR/complex-types.rs:18:21
39+ |
40+ LL | struct Fiz<const N: !>;
41+ | ^
42+ |
43+ = note: the only supported types are integers, `bool` and `char`
44+ = note: more complex types are supported with `#[feature(const_generics)]`
45+
46+ error: `()` is forbidden as the type of a const generic parameter
47+ --> $DIR/complex-types.rs:21:19
48+ |
49+ LL | enum Goo<const N: ()> { A, B }
50+ | ^^
51+ |
52+ = note: the only supported types are integers, `bool` and `char`
53+ = note: more complex types are supported with `#[feature(const_generics)]`
54+
55+ error: `()` is forbidden as the type of a const generic parameter
56+ --> $DIR/complex-types.rs:24:20
57+ |
58+ LL | union Boo<const N: ()> { a: () }
59+ | ^^
60+ |
61+ = note: the only supported types are integers, `bool` and `char`
62+ = note: more complex types are supported with `#[feature(const_generics)]`
63+
64+ error: aborting due to 7 previous errors
3865
0 commit comments