1 error[E0505]: cannot move out of `alloc` because it is borrowed
2 --> $DIR/leak-alloc.rs:26:10
4 LL | let boxed = Box::new_in(10, alloc.by_ref());
5 | -------------- borrow of `alloc` occurs here
6 LL | let theref = Box::leak(boxed);
8 | ^^^^^ move out of `alloc` occurs here
10 LL | use_value(*theref)
11 | ------- borrow later used here
13 error: aborting due to previous error
15 For more information about this error, try `rustc --explain E0505`.