summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/const-param-type-depends-on-const-param.full.stderr
blob: 539d840f0a80301a880e7c2732152f959240b25b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
error[E0770]: the type of const parameters must not depend on other generic parameters
  --> $DIR/const-param-type-depends-on-const-param.rs:11:52
   |
LL | pub struct Dependent<const N: usize, const X: [u8; N]>([(); N]);
   |                                                    ^ the type must not depend on the parameter `N`
   |
   = note: const parameters may not be used in the type of const parameters

error[E0770]: the type of const parameters must not depend on other generic parameters
  --> $DIR/const-param-type-depends-on-const-param.rs:15:40
   |
LL | pub struct SelfDependent<const N: [u8; N]>;
   |                                        ^ the type must not depend on the parameter `N`
   |
   = note: const parameters may not be used in the type of const parameters

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0770`.