]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/const-param-type-depends-on-type-param.rs
Auto merge of #79342 - CDirkx:ipaddr-const, r=oli-obk
[rust.git] / src / test / ui / const-generics / const-param-type-depends-on-type-param.rs
1 // revisions: full min
2
3 #![cfg_attr(full, feature(const_generics))]
4 #![cfg_attr(full, allow(incomplete_features))]
5 #![cfg_attr(min, feature(min_const_generics))]
6
7 // Currently, const parameters cannot depend on other generic parameters,
8 // as our current implementation can't really support this.
9 //
10 // We may want to lift this restriction in the future.
11
12 pub struct Dependent<T, const X: T>([(); X]);
13 //~^ ERROR: the type of const parameters must not depend on other generic parameters
14 //~| ERROR: parameter `T` is never used
15
16 fn main() {}