rustc/tests/ui/autoref-autoderef/autoderef-and-borrow-method-receiver.rs
2025-02-17 11:14:05 +01:00

18 lines
154 B
Rust

//@ run-pass
#![allow(dead_code)]
struct Foo {
x: isize,
}
impl Foo {
pub fn f(&self) {}
}
fn g(x: &mut Foo) {
x.f();
}
pub fn main() {
}