]> git.proxmox.com Git - rustc.git/blame - src/test/ui/const-generics/const-param-type-depends-on-type-param.full.stderr
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / const-generics / const-param-type-depends-on-type-param.full.stderr
CommitLineData
3dfed10e 1error[E0770]: the type of const parameters must not depend on other generic parameters
5869c6ff 2 --> $DIR/const-param-type-depends-on-type-param.rs:11:34
3dfed10e
XL
3 |
4LL | pub struct Dependent<T, const X: T>([(); X]);
5 | ^ the type must not depend on the parameter `T`
6
7error[E0392]: parameter `T` is never used
5869c6ff 8 --> $DIR/const-param-type-depends-on-type-param.rs:11:22
3dfed10e
XL
9 |
10LL | pub struct Dependent<T, const X: T>([(); X]);
11 | ^ unused parameter
12 |
1b1a35ee 13 = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
17df50a5 14 = help: if you intended `T` to be a const parameter, use `const T: usize` instead
3dfed10e
XL
15
16error: aborting due to 2 previous errors
17
18Some errors have detailed explanations: E0392, E0770.
19For more information about an error, try `rustc --explain E0392`.