summaryrefslogtreecommitdiffstats
path: root/tests/ui/structs/struct-variant-privacy.rs
blob: fcdf9a22baf4b5cd9f92419bde0bfcacf8844050 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
mod foo {
    enum Bar {
        Baz { a: isize },
    }
}

fn f(b: foo::Bar) {
    //~^ ERROR enum `Bar` is private
    match b {
        foo::Bar::Baz { a: _a } => {} //~ ERROR enum `Bar` is private
    }
}

fn main() {}