2015-01-08 21:54:35 +11:00
|
|
|
fn foo(x: Box<isize>) -> isize {
|
2013-03-15 15:24:24 -04:00
|
|
|
let y = &*x;
|
2019-04-22 08:40:08 +01:00
|
|
|
free(x); //~ ERROR cannot move out of `x` because it is borrowed
|
2012-08-02 16:00:45 -07:00
|
|
|
*y
|
|
|
|
}
|
|
|
|
|
2015-01-08 21:54:35 +11:00
|
|
|
fn free(_x: Box<isize>) {
|
2012-08-02 16:00:45 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2012-12-06 11:08:23 -08:00
|
|
|
}
|