summaryrefslogtreecommitdiffstats
path: root/src/test/ui/nll/capture-ref-in-struct.stderr
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/nll/capture-ref-in-struct.stderr15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/nll/capture-ref-in-struct.stderr b/src/test/ui/nll/capture-ref-in-struct.stderr
new file mode 100644
index 000000000..cdfe7f6db
--- /dev/null
+++ b/src/test/ui/nll/capture-ref-in-struct.stderr
@@ -0,0 +1,15 @@
+error[E0597]: `y` does not live long enough
+ --> $DIR/capture-ref-in-struct.rs:18:16
+ |
+LL | y: &y,
+ | ^^ borrowed value does not live long enough
+...
+LL | }
+ | - `y` dropped here while still borrowed
+LL |
+LL | deref(p);
+ | - borrow later used here
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0597`.