mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
433da1fc04
They pass fine.
16 lines
173 B
Rust
16 lines
173 B
Rust
pub struct Foo {
|
|
x: u32,
|
|
}
|
|
|
|
impl Foo {
|
|
pub fn print(&self) {
|
|
println!("{}", self.x);
|
|
}
|
|
}
|
|
|
|
pub fn make_foo(x: u32) -> Foo {
|
|
Foo { x }
|
|
}
|
|
|
|
fn main() {}
|