From 64d98f8ee037282c35007b64c2649055c56af1db Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:03 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/borrowck/two-phase-multi-mut.stderr | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/ui/borrowck/two-phase-multi-mut.stderr (limited to 'tests/ui/borrowck/two-phase-multi-mut.stderr') diff --git a/tests/ui/borrowck/two-phase-multi-mut.stderr b/tests/ui/borrowck/two-phase-multi-mut.stderr new file mode 100644 index 000000000..2e53e17a3 --- /dev/null +++ b/tests/ui/borrowck/two-phase-multi-mut.stderr @@ -0,0 +1,23 @@ +error[E0499]: cannot borrow `foo` as mutable more than once at a time + --> $DIR/two-phase-multi-mut.rs:11:5 + | +LL | foo.method(&mut foo); + | ^^^^------^--------^ + | | | | + | | | first mutable borrow occurs here + | | first borrow later used by call + | second mutable borrow occurs here + +error[E0499]: cannot borrow `foo` as mutable more than once at a time + --> $DIR/two-phase-multi-mut.rs:11:16 + | +LL | foo.method(&mut foo); + | -----------^^^^^^^^- + | | | | + | | | second mutable borrow occurs here + | | first borrow later used by call + | first mutable borrow occurs here + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0499`. -- cgit v1.2.3