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

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

struct Bug<S: ?Sized> {
    A: [(); {
        //[full]~^ ERROR constant expression depends on a generic parameter
        let x: Option<Box<Self>> = None;
        //[min]~^ ERROR generic `Self` types are currently not permitted in anonymous constants
        0
    }],
    B: S
}

fn main() {}