]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/issue-67375.rs
Auto merge of #79342 - CDirkx:ipaddr-const, r=oli-obk
[rust.git] / src / test / ui / const-generics / issue-67375.rs
1 // revisions: full min
2
3 #![cfg_attr(full, allow(incomplete_features))]
4 #![cfg_attr(full, feature(const_generics))]
5 #![cfg_attr(min, feature(min_const_generics))]
6
7 struct Bug<T> {
8     //~^ ERROR parameter `T` is never used
9     inner: [(); { [|_: &T| {}; 0].len() }],
10     //[min]~^ ERROR generic parameters may not be used in const operations
11     //[full]~^^ WARN cannot use constants which depend on generic parameters in types
12     //[full]~^^^ WARN this was previously accepted by the compiler
13 }
14
15 fn main() {}