about summary refs log tree commit diff
path: root/tests/ui/privacy/private-field-struct-construction-76077.rs
blob: 7fc3473e8deccfe3f20438c813ab8d490c1e7f8d (plain)
1
2
3
4
5
6
7
8
9
10
11
// https://github.com/rust-lang/rust/issues/76077
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
}