From 64d98f8ee037282c35007b64c2649055c56af1db Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:03 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- .../ui/rfc-2497-if-let-chains/chains-without-let.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/ui/rfc-2497-if-let-chains/chains-without-let.rs (limited to 'tests/ui/rfc-2497-if-let-chains/chains-without-let.rs') diff --git a/tests/ui/rfc-2497-if-let-chains/chains-without-let.rs b/tests/ui/rfc-2497-if-let-chains/chains-without-let.rs new file mode 100644 index 000000000..e0dded152 --- /dev/null +++ b/tests/ui/rfc-2497-if-let-chains/chains-without-let.rs @@ -0,0 +1,20 @@ +fn and_chain() { + let z; + if true && { z = 3; true} && z == 3 {} + //~^ ERROR E0381 +} + +fn and_chain_2() { + let z; + true && { z = 3; true} && z == 3; + //~^ ERROR E0381 +} + +fn or_chain() { + let z; + if false || { z = 3; false} || z == 3 {} + //~^ ERROR E0381 +} + +fn main() { +} -- cgit v1.2.3