summaryrefslogtreecommitdiffstats
path: root/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.rs')
-rw-r--r--src/test/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.rs b/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.rs
new file mode 100644
index 000000000..57871b098
--- /dev/null
+++ b/src/test/ui/regions/regions-reborrow-from-shorter-mut-ref-mut-ref.rs
@@ -0,0 +1,9 @@
+// Issue #8624. Test for reborrowing with 3 levels, not just two.
+
+fn copy_borrowed_ptr<'a, 'b, 'c>(p: &'a mut &'b mut &'c mut isize) -> &'b mut isize {
+ &mut ***p
+ //~^ ERROR lifetime may not live long enough
+}
+
+fn main() {
+}