diff options
| author | bors <bors@rust-lang.org> | 2015-01-20 23:03:09 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-01-20 23:03:09 +0000 |
| commit | 29bd9a06efd2f8c8a7b1102e2203cc0e6ae2dcba (patch) | |
| tree | 98824cc18b1c65ff09f383438d79ad2d0a0e2ea8 /src/doc/trpl | |
| parent | 583c5c589ed02e5b6b14a576e35e0ce68988d949 (diff) | |
| parent | 631896dc1996d239a532b0ce02d5fe886660149e (diff) | |
| download | rust-29bd9a06efd2f8c8a7b1102e2203cc0e6ae2dcba.tar.gz rust-29bd9a06efd2f8c8a7b1102e2203cc0e6ae2dcba.zip | |
Auto merge of #21439 - alexcrichton:rollup, r=alexcrichton
Continuation of https://github.com/rust-lang/rust/pull/21428
Diffstat (limited to 'src/doc/trpl')
| -rw-r--r-- | src/doc/trpl/compound-data-types.md | 2 | ||||
| -rw-r--r-- | src/doc/trpl/crates-and-modules.md | 5 | ||||
| -rw-r--r-- | src/doc/trpl/generics.md | 6 | ||||
| -rw-r--r-- | src/doc/trpl/macros.md | 1 | ||||
| -rw-r--r-- | src/doc/trpl/ownership.md | 2 | ||||
| -rw-r--r-- | src/doc/trpl/unsafe.md | 6 |
6 files changed, 11 insertions, 11 deletions
diff --git a/src/doc/trpl/compound-data-types.md b/src/doc/trpl/compound-data-types.md index 0616f094e37..901b44661b0 100644 --- a/src/doc/trpl/compound-data-types.md +++ b/src/doc/trpl/compound-data-types.md @@ -254,7 +254,7 @@ things from the standard library if you need them. Okay, let's talk about the actual code in the example. `cmp` is a function that compares two things, and returns an `Ordering`. We return either `Ordering::Less`, `Ordering::Greater`, or `Ordering::Equal`, depending on if -the two values are greater, less, or equal. Note that each variant of the +the two values are less, greater, or equal. Note that each variant of the `enum` is namespaced under the `enum` itself: it's `Ordering::Greater` not `Greater`. diff --git a/src/doc/trpl/crates-and-modules.md b/src/doc/trpl/crates-and-modules.md index 6c5c14fe311..25870d84a75 100644 --- a/src/doc/trpl/crates-and-modules.md +++ b/src/doc/trpl/crates-and-modules.md @@ -208,9 +208,8 @@ Again, these declarations tell Rust to look for either these sub-modules don't have their own sub-modules, we've chosen to make them `src/english/greetings.rs` and `src/japanese/farewells.rs`. Whew! -Right now, the contents of `src/english/greetings.rs` and -`src/japanese/farewells.rs` are both empty at the moment. Let's add some -functions. +The contents of `src/english/greetings.rs` and `src/japanese/farewells.rs` are +both empty at the moment. Let's add some functions. Put this in `src/english/greetings.rs`: diff --git a/src/doc/trpl/generics.md b/src/doc/trpl/generics.md index 74cb4530935..3e4e0a66eae 100644 --- a/src/doc/trpl/generics.md +++ b/src/doc/trpl/generics.md @@ -79,9 +79,9 @@ This type is generic over _two_ types: `T` and `E`. By the way, the capital lett can be any letter you'd like. We could define `Result<T, E>` as: ```{rust} -enum Result<H, N> { - Ok(H), - Err(N), +enum Result<A, Z> { + Ok(A), + Err(Z), } ``` diff --git a/src/doc/trpl/macros.md b/src/doc/trpl/macros.md index e0bccb1b86f..f429e9df196 100644 --- a/src/doc/trpl/macros.md +++ b/src/doc/trpl/macros.md @@ -101,6 +101,7 @@ So `($x:ident -> (($e:expr)))`, though excessively fancy, would designate a macr that could be invoked like: `my_macro!(i->(( 2+2 )))`. To avoid ambiguity, macro invocation syntax must conform to the following rules: + * `expr` must be followed by `=>`, `,` or `;`. * `ty` and `path` must be followed by `=>`, `,`, `:`, `=`, `>` or `as`. * `pat` must be followed by `=>`, `,` or `=`. diff --git a/src/doc/trpl/ownership.md b/src/doc/trpl/ownership.md index 9ced5bb656c..8b7e37dd4c2 100644 --- a/src/doc/trpl/ownership.md +++ b/src/doc/trpl/ownership.md @@ -395,7 +395,7 @@ static FOO: i32 = 5; let x: &'static i32 = &FOO; ``` -This adds an `i32` to the data segment of the binary, and `FOO` is a reference +This adds an `i32` to the data segment of the binary, and `x` is a reference to it. # Shared Ownership diff --git a/src/doc/trpl/unsafe.md b/src/doc/trpl/unsafe.md index 53450aa5a6b..2a66b4a01f7 100644 --- a/src/doc/trpl/unsafe.md +++ b/src/doc/trpl/unsafe.md @@ -254,7 +254,7 @@ impl<T: Send> Drop for Unique<T> { // Copy the object out from the pointer onto the stack, // where it is covered by normal Rust destructor semantics // and cleans itself up, if necessary - ptr::read(self.ptr as *const T); + ptr::read(self.ptr); // clean-up our allocation free(self.ptr as *mut c_void) @@ -703,10 +703,10 @@ Other features provided by lang items include: `deref`, and `add` respectively. - stack unwinding and general failure; the `eh_personality`, `fail` and `fail_bounds_checks` lang items. -- the traits in `std::markers` used to indicate types of +- the traits in `std::marker` used to indicate types of various kinds; lang items `send`, `sync` and `copy`. - the marker types and variance indicators found in - `std::markers`; lang items `covariant_type`, + `std::marker`; lang items `covariant_type`, `contravariant_lifetime`, `no_sync_bound`, etc. Lang items are loaded lazily by the compiler; e.g. if one never uses |
