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/generator/yield-in-initializer.stderr | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/ui/generator/yield-in-initializer.stderr (limited to 'tests/ui/generator/yield-in-initializer.stderr') diff --git a/tests/ui/generator/yield-in-initializer.stderr b/tests/ui/generator/yield-in-initializer.stderr new file mode 100644 index 000000000..ed14a2e32 --- /dev/null +++ b/tests/ui/generator/yield-in-initializer.stderr @@ -0,0 +1,17 @@ +warning: unused generator that must be used + --> $DIR/yield-in-initializer.rs:6:5 + | +LL | / static || { +LL | | loop { +LL | | // Test that `opt` is not live across the yield, even when borrowed in a loop +LL | | // See https://github.com/rust-lang/rust/issues/52792 +... | +LL | | } +LL | | }; + | |_____^ + | + = note: generators are lazy and do nothing unless resumed + = note: `#[warn(unused_must_use)]` on by default + +warning: 1 warning emitted + -- cgit v1.2.3