]> git.lizzy.rs Git - rust.git/commitdiff
add link to match section
authorAlex Burka <durka42+github@gmail.com>
Thu, 28 Apr 2016 15:47:03 +0000 (11:47 -0400)
committerAlex Burka <durka42+github@gmail.com>
Thu, 28 Apr 2016 15:47:03 +0000 (11:47 -0400)
src/doc/book/structs.md

index eace99670b1ef45274231fdf6e9fa0ceda662907..1fb74e33a622f203d15f3df135e7559d5ec1b35e 100644 (file)
@@ -179,6 +179,9 @@ let black_r = black.0;
 let Point(_, origin_y, origin_z) = origin;
 ```
 
+Patterns like `Point(_, origin_y, origin_z)` are also used in
+[match expressions][match].
+
 One case when a tuple struct is very useful is when it has only one element.
 We call this the ‘newtype’ pattern, because it allows you to create a new type
 that is distinct from its contained value and also expresses its own semantic
@@ -224,6 +227,8 @@ Good names are important, and while values in a tuple struct can be
 referenced with dot notation as well, a `struct` gives us actual names,
 rather than positions.
 
+[match]: match.html
+
 # Unit-like structs
 
 You can define a `struct` with no members at all: