From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/borrowck/borrowck-move-mut-base-ptr.stderr | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/ui/borrowck/borrowck-move-mut-base-ptr.stderr (limited to 'tests/ui/borrowck/borrowck-move-mut-base-ptr.stderr') diff --git a/tests/ui/borrowck/borrowck-move-mut-base-ptr.stderr b/tests/ui/borrowck/borrowck-move-mut-base-ptr.stderr new file mode 100644 index 000000000..d5ff0c501 --- /dev/null +++ b/tests/ui/borrowck/borrowck-move-mut-base-ptr.stderr @@ -0,0 +1,14 @@ +error[E0505]: cannot move out of `t0` because it is borrowed + --> $DIR/borrowck-move-mut-base-ptr.rs:10:14 + | +LL | let p: &isize = &*t0; // Freezes `*t0` + | ---- borrow of `*t0` occurs here +LL | let t1 = t0; + | ^^ move out of `t0` occurs here +LL | *t1 = 22; +LL | p.use_ref(); + | ----------- borrow later used here + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0505`. -- cgit v1.2.3