From a4b7ed7a42c716ab9f05e351f003d589124fd55d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:18:58 +0200 Subject: Adding upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/regions/regions-adjusted-lvalue-op.stderr | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/ui/regions/regions-adjusted-lvalue-op.stderr (limited to 'tests/ui/regions/regions-adjusted-lvalue-op.stderr') diff --git a/tests/ui/regions/regions-adjusted-lvalue-op.stderr b/tests/ui/regions/regions-adjusted-lvalue-op.stderr new file mode 100644 index 000000000..2c5563444 --- /dev/null +++ b/tests/ui/regions/regions-adjusted-lvalue-op.stderr @@ -0,0 +1,21 @@ +error[E0502]: cannot borrow `v` as immutable because it is also borrowed as mutable + --> $DIR/regions-adjusted-lvalue-op.rs:14:16 + | +LL | v[0].oh_no(&v); + | - ----- ^^ immutable borrow occurs here + | | | + | | mutable borrow later used by call + | mutable borrow occurs here + +error[E0502]: cannot borrow `v` as immutable because it is also borrowed as mutable + --> $DIR/regions-adjusted-lvalue-op.rs:15:16 + | +LL | (*v).oh_no(&v); + | - ----- ^^ immutable borrow occurs here + | | | + | | mutable borrow later used by call + | mutable borrow occurs here + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0502`. -- cgit v1.2.3