Skip to content

Commit 166af1c

Browse files
committed
---
yaml --- r: 22302 b: refs/heads/snap-stage3 c: e3f458e h: refs/heads/master v: v3
1 parent 488a788 commit 166af1c

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: e430a699f2c60890d9b86069fd0c68a70ece7120
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 096bcd59b8f306a9f638058061e8f0e4ddeabae7
4+
refs/heads/snap-stage3: e3f458e6390d66b9634e7dce4aa7e91c091aebc6
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/doc/tutorial.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,13 @@ let monster_size: int = 50;
240240
~~~~
241241

242242
Local variables may shadow earlier declarations, as in the previous
243-
example in which `my_favorite_value` is first declared as a `float`
244-
then a second `my_favorite_value` is declared as an int.
243+
example in which `monster_size` is first declared as a `float`
244+
then a second `monster_size` is declared as an int. If you were to actually
245+
compile this example though, the compiler will see that the second
246+
`monster_size` is unused, assume that you have made a mistake, and issue
247+
a warning. For occasions where unused variables are intentional, their
248+
name may be prefixed with an underscore to silence the warning, like
249+
`let _monster_size = 50;`.
245250

246251
Rust identifiers follow the same rules as C; they start with an alphabetic
247252
character or an underscore, and after that may contain any sequence of

0 commit comments

Comments
 (0)