]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/const-param-type-depends-on-type-param.stderr
Rollup merge of #59923 - czipperz:fix-convert-doc-links, r=steveklabnik
[rust.git] / src / test / ui / const-generics / const-param-type-depends-on-type-param.stderr
1 warning: the feature `const_generics` is incomplete and may cause the compiler to crash
2   --> $DIR/const-param-type-depends-on-type-param.rs:1:12
3    |
4 LL | #![feature(const_generics)]
5    |            ^^^^^^^^^^^^^^
6
7 error[E0671]: const parameters cannot depend on type parameters
8   --> $DIR/const-param-type-depends-on-type-param.rs:9:34
9    |
10 LL | pub struct Dependent<T, const X: T>([(); X]);
11    |                                  ^ const parameter depends on type parameter
12
13 error[E0392]: parameter `T` is never used
14   --> $DIR/const-param-type-depends-on-type-param.rs:9:22
15    |
16 LL | pub struct Dependent<T, const X: T>([(); X]);
17    |                      ^ unused parameter
18    |
19    = help: consider removing `T` or using a marker such as `std::marker::PhantomData`
20
21 error: aborting due to 2 previous errors
22
23 Some errors have detailed explanations: E0392, E0671.
24 For more information about an error, try `rustc --explain E0392`.