Guide: Add missing integer type to section on if expressions

This commit is contained in:
Andreas Tolfsen 2014-08-13 15:58:12 +01:00
parent 9d554212de
commit 0edc55dc21

View File

@ -666,7 +666,7 @@ This is not the same as this, which won't compile:
```{ignore}
let x = 5i;
let y: int = if x == 5 { 10i; } else { 15i; };
let y: int = if x == 5i { 10i; } else { 15i; };
```
Note the semicolons after the 10 and 15. Rust will give us the following error: