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

14 lines
131 B
Rust
Raw Normal View History

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