Skip to content

Commit 0004953

Browse files
Zooko Wilcox-O'Hearnalexcrichton
Zooko Wilcox-O'Hearn
authored andcommitted
add a line to the example to clarify semantics
This is to clarify that match construct doesn't define a new variable, since I observed a person reading the Rust tutorial who seemed to incorrectly think that it did. Fixes #13571 .
1 parent ef23fa1 commit 0004953

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/doc/tutorial.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ against each pattern in order until one matches. The matching pattern
455455
executes its corresponding arm.
456456

457457
~~~~
458-
# let my_number = 1;
458+
let my_number = 1;
459459
match my_number {
460460
0 => println!("zero"),
461461
1 | 2 => println!("one or two"),

0 commit comments

Comments
 (0)