error[E0451]: field `b` of struct `Bar::Foo` is private --> $DIR/E0451.rs:24:23 | LL | let Bar::Foo{a:a, b:b} = foo; //~ ERROR E0451 | ^^^ field `b` is private error[E0451]: field `b` of struct `Bar::Foo` is private --> $DIR/E0451.rs:28:29 | LL | let f = Bar::Foo{ a: 0, b: 0 }; //~ ERROR E0451 | ^^^^ field `b` is private error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0451`.