diff options
| author | Tang Chenglong <ideami@outlook.com> | 2016-03-21 21:00:04 +0800 |
|---|---|---|
| committer | Tang Chenglong <ideami@outlook.com> | 2016-03-21 21:00:04 +0800 |
| commit | a5d9057ca7f7b08adef7cfecea2cc446ee47cb85 (patch) | |
| tree | c1c198ad3c0849718f3f648ead5724bf1ac710d0 | |
| parent | 7ec8f5c3699bf16c452cff6abaeda26abaeef02c (diff) | |
| download | rust-a5d9057ca7f7b08adef7cfecea2cc446ee47cb85.tar.gz rust-a5d9057ca7f7b08adef7cfecea2cc446ee47cb85.zip | |
docs: Make some changes in texts
In my understanding, the description is somehow inappropriate.
| -rw-r--r-- | src/doc/book/match.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/doc/book/match.md b/src/doc/book/match.md index acffaf4544b..1c327c376e2 100644 --- a/src/doc/book/match.md +++ b/src/doc/book/match.md @@ -36,10 +36,10 @@ give us an error: error: non-exhaustive patterns: `_` not covered ``` -Rust is telling us that we forgot a value. The compiler infers from `x` that it -can have any positive 32bit value; for example 1 to 2,147,483,647. The `_` acts +Rust is telling us that we forgot some value. The compiler infers from `x` that it +can have any 32bit integer value; for example -2,147,483,648 to 2,147,483,647. The `_` acts as a 'catch-all', and will catch all possible values that *aren't* specified in -an arm of `match`. As you can see with the previous example, we provide `match` +an arm of `match`. As you can see in the previous example, we provide `match` arms for integers 1-5, if `x` is 6 or any other value, then it is caught by `_`. `match` is also an expression, which means we can use it on the right-hand |
