From c23a457e72abe608715ac76f076f47dc42af07a5 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 20:31:44 +0200 Subject: Merging upstream version 1.74.1+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/lint/must_not_suspend/ref.stderr | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tests/ui/lint/must_not_suspend/ref.stderr (limited to 'tests/ui/lint/must_not_suspend/ref.stderr') diff --git a/tests/ui/lint/must_not_suspend/ref.stderr b/tests/ui/lint/must_not_suspend/ref.stderr new file mode 100644 index 000000000..ed91a4a0b --- /dev/null +++ b/tests/ui/lint/must_not_suspend/ref.stderr @@ -0,0 +1,27 @@ +error: reference to `Umm` held across a suspend point, but should not be + --> $DIR/ref.rs:18:13 + | +LL | let guard = &mut self.u; + | ^^^^^ +LL | +LL | other().await; + | ----- the value is held across this suspend point + | +note: You gotta use Umm's, ya know? + --> $DIR/ref.rs:18:13 + | +LL | let guard = &mut self.u; + | ^^^^^ +help: consider using a block (`{ ... }`) to shrink the value's scope, ending before the suspend point + --> $DIR/ref.rs:18:13 + | +LL | let guard = &mut self.u; + | ^^^^^ +note: the lint level is defined here + --> $DIR/ref.rs:3:9 + | +LL | #![deny(must_not_suspend)] + | ^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + -- cgit v1.2.3