mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
18 lines
464 B
Rust
18 lines
464 B
Rust
// 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
|
|
}
|