Skip to content

Commit

Permalink
add a line to the example to clarify semantics
Browse files Browse the repository at this point in the history
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 .
  • Loading branch information
Zooko Wilcox-O'Hearn committed May 12, 2014
1 parent c690bda commit 1f6595c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/doc/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ against each pattern in order until one matches. The matching pattern
executes its corresponding arm.
~~~~
# let my_number = 1;
let my_number = 1;
match my_number {
0 => println!("zero"),
1 | 2 => println!("one or two"),
Expand Down

4 comments on commit 1f6595c

@bors
Copy link
Contributor

@bors bors commented on 1f6595c May 13, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from huonw
at zookoatleastauthoritycom@1f6595c

@bors
Copy link
Contributor

@bors bors commented on 1f6595c May 13, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging zookoatleastauthoritycom/rust/zooko/rust/issue-13571 = 1f6595c into auto

@bors
Copy link
Contributor

@bors bors commented on 1f6595c May 13, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zookoatleastauthoritycom/rust/zooko/rust/issue-13571 = 1f6595c merged ok, testing candidate = 3078d5a7

@bors
Copy link
Contributor

@bors bors commented on 1f6595c May 13, 2014

Please sign in to comment.