mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
433da1fc04
They pass fine.
14 lines
159 B
Rust
14 lines
159 B
Rust
pub struct Bar {
|
|
x: u32,
|
|
}
|
|
|
|
impl Bar {
|
|
pub fn print(&self) {
|
|
println!("{}", self.x);
|
|
}
|
|
}
|
|
|
|
pub fn make_bar(x: u32) -> Bar {
|
|
Bar { x }
|
|
}
|