From 0004953c3a29a884d1e772e8874096f21e3b6513 Mon Sep 17 00:00:00 2001 From: Zooko Wilcox-O'Hearn Date: Mon, 12 May 2014 03:57:04 +0000 Subject: [PATCH] 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 https://github.com/mozilla/rust/issues/13571 . --- src/doc/tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/tutorial.md b/src/doc/tutorial.md index 454d5cf9ddfa7..7dd31f9cc77c6 100644 --- a/src/doc/tutorial.md +++ b/src/doc/tutorial.md @@ -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"),