]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/forbid-non-structural_match-types.min.stderr
Auto merge of #79342 - CDirkx:ipaddr-const, r=oli-obk
[rust.git] / src / test / ui / const-generics / forbid-non-structural_match-types.min.stderr
1 error: `A` is forbidden as the type of a const generic parameter
2   --> $DIR/forbid-non-structural_match-types.rs:10:19
3    |
4 LL | struct B<const X: A>; // ok
5    |                   ^
6    |
7    = note: the only supported types are integers, `bool` and `char`
8    = help: more complex types are supported with `#[feature(const_generics)]`
9
10 error: `C` is forbidden as the type of a const generic parameter
11   --> $DIR/forbid-non-structural_match-types.rs:15:19
12    |
13 LL | struct D<const X: C>;
14    |                   ^
15    |
16    = note: the only supported types are integers, `bool` and `char`
17    = help: more complex types are supported with `#[feature(const_generics)]`
18
19 error[E0741]: `C` must be annotated with `#[derive(PartialEq, Eq)]` to be used as the type of a const parameter
20   --> $DIR/forbid-non-structural_match-types.rs:15:19
21    |
22 LL | struct D<const X: C>;
23    |                   ^ `C` doesn't derive both `PartialEq` and `Eq`
24
25 error: aborting due to 3 previous errors
26
27 For more information about this error, try `rustc --explain E0741`.