Skip to content

Commit 4901896

Browse files
authored
Auto merge of #35857 - jonathandturner:rollup, r=jonathandturner
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
2 parents 99867ee + 9072861 commit 4901896

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+344
-126
lines changed

Diff for: src/bootstrap/bin/rustc.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,19 @@ fn main() {
3838
// is passed (a bit janky...)
3939
let target = args.windows(2).find(|w| &*w[0] == "--target")
4040
.and_then(|w| w[1].to_str());
41+
let version = args.iter().find(|w| &**w == "-vV");
4142

4243
// Build scripts always use the snapshot compiler which is guaranteed to be
4344
// able to produce an executable, whereas intermediate compilers may not
4445
// have the standard library built yet and may not be able to produce an
4546
// executable. Otherwise we just use the standard compiler we're
4647
// bootstrapping with.
47-
let (rustc, libdir) = if target.is_none() {
48+
//
49+
// Also note that cargo will detect the version of the compiler to trigger
50+
// a rebuild when the compiler changes. If this happens, we want to make
51+
// sure to use the actual compiler instead of the snapshot compiler becase
52+
// that's the one that's actually changing.
53+
let (rustc, libdir) = if target.is_none() && version.is_none() {
4854
("RUSTC_SNAPSHOT", "RUSTC_SNAPSHOT_LIBDIR")
4955
} else {
5056
("RUSTC_REAL", "RUSTC_LIBDIR")

Diff for: src/doc/book/borrow-and-asref.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ different. Here’s a quick refresher on what these two traits mean.
88

99
# Borrow
1010

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

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

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

9292
Choose `AsRef` when you want to convert something to a reference directly, and

Diff for: src/doc/book/closures.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ fn call_with_ref<'a, F>(some_closure:F) -> i32
340340
where F: Fn(&'a i32) -> i32 {
341341
```
342342

343-
However this presents a problem with in our case. When you specify the explicit
343+
However this presents a problem in our case. When you specify the explicit
344344
lifetime on a function it binds that lifetime to the *entire* scope of the function
345345
instead of just the invocation scope of our closure. This means that the borrow checker
346346
will see a mutable reference in the same lifetime as our immutable reference and fail

Diff for: src/doc/book/error-handling.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ handling is reducing the amount of explicit case analysis the programmer has to
5959
do while keeping code composable.
6060

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

@@ -944,7 +944,7 @@ macro_rules! try {
944944
}
945945
```
946946

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

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

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

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

@@ -2178,7 +2178,7 @@ heuristics!
21782178
[`From`](../std/convert/trait.From.html)
21792179
and
21802180
[`Error`](../std/error/trait.Error.html)
2181-
impls to make the [`try!`](../std/macro.try!.html)
2181+
impls to make the [`try!`](../std/macro.try.html)
21822182
macro more ergonomic.
21832183
* If you're writing a library and your code can produce errors, define your own
21842184
error type and implement the

Diff for: src/libcollections/fmt.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ use string;
530530
/// assert_eq!(s, "Hello, world!");
531531
/// ```
532532
///
533-
/// [format!]: ../macro.format!.html
533+
/// [format!]: ../macro.format.html
534534
#[stable(feature = "rust1", since = "1.0.0")]
535535
pub fn format(args: Arguments) -> string::String {
536536
let mut output = string::String::new();

0 commit comments

Comments
 (0)