diff options
Diffstat (limited to 'src/test/ui/let-else/let-else-bool-binop-init.fixed')
-rw-r--r-- | src/test/ui/let-else/let-else-bool-binop-init.fixed | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/ui/let-else/let-else-bool-binop-init.fixed b/src/test/ui/let-else/let-else-bool-binop-init.fixed new file mode 100644 index 000000000..e47f7f23d --- /dev/null +++ b/src/test/ui/let-else/let-else-bool-binop-init.fixed @@ -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` +} |