about summary refs log tree commit diff
path: root/tests/ui/nll/capture-ref-in-struct.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/nll/capture-ref-in-struct.stderr')
-rw-r--r--tests/ui/nll/capture-ref-in-struct.stderr15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/nll/capture-ref-in-struct.stderr b/tests/ui/nll/capture-ref-in-struct.stderr
new file mode 100644
index 00000000000..cdfe7f6db82
--- /dev/null
+++ b/tests/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`.