mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 17:53:56 +00:00
15 lines
187 B
Rust
15 lines
187 B
Rust
mod a {
|
|
pub struct Foo {
|
|
x: u32,
|
|
}
|
|
|
|
impl Foo {
|
|
pub fn new() -> Foo { Foo { x: 0 } }
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
let f = a::Foo::new();
|
|
f.x; //~ ERROR E0616
|
|
}
|