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