]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/const-param-type-depends-on-type-param.full.stderr
Auto merge of #79342 - CDirkx:ipaddr-const, r=oli-obk
[rust.git] / src / test / ui / const-generics / const-param-type-depends-on-type-param.full.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:12:34
3    |
4 LL | pub struct Dependent<T, const X: T>([(); X]);
5    |                                  ^ the type must not depend on the parameter `T`
6
7 error[E0392]: parameter `T` is never used
8   --> $DIR/const-param-type-depends-on-type-param.rs:12:22
9    |
10 LL | pub struct Dependent<T, const X: T>([(); X]);
11    |                      ^ unused parameter
12    |
13    = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
14
15 error: aborting due to 2 previous errors
16
17 Some errors have detailed explanations: E0392, E0770.
18 For more information about an error, try `rustc --explain E0392`.