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