error[E0451]: field `x` of struct `foo::bar::S` is private --> $DIR/struct-literal-field.rs:28:9 | LL | S { x: 0 }; //~ ERROR private | ^^^^ field `x` is private error: aborting due to previous error For more information about this error, try `rustc --explain E0451`.