summaryrefslogtreecommitdiffstats
path: root/src/test/ui/typeck/issue-87872-missing-inaccessible-field-literal.rs
blob: 326e958aaa94f55fe83226c3b636ceb0814f0c9a (plain)
1
2
3
4
5
6
7
8
9
10
11
pub mod foo {
    pub struct Foo {
        pub you_can_use_this_field: bool,
        you_cant_use_this_field: bool,
    }
}

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