From 6d569a488ed3ae2d48bc1ba7a2501e4c44e6a63b Mon Sep 17 00:00:00 2001 From: DaErich Date: Thu, 9 Sep 2021 15:32:18 +0200 Subject: [PATCH] if_expr.md: Outline behavior regarding rustc E0317 --- src/expressions/if-expr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/expressions/if-expr.md b/src/expressions/if-expr.md index 591437fc9..380312961 100644 --- a/src/expressions/if-expr.md +++ b/src/expressions/if-expr.md @@ -16,7 +16,7 @@ The condition operands must have the [boolean type]. If a condition operand evaluates to `true`, the consequent block is executed and any subsequent `else if` or `else` block is skipped. If a condition operand evaluates to `false`, the consequent block is skipped and any subsequent `else if` condition is evaluated. If all `if` and `else if` conditions evaluate to `false` then any `else` block is executed. -An if expression evaluates to the same value as the executed block, or `()` if no block is evaluated. +An if expression evaluates to the same value as the executed block, or `()` if not any block's final operand expression can (possibly) be evaluated. An `if` expression must have the same type in all situations. ```rust