diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2025-04-07 19:13:16 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2025-04-07 19:43:41 +0300 |
| commit | fd854a772e12ee51c0028e9dbb9443d831e28327 (patch) | |
| tree | b62816c1ea151384c3a7ee80901b95be9a49ef77 /tests/ui/moves/nested-loop-moved-value-wrong-continue.rs | |
| parent | 5c160f511e321a89eef01fcf17c6cc4c0f4e5c00 (diff) | |
| download | rust-fd854a772e12ee51c0028e9dbb9443d831e28327.tar.gz rust-fd854a772e12ee51c0028e9dbb9443d831e28327.zip | |
compiletest: Avoid ignoring empty diagnostics in one more place
This catches some silly notes emitted by rustc, which should ideally be fixed
Diffstat (limited to 'tests/ui/moves/nested-loop-moved-value-wrong-continue.rs')
| -rw-r--r-- | tests/ui/moves/nested-loop-moved-value-wrong-continue.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/ui/moves/nested-loop-moved-value-wrong-continue.rs b/tests/ui/moves/nested-loop-moved-value-wrong-continue.rs index 0235b291df5..87800d314ed 100644 --- a/tests/ui/moves/nested-loop-moved-value-wrong-continue.rs +++ b/tests/ui/moves/nested-loop-moved-value-wrong-continue.rs @@ -9,6 +9,8 @@ fn foo() { //~| NOTE inside of this loop //~| HELP consider moving the expression out of the loop //~| NOTE in this expansion of desugaring of `for` loop + //~| NOTE + //~| NOTE baz.push(foo); //~^ NOTE value moved here //~| HELP consider cloning the value @@ -30,17 +32,19 @@ fn main() { for foo in foos { //~^ NOTE this reinitialization might get skipped //~| NOTE move occurs because `foo` has type `String` + //~| NOTE for bar in &bars { //~^ NOTE inside of this loop //~| HELP consider moving the expression out of the loop //~| NOTE in this expansion of desugaring of `for` loop + //~| NOTE if foo == *bar { baz.push(foo); //~^ NOTE value moved here //~| HELP consider cloning the value continue; //~^ NOTE verify that your loop breaking logic is correct - //~| NOTE this `continue` advances the loop at line 33 + //~| NOTE this `continue` advances the loop at line 36 } } qux.push(foo); |
