diff options
Diffstat (limited to 'tests/ui/privacy/private-struct-field-cross-crate.rs')
-rw-r--r-- | tests/ui/privacy/private-struct-field-cross-crate.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/privacy/private-struct-field-cross-crate.rs b/tests/ui/privacy/private-struct-field-cross-crate.rs new file mode 100644 index 000000000..301cd37b7 --- /dev/null +++ b/tests/ui/privacy/private-struct-field-cross-crate.rs @@ -0,0 +1,9 @@ +// aux-build:cci_class.rs +extern crate cci_class; +use cci_class::kitties::cat; + +fn main() { + let nyan : cat = cat(52, 99); + assert_eq!(nyan.meows, 52); + //~^ ERROR field `meows` of struct `cat` is private +} |