]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/const-param-type-depends-on-type-param.stderr
fa566b5536fee86c596962774688d659656ddcff
[rust.git] / src / test / ui / const-generics / const-param-type-depends-on-type-param.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.rs:9:34
3    |
4 LL | pub struct Dependent<T, const X: T>([(); X]);
5    |                                  ^ the type must not depend on the parameter `T`
6
7 warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
8   --> $DIR/const-param-type-depends-on-type-param.rs:1:12
9    |
10 LL | #![feature(const_generics)]
11    |            ^^^^^^^^^^^^^^
12    |
13    = note: `#[warn(incomplete_features)]` on by default
14    = note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
15
16 error[E0392]: parameter `T` is never used
17   --> $DIR/const-param-type-depends-on-type-param.rs:9:22
18    |
19 LL | pub struct Dependent<T, const X: T>([(); X]);
20    |                      ^ unused parameter
21    |
22    = help: consider removing `T`, referring to it in a field, or using a marker such as `std::marker::PhantomData`
23
24 error: aborting due to 2 previous errors; 1 warning emitted
25
26 For more information about this error, try `rustc --explain E0392`.