rust/src/test/run-pass/autoderef-and-borrow-method-receiver.rs

16 lines
116 B
Rust

struct Foo {
x: int,
}
impl Foo {
fn f(&const self) {}
}
fn g(x: &mut Foo) {
x.f();
}
fn main() {
}