summaryrefslogtreecommitdiffstats
path: root/src/test/ui/regions/regions-return-stack-allocated-vec.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/regions/regions-return-stack-allocated-vec.stderr')
-rw-r--r--src/test/ui/regions/regions-return-stack-allocated-vec.stderr12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/regions/regions-return-stack-allocated-vec.stderr b/src/test/ui/regions/regions-return-stack-allocated-vec.stderr
new file mode 100644
index 000000000..9d87fe266
--- /dev/null
+++ b/src/test/ui/regions/regions-return-stack-allocated-vec.stderr
@@ -0,0 +1,12 @@
+error[E0515]: cannot return reference to temporary value
+ --> $DIR/regions-return-stack-allocated-vec.rs:4:5
+ |
+LL | &[x]
+ | ^---
+ | ||
+ | |temporary value created here
+ | returns a reference to data owned by the current function
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0515`.