From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/let-else/let-else-bool-binop-init.rs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/test/ui/let-else/let-else-bool-binop-init.rs (limited to 'src/test/ui/let-else/let-else-bool-binop-init.rs') diff --git a/src/test/ui/let-else/let-else-bool-binop-init.rs b/src/test/ui/let-else/let-else-bool-binop-init.rs new file mode 100644 index 000000000..e443fb0d6 --- /dev/null +++ b/src/test/ui/let-else/let-else-bool-binop-init.rs @@ -0,0 +1,8 @@ +// run-rustfix + +#![feature(let_else)] + +fn main() { + let true = true && false else { return }; //~ ERROR a `&&` expression cannot be directly assigned in `let...else` + let true = true || false else { return }; //~ ERROR a `||` expression cannot be directly assigned in `let...else` +} -- cgit v1.2.3