blob: 347c8aeed697e96b2a83511558f246d919e11700 [file] [log] [blame]
// aux-build:struct_field_privacy.rs
extern crate struct_field_privacy as xc;
use xc::B;
struct A {
pub a: u32,
b: u32,
}
fn main () {
// external crate struct
let k = B {
aa: 20,
//~^ ERROR struct `xc::B` has no field named `aa`
bb: 20,
//~^ ERROR struct `xc::B` has no field named `bb`
};
// local crate struct
let l = A {
aa: 20,
//~^ ERROR struct `A` has no field named `aa`
bb: 20,
//~^ ERROR struct `A` has no field named `bb`
};
}