about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2015-05-13 00:54:55 -0400
committerSteve Klabnik <steve@steveklabnik.com>2015-05-13 00:54:55 -0400
commit704fb9c2c98912ee1c2123a33470ecfce6d6dfa0 (patch)
tree443b9479a48b139b17df021bc8b874dc11b49545
parentf26a2a6e8990832495d6ebe2dafa5727dac5d7c8 (diff)
parenta22b3270b8dd0c2d23cb420b07ad1feb9691db2d (diff)
downloadrust-704fb9c2c98912ee1c2123a33470ecfce6d6dfa0.tar.gz
rust-704fb9c2c98912ee1c2123a33470ecfce6d6dfa0.zip
Merge branch 'doc-fixes' of https://github.com/wheals/rust into rollup
-rw-r--r--src/doc/trpl/enums.md11
-rw-r--r--src/doc/trpl/error-handling.md2
-rw-r--r--src/doc/trpl/iterators.md6
-rw-r--r--src/doc/trpl/lifetimes.md2
-rw-r--r--src/doc/trpl/ownership.md2
-rw-r--r--src/doc/trpl/primitive-types.md2
6 files changed, 15 insertions, 10 deletions
diff --git a/src/doc/trpl/enums.md b/src/doc/trpl/enums.md
index 443f569a3e5..ad15d19eae1 100644
--- a/src/doc/trpl/enums.md
+++ b/src/doc/trpl/enums.md
@@ -55,9 +55,14 @@ fn process_color_change(msg: Message) {
 }
 ```
 
-We’ll see how to safely get data out of enums when we learn about the
-[`match`][match] and [`if let`][if-let] statements in the next few
-chapters.
+Both variants are named `Digit`, but since they’re scoped to the `enum` name
+there's no ambiguity.
+
+Not supporting these operations may seem rather limiting, but it’s a limitation
+which we can overcome. There are two ways: by implementing equality ourselves,
+or by pattern matching variants with [`match`][match] expressions, which you’ll
+learn in the next section. We don’t know enough about Rust to implement
+equality yet, but we’ll find out in the [`traits`][traits] section.
 
 [match]: match.html
 [if-let]: if-let.html
diff --git a/src/doc/trpl/error-handling.md b/src/doc/trpl/error-handling.md
index 95b39a66063..b3689968b7f 100644
--- a/src/doc/trpl/error-handling.md
+++ b/src/doc/trpl/error-handling.md
@@ -204,7 +204,7 @@ Because these kinds of situations are relatively rare, use panics sparingly.
 
 In certain circumstances, even though a function may fail, we may want to treat
 it as a panic instead. For example, `io::stdin().read_line(&mut buffer)` returns
-an `Result<usize>`, when there is an error reading the line. This allows us to
+a `Result<usize>`, when there is an error reading the line. This allows us to
 handle and possibly recover from error.
 
 If we don't want to handle this error, and would rather just abort the program,
diff --git a/src/doc/trpl/iterators.md b/src/doc/trpl/iterators.md
index abb14a60205..e0cc45c254b 100644
--- a/src/doc/trpl/iterators.md
+++ b/src/doc/trpl/iterators.md
@@ -212,9 +212,9 @@ see why consumers matter.
 As we've said before, an iterator is something that we can call the
 `.next()` method on repeatedly, and it gives us a sequence of things.
 Because you need to call the method, this means that iterators
-are *lazy* and don't need to generate all of the values upfront.
-This code, for example, does not actually generate the numbers
-`1-100`, and just creates a value that represents the sequence:
+can be *lazy* and not generate all of the values upfront. This code,
+for example, does not actually generate the numbers `1-100`, instead
+creating a value that merely represents the sequence:
 
 ```rust
 let nums = 1..100;
diff --git a/src/doc/trpl/lifetimes.md b/src/doc/trpl/lifetimes.md
index 25d5122b4e4..342de413f0b 100644
--- a/src/doc/trpl/lifetimes.md
+++ b/src/doc/trpl/lifetimes.md
@@ -41,7 +41,7 @@ With that in mind, let’s learn about lifetimes.
 # Lifetimes
 
 Lending out a reference to a resource that someone else owns can be
-complicated, however. For example, imagine this set of operations:
+complicated. For example, imagine this set of operations:
 
 - I acquire a handle to some kind of resource.
 - I lend you a reference to the resource.
diff --git a/src/doc/trpl/ownership.md b/src/doc/trpl/ownership.md
index b210f1c643f..0ba2b33759c 100644
--- a/src/doc/trpl/ownership.md
+++ b/src/doc/trpl/ownership.md
@@ -107,7 +107,7 @@ println!("v[0] is: {}", v[0]);
 ```
 
 Same error: ‘use of moved value’. When we transfer ownership to something else,
-we say that we’ve ‘moved’ the thing we refer to. You don’t need any sort of
+we say that we’ve ‘moved’ the thing we refer to. You don’t need some sort of
 special annotation here, it’s the default thing that Rust does.
 
 ## The details
diff --git a/src/doc/trpl/primitive-types.md b/src/doc/trpl/primitive-types.md
index 22483816769..d3bf61434c9 100644
--- a/src/doc/trpl/primitive-types.md
+++ b/src/doc/trpl/primitive-types.md
@@ -82,7 +82,7 @@ Let’s go over them by category:
 Integer types come in two varieties: signed and unsigned. To understand the
 difference, let’s consider a number with four bits of size. A signed, four-bit
 number would let you store numbers from `-8` to `+7`. Signed numbers use
-“two’s compliment representation”. An unsigned four bit number, since it does
+“two’s complement representation”. An unsigned four bit number, since it does
 not need to store negatives, can store values from `0` to `+15`.
 
 Unsigned types use a `u` for their category, and signed types use `i`. The `i`