Skip to content

Commit 01bebdf

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 0b9ad6e + 9a3392e commit 01bebdf

File tree

1,491 files changed

+22847
-17415
lines changed

Some content is hidden

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

1,491 files changed

+22847
-17415
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,6 @@
4444
path = src/llvm-project
4545
url = https://github.com/rust-lang/llvm-project.git
4646
branch = rustc/8.0-2019-01-16
47+
[submodule "src/doc/embedded-book"]
48+
path = src/doc/embedded-book
49+
url = https://github.com/rust-embedded/book.git

Cargo.lock

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is automatically @generated by Cargo.
2+
# It is not intended for manual editing.
13
[[package]]
24
name = "adler32"
35
version = "1.0.3"
@@ -75,8 +77,8 @@ dependencies = [
7577
"colored 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
7678
"difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
7779
"environment 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
78-
"failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
79-
"failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
80+
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
81+
"failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
8082
"serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
8183
]
8284

@@ -237,7 +239,7 @@ dependencies = [
237239
"curl 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)",
238240
"curl-sys 0.4.15 (registry+https://github.com/rust-lang/crates.io-index)",
239241
"env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
240-
"failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
242+
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
241243
"filetime 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
242244
"flate2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
243245
"fs2 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -530,7 +532,7 @@ name = "crates-io"
530532
version = "0.23.0"
531533
dependencies = [
532534
"curl 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)",
533-
"failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
535+
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
534536
"serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)",
535537
"serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
536538
"serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -841,16 +843,16 @@ dependencies = [
841843

842844
[[package]]
843845
name = "failure"
844-
version = "0.1.3"
846+
version = "0.1.5"
845847
source = "registry+https://github.com/rust-lang/crates.io-index"
846848
dependencies = [
847849
"backtrace 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)",
848-
"failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
850+
"failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
849851
]
850852

851853
[[package]]
852854
name = "failure_derive"
853-
version = "0.1.3"
855+
version = "0.1.5"
854856
source = "registry+https://github.com/rust-lang/crates.io-index"
855857
dependencies = [
856858
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1503,7 +1505,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
15031505

15041506
[[package]]
15051507
name = "minifier"
1506-
version = "0.0.26"
1508+
version = "0.0.28"
15071509
source = "registry+https://github.com/rust-lang/crates.io-index"
15081510
dependencies = [
15091511
"macro-utils 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1677,8 +1679,8 @@ name = "opener"
16771679
version = "0.3.2"
16781680
source = "registry+https://github.com/rust-lang/crates.io-index"
16791681
dependencies = [
1680-
"failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
1681-
"failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
1682+
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
1683+
"failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
16821684
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
16831685
]
16841686

@@ -2254,7 +2256,7 @@ dependencies = [
22542256
"crossbeam-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
22552257
"difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
22562258
"env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
2257-
"failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
2259+
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
22582260
"futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
22592261
"home 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
22602262
"itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2820,7 +2822,6 @@ name = "rustc_mir"
28202822
version = "0.0.0"
28212823
dependencies = [
28222824
"arena 0.0.0",
2823-
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
28242825
"byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
28252826
"either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
28262827
"graphviz 0.0.0",
@@ -2992,7 +2993,7 @@ dependencies = [
29922993
name = "rustdoc"
29932994
version = "0.0.0"
29942995
dependencies = [
2995-
"minifier 0.0.26 (registry+https://github.com/rust-lang/crates.io-index)",
2996+
"minifier 0.0.28 (registry+https://github.com/rust-lang/crates.io-index)",
29962997
"parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
29972998
"pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
29982999
"tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3014,7 +3015,7 @@ name = "rustfix"
30143015
version = "0.4.4"
30153016
source = "registry+https://github.com/rust-lang/crates.io-index"
30163017
dependencies = [
3017-
"failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
3018+
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
30183019
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
30193020
"serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)",
30203021
"serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3032,7 +3033,7 @@ dependencies = [
30323033
"derive-new 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
30333034
"diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
30343035
"env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)",
3035-
"failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
3036+
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
30363037
"getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
30373038
"itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)",
30383039
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3818,7 +3819,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
38183819
dependencies = [
38193820
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
38203821
"chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
3821-
"failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
3822+
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
38223823
]
38233824

38243825
[[package]]
@@ -3997,8 +3998,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
39973998
"checksum environment 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1f4b14e20978669064c33b4c1e0fb4083412e40fe56cbea2eae80fd7591503ee"
39983999
"checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3"
39994000
"checksum error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07e791d3be96241c77c43846b665ef1384606da2cd2a48730abe606a12906e02"
4000-
"checksum failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6dd377bcc1b1b7ce911967e3ec24fa19c3224394ec05b54aa7b083d498341ac7"
4001-
"checksum failure_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "64c2d913fe8ed3b6c6518eedf4538255b989945c14c2a7d5cbff62a5e2120596"
4001+
"checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2"
4002+
"checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1"
40024003
"checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
40034004
"checksum filetime 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a2df5c1a8c4be27e7707789dc42ae65976e60b394afd293d1419ab915833e646"
40044005
"checksum fixedbitset 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "86d4de0081402f5e88cdac65c8dcdcc73118c1a7a465e2a05f0da05843a8ea33"
@@ -4066,7 +4067,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
40664067
"checksum memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0a3eb002f0535929f1199681417029ebea04aadc0c7a4224b46be99c7f5d6a16"
40674068
"checksum memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2ffa2c986de11a9df78620c01eeaaf27d94d3ff02bf81bfcca953102dd0c6ff"
40684069
"checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3"
4069-
"checksum minifier 0.0.26 (registry+https://github.com/rust-lang/crates.io-index)" = "f299df45afd73332044ea9f717c816a84fc90c8b631409abf339ba93642a7985"
4070+
"checksum minifier 0.0.28 (registry+https://github.com/rust-lang/crates.io-index)" = "3a2898502751dcc9d66b6fff57f3cf63cc91605e83e1a33515396f5027f8e4ca"
40704071
"checksum miniz-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "0300eafb20369952951699b68243ab4334f4b10a88f411c221d444b36c40e649"
40714072
"checksum miniz_oxide 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5ad30a47319c16cde58d0314f5d98202a80c9083b5f61178457403dfb14e509c"
40724073
"checksum miniz_oxide_c_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "28edaef377517fd9fe3e085c37d892ce7acd1fbeab9239c5a36eec352d8a8b7e"

src/bootstrap/bin/rustdoc.rs

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ fn main() {
1616
let libdir = env::var_os("RUSTDOC_LIBDIR").expect("RUSTDOC_LIBDIR was not set");
1717
let stage = env::var("RUSTC_STAGE").expect("RUSTC_STAGE was not set");
1818
let sysroot = env::var_os("RUSTC_SYSROOT").expect("RUSTC_SYSROOT was not set");
19+
let mut has_unstable = false;
1920

2021
use std::str::FromStr;
2122

@@ -54,9 +55,22 @@ fn main() {
5455
// it up so we can make rustdoc print this into the docs
5556
if let Some(version) = env::var_os("RUSTDOC_CRATE_VERSION") {
5657
// This "unstable-options" can be removed when `--crate-version` is stabilized
57-
cmd.arg("-Z")
58-
.arg("unstable-options")
59-
.arg("--crate-version").arg(version);
58+
if !has_unstable {
59+
cmd.arg("-Z")
60+
.arg("unstable-options");
61+
}
62+
cmd.arg("--crate-version").arg(version);
63+
has_unstable = true;
64+
}
65+
66+
// Needed to be able to run all rustdoc tests.
67+
if let Some(_) = env::var_os("RUSTDOC_GENERATE_REDIRECT_PAGES") {
68+
// This "unstable-options" can be removed when `--generate-redirect-pages` is stabilized
69+
if !has_unstable {
70+
cmd.arg("-Z")
71+
.arg("unstable-options");
72+
}
73+
cmd.arg("--generate-redirect-pages");
6074
}
6175

6276
if verbose > 1 {

src/bootstrap/builder.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,17 @@ pub trait Step: 'static + Clone + Debug + PartialEq + Eq + Hash {
6060
/// Run this rule for all hosts without cross compiling.
6161
const ONLY_HOSTS: bool = false;
6262

63-
/// Primary function to execute this rule. Can call `builder.ensure(...)`
63+
/// Primary function to execute this rule. Can call `builder.ensure()`
6464
/// with other steps to run those.
6565
fn run(self, builder: &Builder) -> Self::Output;
6666

6767
/// When bootstrap is passed a set of paths, this controls whether this rule
6868
/// will execute. However, it does not get called in a "default" context
69-
/// when we are not passed any paths; in that case, make_run is called
69+
/// when we are not passed any paths; in that case, `make_run` is called
7070
/// directly.
7171
fn should_run(run: ShouldRun) -> ShouldRun;
7272

73-
/// Build up a "root" rule, either as a default rule or from a path passed
73+
/// Builds up a "root" rule, either as a default rule or from a path passed
7474
/// to us.
7575
///
7676
/// When path is `None`, we are executing in a context where no paths were
@@ -400,6 +400,7 @@ impl<'a> Builder<'a> {
400400
test::TheBook,
401401
test::UnstableBook,
402402
test::RustcBook,
403+
test::EmbeddedBook,
403404
test::Rustfmt,
404405
test::Miri,
405406
test::Clippy,
@@ -430,6 +431,7 @@ impl<'a> Builder<'a> {
430431
doc::RustByExample,
431432
doc::RustcBook,
432433
doc::CargoBook,
434+
doc::EmbeddedBook,
433435
doc::EditionGuide,
434436
),
435437
Kind::Dist => describe!(
@@ -646,7 +648,7 @@ impl<'a> Builder<'a> {
646648
add_lib_path(vec![self.rustc_libdir(compiler)], cmd);
647649
}
648650

649-
/// Get a path to the compiler specified.
651+
/// Gets a path to the compiler specified.
650652
pub fn rustc(&self, compiler: Compiler) -> PathBuf {
651653
if compiler.is_snapshot(self) {
652654
self.initial_rustc.clone()
@@ -657,7 +659,7 @@ impl<'a> Builder<'a> {
657659
}
658660
}
659661

660-
/// Get the paths to all of the compiler's codegen backends.
662+
/// Gets the paths to all of the compiler's codegen backends.
661663
fn codegen_backends(&self, compiler: Compiler) -> impl Iterator<Item = PathBuf> {
662664
fs::read_dir(self.sysroot_codegen_backends(compiler))
663665
.into_iter()
@@ -675,10 +677,9 @@ impl<'a> Builder<'a> {
675677
let compiler = self.compiler(self.top_stage, host);
676678
cmd.env("RUSTC_STAGE", compiler.stage.to_string())
677679
.env("RUSTC_SYSROOT", self.sysroot(compiler))
678-
.env(
679-
"RUSTDOC_LIBDIR",
680-
self.sysroot_libdir(compiler, self.config.build),
681-
)
680+
// Note that this is *not* the sysroot_libdir because rustdoc must be linked
681+
// equivalently to rustc.
682+
.env("RUSTDOC_LIBDIR", self.rustc_libdir(compiler))
682683
.env("CFG_RELEASE_CHANNEL", &self.config.channel)
683684
.env("RUSTDOC_REAL", self.rustdoc(host))
684685
.env("RUSTDOC_CRATE_VERSION", self.rust_version())
@@ -872,7 +873,7 @@ impl<'a> Builder<'a> {
872873
} else {
873874
&maybe_sysroot
874875
};
875-
let libdir = sysroot.join(libdir(&compiler.host));
876+
let libdir = self.rustc_libdir(compiler);
876877

877878
// Customize the compiler we're running. Specify the compiler to cargo
878879
// as our shim and then pass it some various options used to configure
@@ -914,7 +915,7 @@ impl<'a> Builder<'a> {
914915
cargo.env("RUSTC_ERROR_FORMAT", error_format);
915916
}
916917
if cmd != "build" && cmd != "check" && cmd != "rustc" && want_rustdoc {
917-
cargo.env("RUSTDOC_LIBDIR", self.sysroot_libdir(compiler, self.config.build));
918+
cargo.env("RUSTDOC_LIBDIR", self.rustc_libdir(compiler));
918919
}
919920

920921
if mode.is_tool() {
@@ -1017,8 +1018,7 @@ impl<'a> Builder<'a> {
10171018

10181019
cargo.env("RUSTC_VERBOSE", self.verbosity.to_string());
10191020

1020-
// in std, we want to avoid denying warnings for stage 0 as that makes cfg's painful.
1021-
if self.config.deny_warnings && !(mode == Mode::Std && stage == 0) {
1021+
if self.config.deny_warnings {
10221022
cargo.env("RUSTC_DENY_WARNINGS", "1");
10231023
}
10241024

src/bootstrap/cache.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,10 @@ lazy_static! {
227227
pub static ref INTERNER: Interner = Interner::default();
228228
}
229229

230-
/// This is essentially a HashMap which allows storing any type in its input and
230+
/// This is essentially a `HashMap` which allows storing any type in its input and
231231
/// any type in its output. It is a write-once cache; values are never evicted,
232232
/// which means that references to the value can safely be returned from the
233-
/// get() method.
233+
/// `get()` method.
234234
#[derive(Debug)]
235235
pub struct Cache(
236236
RefCell<HashMap<

src/bootstrap/check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ impl Step for Rustc {
6666
});
6767
}
6868

69-
/// Build the compiler.
69+
/// Builds the compiler.
7070
///
7171
/// This will build the compiler for a particular stage of the build using
7272
/// the `compiler` targeting the `target` architecture. The artifacts

src/bootstrap/clean.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//! Responsible for cleaning out a build directory of all old and stale
44
//! artifacts to prepare for a fresh build. Currently doesn't remove the
55
//! `build/cache` directory (download cache) or the `build/$target/llvm`
6-
//! directory unless the --all flag is present.
6+
//! directory unless the `--all` flag is present.
77
88
use std::fs;
99
use std::io::{self, ErrorKind};

src/bootstrap/compile.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ impl Step for Std {
4848
});
4949
}
5050

51-
/// Build the standard library.
51+
/// Builds the standard library.
5252
///
5353
/// This will build the standard library for a particular stage of the build
5454
/// using the `compiler` targeting the `target` architecture. The artifacts
@@ -269,7 +269,7 @@ impl Step for StartupObjects {
269269
});
270270
}
271271

272-
/// Build and prepare startup objects like rsbegin.o and rsend.o
272+
/// Builds and prepare startup objects like rsbegin.o and rsend.o
273273
///
274274
/// These are primarily used on Windows right now for linking executables/dlls.
275275
/// They don't require any library support as they're just plain old object
@@ -334,7 +334,7 @@ impl Step for Test {
334334
});
335335
}
336336

337-
/// Build libtest.
337+
/// Builds libtest.
338338
///
339339
/// This will build libtest and supporting libraries for a particular stage of
340340
/// the build using the `compiler` targeting the `target` architecture. The
@@ -455,7 +455,7 @@ impl Step for Rustc {
455455
});
456456
}
457457

458-
/// Build the compiler.
458+
/// Builds the compiler.
459459
///
460460
/// This will build the compiler for a particular stage of the build using
461461
/// the `compiler` targeting the `target` architecture. The artifacts

src/bootstrap/dist.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ impl Step for Mingw {
342342
run.builder.ensure(Mingw { host: run.target });
343343
}
344344

345-
/// Build the `rust-mingw` installer component.
345+
/// Builds the `rust-mingw` installer component.
346346
///
347347
/// This contains all the bits and pieces to run the MinGW Windows targets
348348
/// without any extra installed software (e.g., we bundle gcc, libraries, etc).

0 commit comments

Comments
 (0)