summaryrefslogtreecommitdiffstats
path: root/src/test/ui/nll/issue-68550.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/nll/issue-68550.stderr')
-rw-r--r--src/test/ui/nll/issue-68550.stderr16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/nll/issue-68550.stderr b/src/test/ui/nll/issue-68550.stderr
new file mode 100644
index 000000000..e234ebb04
--- /dev/null
+++ b/src/test/ui/nll/issue-68550.stderr
@@ -0,0 +1,16 @@
+error[E0597]: `x` does not live long enough
+ --> $DIR/issue-68550.rs:12:20
+ |
+LL | fn run<'a, A>(x: A)
+ | -- lifetime `'a` defined here
+...
+LL | let _: &'a A = &x;
+ | ----- ^^ borrowed value does not live long enough
+ | |
+ | type annotation requires that `x` is borrowed for `'a`
+LL | }
+ | - `x` dropped here while still borrowed
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0597`.