error[E0616]: field `x` of struct `a::Foo` is private --> $DIR/E0616.rs:13:5 | LL | f.x; | ^^^ error: aborting due to previous error For more information about this error, try `rustc --explain E0616`.