]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/const-param-type-depends-on-const-param.stderr
pin docs: add some forward references
[rust.git] / src / test / ui / const-generics / const-param-type-depends-on-const-param.stderr
1 error[E0770]: the type of const parameters must not depend on other generic parameters
2   --> $DIR/const-param-type-depends-on-const-param.rs:9:52
3    |
4 LL | pub struct Dependent<const N: usize, const X: [u8; N]>([(); N]);
5    |                                                    ^ the type must not depend on the parameter `N`
6
7 error[E0770]: the type of const parameters must not depend on other generic parameters
8   --> $DIR/const-param-type-depends-on-const-param.rs:12:40
9    |
10 LL | pub struct SelfDependent<const N: [u8; N]>;
11    |                                        ^ the type must not depend on the parameter `N`
12
13 warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
14   --> $DIR/const-param-type-depends-on-const-param.rs:1:12
15    |
16 LL | #![feature(const_generics)]
17    |            ^^^^^^^^^^^^^^
18    |
19    = note: `#[warn(incomplete_features)]` on by default
20    = note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
21
22 error: aborting due to 2 previous errors; 1 warning emitted
23
24 For more information about this error, try `rustc --explain E0770`.