From 6870638c3fb66c2abb20633bf40cc09ccc760047 Mon Sep 17 00:00:00 2001 From: daxpedda Date: Sun, 16 Dec 2018 22:20:05 +0100 Subject: [PATCH] Fix an endless loop in the tests. --- tests/ui/implicit_return.rs | 4 ++-- tests/ui/implicit_return.stderr | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/ui/implicit_return.rs b/tests/ui/implicit_return.rs index 61cb35e12..9fb301352 100644 --- a/tests/ui/implicit_return.rs +++ b/tests/ui/implicit_return.rs @@ -55,10 +55,10 @@ fn test_loop_with_block() -> bool { fn test_loop_with_nests() -> bool { loop { if true { - let _ = true; + break true; } else { - break true; + let _ = true; } } } diff --git a/tests/ui/implicit_return.stderr b/tests/ui/implicit_return.stderr index 6d0761554..b3562b670 100644 --- a/tests/ui/implicit_return.stderr +++ b/tests/ui/implicit_return.stderr @@ -43,9 +43,9 @@ error: missing return statement | ^^^^^^^^^^ help: change `break` to `return` as shown: `return true` error: missing return statement - --> $DIR/implicit_return.rs:61:13 + --> $DIR/implicit_return.rs:58:13 | -61 | break true; +58 | break true; | ^^^^^^^^^^ help: change `break` to `return` as shown: `return true` error: missing return statement