summaryrefslogtreecommitdiffstats
path: root/src/test/ui/box/leak-alloc.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/box/leak-alloc.stderr')
-rw-r--r--src/test/ui/box/leak-alloc.stderr15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/box/leak-alloc.stderr b/src/test/ui/box/leak-alloc.stderr
new file mode 100644
index 000000000..e8a6ad099
--- /dev/null
+++ b/src/test/ui/box/leak-alloc.stderr
@@ -0,0 +1,15 @@
+error[E0505]: cannot move out of `alloc` because it is borrowed
+ --> $DIR/leak-alloc.rs:26:10
+ |
+LL | let boxed = Box::new_in(10, alloc.by_ref());
+ | -------------- borrow of `alloc` occurs here
+LL | let theref = Box::leak(boxed);
+LL | drop(alloc);
+ | ^^^^^ move out of `alloc` occurs here
+LL |
+LL | use_value(*theref)
+ | ------- borrow later used here
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0505`.