rust/tests/ui/issues/issue-76077.rs
2023-01-11 09:32:08 +00:00

11 lines
201 B
Rust

pub mod foo {
pub struct Foo {
you_cant_use_this_field: bool,
}
}
fn main() {
foo::Foo {};
//~^ ERROR cannot construct `Foo` with struct literal syntax due to private fields
}