Change:
The second example for the bindings contains advanced syntax that the reader has not seen (at leat to the best of my knowledge when skipping "learn rust"). Those bits: This business is new and the matching of the inner type far from obvious. Even the format string is not explained. As an aside: There is no index that would find where is actually covered in the book. (Otherwise: Well done on the book!)
Both the and that use of are forward references within the same page. So just reordering a bit would help a lot.
Thanks! Yeah, this can certainly use some cleaning up.

Discussion:
This prints `one or two`. <del> # Ranges </del> <ins> # Destructuring </ins> <del> You can match a range of values with `...`: </del> <ins> If you have a compound data type, like a [`struct`][struct], you can destructure it inside of a pattern: </ins> ```rust <del> let x = 1; match x { 1 ... 5 => println!("one through five"), _ => println!("anything"), </del> <ins> struct Point { x: i32, y: i32, </ins> } <del> ``` This prints `one through five`. Ranges are mostly used with integers and `char`s: ```rust let x = '💅'; </del> <ins> let origin = Point { x: 0, y: 0 }; </ins> <del> match x { 'a' ... 'j' => println!("early letter"), 'k' ... 'z' => println!("late letter"), _ => println!("something else"), </del> <ins> match origin { Point { x, y } => println!("({},{})", x, y), </ins> } ``` <del> This prints `something else`. # Bindings </del> <ins> [struct]: structs.html </ins> <del> You can bind values to names with `@`: </del> <ins> We can use `:` to give a value a different name. </ins> ```rust <del> let x = 1; </del> <ins> struct Point { x: i32, y: i32, } </ins> <del> match x { e @ 1 ... 5 => println!("got a range element {}", e), _ => println!("anything"), </del> <ins> let origin = Point { x: 0, y: 0 }; match origin { Point { x: x1, y: y1 } => println!("({},{})", x1, y1), </ins> } ``` <del> This prints `got a range element 1`. This is useful when you want to do a complicated match of part of a data structure: </del> <ins> If we only care about some of the values, we don’t have to give them all names: </ins> ```rust <del> #[derive(Debug)] struct Person { name: Option<String>, </del> <ins> struct Point { x: i32, y: i32, </ins> } <del> let name = "Steve".to_string(); let mut x: Option<Person> = Some(Person { name: Some(name) }); match x { Some(Person { name: ref a @ Some(_), .. }) => println!("{:?}", a), _ => {} </del> <ins> let origin = Point { x: 0, y: 0 }; match origin { Point { x, .. } => println!("x is {}", x), </ins> } ``` <del> This prints `Some("Steve")`: We’ve bound the inner `name` to `a`. </del> <ins> This prints `x is 0`. </ins> <del> If you use `@` with `|`, you need to make sure the name is bound in each part of the pattern: </del> <ins> You can do this kind of match on any member, not just the first: </ins> ```rust <del> let x = 5; </del> <ins> struct Point { x: i32, y: i32, } </ins> <del> match x { e @ 1 ... 5 | e @ 8 ... 10 => println!("got a range element {}", e), _ => println!("anything"), </del> <ins> let origin = Point { x: 0, y: 0 }; match origin { Point { y, .. } => println!("y is {}", y), </ins> } ``` <ins> This prints `y is 0`. This ‘destructuring’ behavior works on any compound data type, like [tuples][tuples] or [enums][enums]. [tuples]: primitive-types.html#tuples [enums]: enums.html </ins> # Ignoring bindings You can use `_` in a pattern to disregard the type and value.

