rust/src/test/run-pass/borrowck-wg-borrow-mut-to-imm-2.rs

14 lines
135 B
Rust

struct Cat;
fn bar(_: &Cat) {
}
fn foo(cat: &mut Cat) {
bar(&*cat);
}
pub fn main() {
let mut mimi = ~Cat;
foo(mimi);
}