]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/const-param-type-depends-on-const-param.rs
pin docs: add some forward references
[rust.git] / src / test / ui / const-generics / const-param-type-depends-on-const-param.rs
1 #![feature(const_generics)]
2 //~^ WARN the feature `const_generics` is incomplete
3
4 // Currently, const parameters cannot depend on other generic parameters,
5 // as our current implementation can't really support this.
6 //
7 // We may want to lift this restriction in the future.
8
9 pub struct Dependent<const N: usize, const X: [u8; N]>([(); N]);
10 //~^ ERROR: the type of const parameters must not depend on other generic parameters
11
12 pub struct SelfDependent<const N: [u8; N]>;
13 //~^ ERROR: the type of const parameters must not depend on other generic parameters
14
15 fn main() {}