summary refs log tree commit diff
path: root/src/test/ui/const-generics/issues/issue-67375.rs
blob: a8875b8b6bfcabf59e148ac2b3917686c2fe627b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// revisions: full min

#![cfg_attr(full, allow(incomplete_features))]
#![cfg_attr(full, feature(const_generics))]

struct Bug<T> {
    //~^ ERROR parameter `T` is never used
    inner: [(); { [|_: &T| {}; 0].len() }],
    //[min]~^ ERROR generic parameters may not be used in const operations
    //[full]~^^ WARN cannot use constants which depend on generic parameters in types
    //[full]~^^^ WARN this was previously accepted by the compiler
}

fn main() {}