summaryrefslogtreecommitdiffstats
path: root/src/test/ui/span/mut-ptr-cant-outlive-ref.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/span/mut-ptr-cant-outlive-ref.stderr')
-rw-r--r--src/test/ui/span/mut-ptr-cant-outlive-ref.stderr14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/span/mut-ptr-cant-outlive-ref.stderr b/src/test/ui/span/mut-ptr-cant-outlive-ref.stderr
new file mode 100644
index 000000000..4d976a7bb
--- /dev/null
+++ b/src/test/ui/span/mut-ptr-cant-outlive-ref.stderr
@@ -0,0 +1,14 @@
+error[E0597]: `b` does not live long enough
+ --> $DIR/mut-ptr-cant-outlive-ref.rs:8:15
+ |
+LL | p = &*b;
+ | ^ borrowed value does not live long enough
+LL | }
+ | - `b` dropped here while still borrowed
+LL |
+LL | p.use_ref();
+ | ----------- borrow later used here
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0597`.