This prints `Got a tuple!`. <del> # Guards </del> <ins> # ref and ref mut </ins> <del> You can introduce ‘match guards’ with `if`: </del> <ins> If you want to get a [reference][ref], use the `ref` keyword: </ins> ```rust <del> enum OptionalInt { Value(i32), Missing, } let x = OptionalInt::Value(5); </del> <ins> let x = 5; </ins> match x { <del> OptionalInt::Value(i) if i > 5 => println!("Got an int bigger than five!"), OptionalInt::Value(..) => println!("Got an int!"), OptionalInt::Missing => println!("No such luck."), </del> <ins> ref r => println!("Got a reference to {}", r), </ins> } ``` <del> This prints `Got an int!`. </del> <ins> This prints `Got a reference to 5`. </ins> <del> If you’re using `if` with multiple patterns, the `if` applies to both sides: </del> <ins> [ref]: references-and-borrowing.html Here, the `r` inside the `match` has the type `&i32`. In other words, the `ref` keyword _creates_ a reference, for use in the pattern. If you need a mutable reference, `ref mut` will work in the same way: </ins> ```rust <del> let x = 4; let y = false; </del> <ins> let mut x = 5; </ins> match x { <del> 4 | 5 if y => println!("yes"), _ => println!("no"), </del> <ins> ref mut mr => println!("Got a mutable reference to {}", mr), </ins> } ``` <del> This prints `no`, because the `if` applies to the whole of `4 | 5`, and not to just the `5`, In other words, the the precedence of `if` behaves like this: </del> <ins> # Ranges </ins> <del> ```text (4 | 5) if y => ... ``` </del> <ins> You can match a range of values with `...`: </ins> <del> not this: </del> <ins> ```rust let x = 1; </ins> <del> ```text 4 | (5 if y) => ... </del> <ins> match x { 1 ... 5 => println!("one through five"), _ => println!("anything"), } </ins> ``` <del> # ref and ref mut </del> <ins> This prints `one through five`. </ins> <del> If you want to get a [reference][ref], use the `ref` keyword: </del> <ins> Ranges are mostly used with integers and `char`s: </ins> ```rust <del> let x = 5; </del> <ins> let x = '💅'; </ins> match x { <del> ref r => println!("Got a reference to {}", r), </del> <ins> 'a' ... 'j' => println!("early letter"), 'k' ... 'z' => println!("late letter"), _ => println!("something else"), </ins> } ``` <del> This prints `Got a reference to 5`. </del> <ins> This prints `something else`. </ins> <del> [ref]: references-and-borrowing.html </del> <ins> # Bindings </ins> <del> Here, the `r` inside the `match` has the type `&i32`. In other words, the `ref` keyword _creates_ a reference, for use in the pattern. If you need a mutable reference, `ref mut` will work in the same way: </del> <ins> You can bind values to names with `@`: </ins> ```rust <del> let mut x = 5; </del> <ins> let x = 1; </ins> match x { <del> ref mut mr => println!("Got a mutable reference to {}", mr), </del> <ins> e @ 1 ... 5 => println!("got a range element {}", e), _ => println!("anything"), </ins> } ``` <del> # Destructuring If you have a compound data type, like a [`struct`][struct], you can destructure it inside of a pattern: </del> <ins> This prints `got a range element 1`. This is useful when you want to do a complicated match of part of a data structure: </ins> ```rust <del> struct Point { x: i32, y: i32, </del> <ins> #[derive(Debug)] struct Person { name: Option<String>, </ins> } <del> let origin = Point { x: 0, y: 0 }; match origin { Point { x, y } => println!("({},{})", x, y), </del> <ins> let name = "Steve".to_string(); let mut x: Option<Person> = Some(Person { name: Some(name) }); match x { Some(Person { name: ref a @ Some(_), .. }) => println!("{:?}", a), _ => {} </ins> } ``` <del> [struct]: structs.html </del> <ins> This prints `Some("Steve")`: We’ve bound the inner `name` to `a`. </ins> <del> We can use `:` to give a value a different name. </del> <ins> If you use `@` with `|`, you need to make sure the name is bound in each part of the pattern: </ins> ```rust <del> struct Point { x: i32, y: i32, } let origin = Point { x: 0, y: 0 }; </del> <ins> let x = 5; </ins> <del> match origin { Point { x: x1, y: y1 } => println!("({},{})", x1, y1), </del> <ins> match x { e @ 1 ... 5 | e @ 8 ... 10 => println!("got a range element {}", e), _ => println!("anything"), </ins> } ``` <del> If we only care about some of the values, we don’t have to give them all names: </del> <ins> # Guards You can introduce ‘match guards’ with `if`: </ins> ```rust <del> struct Point { x: i32, y: i32, </del> <ins> enum OptionalInt { Value(i32), Missing, </ins> } <del> let origin = Point { x: 0, y: 0 }; </del> <ins> let x = OptionalInt::Value(5); </ins> <del> match origin { Point { x, .. } => println!("x is {}", x), </del> <ins> match x { OptionalInt::Value(i) if i > 5 => println!("Got an int bigger than five!"), OptionalInt::Value(..) => println!("Got an int!"), OptionalInt::Missing => println!("No such luck."), </ins> } ``` <del> This prints `x is 0`. </del> <ins> This prints `Got an int!`. </ins> <del> You can do this kind of match on any member, not just the first: </del> <ins> If you’re using `if` with multiple patterns, the `if` applies to both sides: </ins> ```rust <del> struct Point { x: i32, y: i32, } let origin = Point { x: 0, y: 0 }; </del> <ins> let x = 4; let y = false; </ins> <del> match origin { Point { y, .. } => println!("y is {}", y), </del> <ins> match x { 4 | 5 if y => println!("yes"), _ => println!("no"), </ins> } ``` <del> This prints `y is 0`. </del> <ins> This prints `no`, because the `if` applies to the whole of `4 | 5`, and not to just the `5`, In other words, the the precedence of `if` behaves like this: </ins> <del> This ‘destructuring’ behavior works on any compound data type, like [tuples][tuples] or [enums][enums]. </del> <ins> ```text (4 | 5) if y => ... ``` </ins> <del> [tuples]: primitive-types.html#tuples [enums]: enums.html </del> <ins> not this: ```text 4 | (5 if y) => ... ``` </ins> # Mix and Match