1 // aux-build:struct_field_privacy.rs
3 extern crate struct_field_privacy as xc;
18 pub struct Z(pub isize, isize);
21 fn test(a: A, b: inner::A, c: inner::B, d: xc::A, e: xc::B, z: inner::Z) {
23 b.a; //~ ERROR: field `a` of struct `inner::A` is private
26 c.b; //~ ERROR: field `b` of struct `inner::B` is private
28 d.a; //~ ERROR: field `a` of struct `xc::A` is private
32 e.b; //~ ERROR: field `b` of struct `xc::B` is private
35 z.1; //~ ERROR: field `1` of struct `Z` is private