]> git.proxmox.com Git - rustc.git/blob - src/test/ui/privacy/private-struct-field.rs
New upstream version 1.49.0+dfsg1
[rustc.git] / src / test / ui / privacy / private-struct-field.rs
1 mod cat {
2 pub struct Cat {
3 meows: usize
4 }
5
6 pub fn new_cat() -> Cat {
7 Cat { meows: 52 }
8 }
9 }
10
11 fn main() {
12 let nyan = cat::new_cat();
13 assert_eq!(nyan.meows, 52); //~ ERROR field `meows` of struct `Cat` is private
14 }