mirror of
https://github.com/edg-l/edlang.git
synced 2024-11-23 00:18:24 +00:00
19 lines
215 B
Rust
19 lines
215 B
Rust
|
|
struct Hello {
|
|
a: i32,
|
|
b: i64,
|
|
}
|
|
|
|
pub fn main() -> i64 {
|
|
let mut x: Hello = Hello {
|
|
a: 2,
|
|
b: 3,
|
|
};
|
|
hello(&mut x);
|
|
return x.b;
|
|
}
|
|
|
|
pub fn hello(a: &mut Hello) {
|
|
a.b = 5;
|
|
}
|