]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/const-param-type-depends-on-type-param-ungated.stderr
7a2ee689c3318d163c3d5ddf7d163eaca9f889dd
[rust.git] / src / test / ui / const-generics / const-param-type-depends-on-type-param-ungated.stderr
1 error[E0770]: the type of const parameters must not depend on other generic parameters
2   --> $DIR/const-param-type-depends-on-type-param-ungated.rs:3:22
3    |
4 LL | struct B<T, const N: T>(PhantomData<[T; N]>);
5    |                      ^ the type must not depend on the parameter `T`
6
7 error[E0658]: const generics are unstable
8   --> $DIR/const-param-type-depends-on-type-param-ungated.rs:3:19
9    |
10 LL | struct B<T, const N: T>(PhantomData<[T; N]>);
11    |                   ^
12    |
13    = note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
14    = help: add `#![feature(const_generics)]` to the crate attributes to enable
15
16 error: aborting due to 2 previous errors
17
18 For more information about this error, try `rustc --explain E0658`.