rust/src/test/ui/error-codes/ex-E0611.rs
2018-12-25 21:08:33 -07:00

12 lines
195 B
Rust

mod a {
pub struct Foo(u32);
impl Foo {
pub fn new() -> Foo { Foo(0) }
}
}
fn main() {
let y = a::Foo::new();
y.0; //~ ERROR field `0` of struct `a::Foo` is private
}