]> git.lizzy.rs Git - rust.git/blob - src/test/ui/error-codes/ex-E0611.rs
Rollup merge of #59056 - scottmcm:even-fewer-lifetimes, r=sfackler
[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 `a::Foo` is private
12 }