mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-18 07:36:28 +00:00
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() {}
|