]> git.lizzy.rs Git - rust.git/blob - tests/ui/box/leak-alloc.stderr
Auto merge of #106711 - albertlarsan68:use-ci-llvm-when-lld, r=jyn514
[rust.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 boxed = Box::new_in(10, alloc.by_ref());
5    |                                 -------------- borrow of `alloc` occurs here
6 LL |     let theref = Box::leak(boxed);
7 LL |     drop(alloc);
8    |          ^^^^^ move out of `alloc` occurs here
9 LL |
10 LL |     use_value(*theref)
11    |               ------- borrow later used here
12
13 error: aborting due to previous error
14
15 For more information about this error, try `rustc --explain E0505`.