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

#![cfg_attr(full, allow(incomplete_features))]
#![cfg_attr(full, feature(const_generics))]
#![cfg_attr(min, feature(min_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() {}