]> git.lizzy.rs Git - rust.git/blob - tests/ui/typeck/missing-private-fields-in-struct-literal.rs
Rollup merge of #106922 - ChayimFriedman2:patch-5, r=workingjubilee
[rust.git] / tests / ui / typeck / missing-private-fields-in-struct-literal.rs
1 pub mod m {
2     pub struct S {
3         pub visible: bool,
4         a: (),
5         b: (),
6         c: (),
7         d: (),
8         e: (),
9     }
10 }
11
12 fn main() {
13     let _ = m::S { //~ ERROR cannot construct `S` with struct literal syntax due to private fields
14         visible: true,
15         a: (),
16         b: (),
17     };
18 }