mirror of
https://github.com/openharmony/third_party_rust_rust.git
synced 2026-08-27 09:51:29 -04:00
4a2049a81e
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() {}
|