summaryrefslogtreecommitdiffstats
path: root/tests/ui/borrowck/issue-46471.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/borrowck/issue-46471.stderr')
-rw-r--r--tests/ui/borrowck/issue-46471.stderr9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/borrowck/issue-46471.stderr b/tests/ui/borrowck/issue-46471.stderr
new file mode 100644
index 000000000..935414c1f
--- /dev/null
+++ b/tests/ui/borrowck/issue-46471.stderr
@@ -0,0 +1,9 @@
+error[E0515]: cannot return reference to local variable `x`
+ --> $DIR/issue-46471.rs:3:5
+ |
+LL | &x
+ | ^^ 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`.