Skip to content

Commit

Permalink
Auto merge of #35857 - jonathandturner:rollup, r=jonathandturner
Browse files Browse the repository at this point in the history
Rollup of 19 pull requests

- Successful merges: #35234, #35701, #35709, #35710, #35775, #35778, #35780, #35781, #35794, #35800, #35804, #35806, #35811, #35812, #35818, #35827, #35830, #35831, #35839
- Failed merges: #35759
  • Loading branch information
bors authored Aug 20, 2016
2 parents 99867ee + 9072861 commit 4901896
Show file tree
Hide file tree
Showing 50 changed files with 344 additions and 126 deletions.
8 changes: 7 additions & 1 deletion src/bootstrap/bin/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,19 @@ fn main() {
// is passed (a bit janky...)
let target = args.windows(2).find(|w| &*w[0] == "--target")
.and_then(|w| w[1].to_str());
let version = args.iter().find(|w| &**w == "-vV");

// Build scripts always use the snapshot compiler which is guaranteed to be
// able to produce an executable, whereas intermediate compilers may not
// have the standard library built yet and may not be able to produce an
// executable. Otherwise we just use the standard compiler we're
// bootstrapping with.
let (rustc, libdir) = if target.is_none() {
//
// Also note that cargo will detect the version of the compiler to trigger
// a rebuild when the compiler changes. If this happens, we want to make
// sure to use the actual compiler instead of the snapshot compiler becase
// that's the one that's actually changing.
let (rustc, libdir) = if target.is_none() && version.is_none() {
("RUSTC_SNAPSHOT", "RUSTC_SNAPSHOT_LIBDIR")
} else {
("RUSTC_REAL", "RUSTC_LIBDIR")
Expand Down
4 changes: 2 additions & 2 deletions src/doc/book/borrow-and-asref.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ different. Here’s a quick refresher on what these two traits mean.

# Borrow

The `Borrow` trait is used when you’re writing a datastructure, and you want to
The `Borrow` trait is used when you’re writing a data structure, and you want to
use either an owned or borrowed type as synonymous for some purpose.

For example, [`HashMap`][hashmap] has a [`get` method][get] which uses `Borrow`:
Expand Down Expand Up @@ -86,7 +86,7 @@ We can see how they’re kind of the same: they both deal with owned and borrowe
versions of some type. However, they’re a bit different.

Choose `Borrow` when you want to abstract over different kinds of borrowing, or
when you’re building a datastructure that treats owned and borrowed values in
when you’re building a data structure that treats owned and borrowed values in
equivalent ways, such as hashing and comparison.

Choose `AsRef` when you want to convert something to a reference directly, and
Expand Down
2 changes: 1 addition & 1 deletion src/doc/book/closures.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ fn call_with_ref<'a, F>(some_closure:F) -> i32
where F: Fn(&'a i32) -> i32 {
```

However this presents a problem with in our case. When you specify the explicit
However this presents a problem in our case. When you specify the explicit
lifetime on a function it binds that lifetime to the *entire* scope of the function
instead of just the invocation scope of our closure. This means that the borrow checker
will see a mutable reference in the same lifetime as our immutable reference and fail
Expand Down
8 changes: 4 additions & 4 deletions src/doc/book/error-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ handling is reducing the amount of explicit case analysis the programmer has to
do while keeping code composable.

Keeping code composable is important, because without that requirement, we
could [`panic`](../std/macro.panic!.html) whenever we
could [`panic`](../std/macro.panic.html) whenever we
come across something unexpected. (`panic` causes the current task to unwind,
and in most cases, the entire program aborts.) Here's an example:

Expand Down Expand Up @@ -944,7 +944,7 @@ macro_rules! try {
}
```

(The [real definition](../std/macro.try!.html) is a bit more
(The [real definition](../std/macro.try.html) is a bit more
sophisticated. We will address that later.)

Using the `try!` macro makes it very easy to simplify our last example. Since
Expand Down Expand Up @@ -1271,7 +1271,7 @@ macro_rules! try {
```

This is not its real definition. Its real definition is
[in the standard library](../std/macro.try!.html):
[in the standard library](../std/macro.try.html):

<span id="code-try-def"></span>

Expand Down Expand Up @@ -2178,7 +2178,7 @@ heuristics!
[`From`](../std/convert/trait.From.html)
and
[`Error`](../std/error/trait.Error.html)
impls to make the [`try!`](../std/macro.try!.html)
impls to make the [`try!`](../std/macro.try.html)
macro more ergonomic.
* If you're writing a library and your code can produce errors, define your own
error type and implement the
Expand Down
2 changes: 1 addition & 1 deletion src/libcollections/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ use string;
/// assert_eq!(s, "Hello, world!");
/// ```
///
/// [format!]: ../macro.format!.html
/// [format!]: ../macro.format.html
#[stable(feature = "rust1", since = "1.0.0")]
pub fn format(args: Arguments) -> string::String {
let mut output = string::String::new();
Expand Down
Loading

0 comments on commit 4901896

Please sign in to comment.