]> git.lizzy.rs Git - rust.git/blob - src/test/ui/privacy/union-field-privacy-2.rs
Merge commit '3e7c6dec244539970b593824334876f8b6ed0b18' into clippyup
[rust.git] / src / test / ui / privacy / union-field-privacy-2.rs
1 mod m {
2     pub union U {
3         pub a: u8,
4         pub(super) b: u8,
5         c: u8,
6     }
7 }
8
9 fn main() {
10     let u = m::U { a: 10 };
11
12     let a = u.a; // OK
13     let b = u.b; // OK
14     let c = u.c; //~ ERROR field `c` of union `U` is private
15 }