fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
612 B17 linesraw
1error[E0505]: cannot move out of `alloc` because it is borrowed
2  --> $DIR/leak-alloc.rs:26:10
3   |
4LL |     let alloc = Alloc {};
5   |         ----- binding `alloc` declared here
6LL |     let boxed = Box::new_in(10, alloc.by_ref());
7   |                                 ----- borrow of `alloc` occurs here
8LL |     let theref = Box::leak(boxed);
9LL |     drop(alloc);
10   |          ^^^^^ move out of `alloc` occurs here
11LL |
12LL |     use_value(*theref)
13   |               ------- borrow later used here
14
15error: aborting due to previous error
16
17For more information about this error, try `rustc --explain E0505`.