]> git.lizzy.rs Git - rust.git/blob - src/test/ui/error-codes/ex-E0611.rs
Auto merge of #106143 - matthiaskrgr:rollup-3kpy1dc, r=matthiaskrgr
[rust.git] / src / test / ui / error-codes / ex-E0611.rs
1 mod a {
2     pub struct Foo(u32);
3
4     impl Foo {
5         pub fn new() -> Foo { Foo(0) }
6     }
7 }
8
9 fn main() {
10    let y = a::Foo::new();
11    y.0; //~ ERROR field `0` of struct `Foo` is private
12 }