]> git.proxmox.com Git - rustc.git/blame - src/test/ui/suggestions/suggest-private-fields.rs
Update (un)suspicious files
[rustc.git] / src / test / ui / suggestions / suggest-private-fields.rs
CommitLineData
c34b1796
AL
1// aux-build:struct_field_privacy.rs
2
3extern crate struct_field_privacy as xc;
4
5use xc::B;
6
7struct A {
8 pub a: u32,
9 b: u32,
10}
11
12fn main () {
13 // external crate struct
14 let k = B {
9e0c209e 15 aa: 20,
1b1a35ee 16 //~^ ERROR struct `B` has no field named `aa`
9e0c209e 17 bb: 20,
1b1a35ee 18 //~^ ERROR struct `B` has no field named `bb`
c34b1796
AL
19 };
20 // local crate struct
21 let l = A {
9e0c209e
SL
22 aa: 20,
23 //~^ ERROR struct `A` has no field named `aa`
9e0c209e
SL
24 bb: 20,
25 //~^ ERROR struct `A` has no field named `bb`
c34b1796
AL
26 };
27}