From 581f5a40081a52d59ddf04a8f2727bf6b02f893e Mon Sep 17 00:00:00 2001 From: Igor Petruk Date: Mon, 23 Jan 2023 12:03:06 +0000 Subject: [PATCH] Update blocks.md (#235) Adding the important note about ";" in blocks. --- src/control-flow/blocks.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/control-flow/blocks.md b/src/control-flow/blocks.md index f21d3687..b86a3c40 100644 --- a/src/control-flow/blocks.md +++ b/src/control-flow/blocks.md @@ -34,3 +34,5 @@ fn main() { println!("doubled: {}", double(7)); } ``` + +However if the last expression ends with `;`, then the resulting value and type is `()`.