summaryrefslogtreecommitdiffstats
path: root/tests/ui/nll/user-annotations/promoted-annotation.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/nll/user-annotations/promoted-annotation.stderr')
-rw-r--r--tests/ui/nll/user-annotations/promoted-annotation.stderr17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/nll/user-annotations/promoted-annotation.stderr b/tests/ui/nll/user-annotations/promoted-annotation.stderr
new file mode 100644
index 000000000..cb99a6a36
--- /dev/null
+++ b/tests/ui/nll/user-annotations/promoted-annotation.stderr
@@ -0,0 +1,17 @@
+error[E0597]: `x` does not live long enough
+ --> $DIR/promoted-annotation.rs:6:7
+ |
+LL | fn foo<'a>() {
+ | -- lifetime `'a` defined here
+LL | let x = 0;
+LL | let f = &drop::<&'a i32>;
+ | ---------------- assignment requires that `x` is borrowed for `'a`
+LL | f(&x);
+ | ^^ borrowed value does not live long enough
+LL |
+LL | }
+ | - `x` dropped here while still borrowed
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0597`.