16 lines
110 B
Rust
16 lines
110 B
Rust
|
struct Foo {
|
||
|
x: int;
|
||
|
}
|
||
|
|
||
|
impl Foo {
|
||
|
fn f(&self) {}
|
||
|
}
|
||
|
|
||
|
fn g(x: &mut Foo) {
|
||
|
x.f();
|
||
|
}
|
||
|
|
||
|
fn main() {
|
||
|
}
|
||
|
|