]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/const-param-type-depends-on-type-param.stderr
Reword E0392 slightly
[rust.git] / src / test / ui / const-generics / const-param-type-depends-on-type-param.stderr
1 error[E0671]: const parameters cannot depend on type 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    |                                  ^ const parameter depends on type parameter
6
7 warning: the feature `const_generics` is incomplete and may cause the compiler to crash
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
15 error[E0392]: parameter `T` is never used
16   --> $DIR/const-param-type-depends-on-type-param.rs:9:22
17    |
18 LL | pub struct Dependent<T, const X: T>([(); X]);
19    |                      ^ unused parameter
20    |
21    = help: consider removing `T`, refering to it in a field or using a marker such as `std::marker::PhantomData`
22
23 error: aborting due to 2 previous errors
24
25 Some errors have detailed explanations: E0392, E0671.
26 For more information about an error, try `rustc --explain E0392`.