summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-76077-1.fixed
blob: 8103a7ca47d4eff5aece8d46c859e2501517dd6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// run-rustfix
#![allow(dead_code, unused_variables)]

pub mod foo {
    #[derive(Default)]
    pub struct Foo { invisible: bool, }

    #[derive(Default)]
    pub struct Bar { pub visible: bool, invisible: bool, }
}

fn main() {
    let foo::Foo { .. } = foo::Foo::default();
    //~^ ERROR pattern requires `..` due to inaccessible fields

    let foo::Bar { visible, .. } = foo::Bar::default();
    //~^ ERROR pattern requires `..` due to inaccessible fields
}