rust/tests/ui/structs/struct-variant-privacy.rs
2023-01-11 09:32:08 +00:00

15 lines
223 B
Rust

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() {}