File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: e430a699f2c60890d9b86069fd0c68a70ece7120
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
- refs/heads/snap-stage3: 096bcd59b8f306a9f638058061e8f0e4ddeabae7
4
+ refs/heads/snap-stage3: e3f458e6390d66b9634e7dce4aa7e91c091aebc6
5
5
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
Original file line number Diff line number Diff line change @@ -240,8 +240,13 @@ let monster_size: int = 50;
240
240
~~~~
241
241
242
242
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; ` .
245
250
246
251
Rust identifiers follow the same rules as C; they start with an alphabetic
247
252
character or an underscore, and after that may contain any sequence of
You can’t perform that action at this time.
0 commit comments