mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
13 lines
192 B
Rust
13 lines
192 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 `Foo` is private
|
|
}
|