Skip to content

Commit f5160d3

Browse files
authored
Merge pull request #38716 from alexcrichton/beta-next
Backporting PRs to beta
2 parents dd582c0 + b8ea9fa commit f5160d3

File tree

28 files changed

+276
-125
lines changed

28 files changed

+276
-125
lines changed

src/bootstrap/bootstrap.py

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def verify(path, sha_path, verbose):
8181
with open(path, "rb") as f:
8282
found = hashlib.sha256(f.read()).hexdigest()
8383
with open(sha_path, "r") as f:
84-
expected, _ = f.readline().split()
84+
expected = f.readline().split()[0]
8585
verified = found == expected
8686
if not verified:
8787
print("invalid checksum:\n"
@@ -146,7 +146,7 @@ class RustBuild(object):
146146
def download_stage0(self):
147147
cache_dst = os.path.join(self.build_dir, "cache")
148148
rustc_cache = os.path.join(cache_dst, self.stage0_rustc_date())
149-
cargo_cache = os.path.join(cache_dst, self.stage0_cargo_date())
149+
cargo_cache = os.path.join(cache_dst, self.stage0_cargo_rev())
150150
if not os.path.exists(rustc_cache):
151151
os.makedirs(rustc_cache)
152152
if not os.path.exists(cargo_cache):
@@ -179,21 +179,17 @@ def download_stage0(self):
179179
if self.cargo().startswith(self.bin_root()) and \
180180
(not os.path.exists(self.cargo()) or self.cargo_out_of_date()):
181181
self.print_what_it_means_to_bootstrap()
182-
channel = self.stage0_cargo_channel()
183-
filename = "cargo-{}-{}.tar.gz".format(channel, self.build)
184-
url = "https://static.rust-lang.org/cargo-dist/" + self.stage0_cargo_date()
182+
filename = "cargo-nightly-{}.tar.gz".format(self.build)
183+
url = "https://s3.amazonaws.com/rust-lang-ci/cargo-builds/" + self.stage0_cargo_rev()
185184
tarball = os.path.join(cargo_cache, filename)
186185
if not os.path.exists(tarball):
187186
get("{}/{}".format(url, filename), tarball, verbose=self.verbose)
188187
unpack(tarball, self.bin_root(), match="cargo", verbose=self.verbose)
189188
with open(self.cargo_stamp(), 'w') as f:
190-
f.write(self.stage0_cargo_date())
189+
f.write(self.stage0_cargo_rev())
191190

192-
def stage0_cargo_date(self):
193-
return self._cargo_date
194-
195-
def stage0_cargo_channel(self):
196-
return self._cargo_channel
191+
def stage0_cargo_rev(self):
192+
return self._cargo_rev
197193

198194
def stage0_rustc_date(self):
199195
return self._rustc_date
@@ -217,7 +213,7 @@ def cargo_out_of_date(self):
217213
if not os.path.exists(self.cargo_stamp()) or self.clean:
218214
return True
219215
with open(self.cargo_stamp(), 'r') as f:
220-
return self.stage0_cargo_date() != f.read()
216+
return self.stage0_cargo_rev() != f.read()
221217

222218
def bin_root(self):
223219
return os.path.join(self.build_dir, self.build, "stage0")
@@ -467,7 +463,7 @@ def main():
467463

468464
data = stage0_data(rb.rust_root)
469465
rb._rustc_channel, rb._rustc_date = data['rustc'].split('-', 1)
470-
rb._cargo_channel, rb._cargo_date = data['cargo'].split('-', 1)
466+
rb._cargo_rev = data['cargo']
471467

472468
start_time = time()
473469

src/bootstrap/doc.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ pub fn std(build: &Build, stage: u32, target: &str) {
146146
let mut cargo = build.cargo(&compiler, Mode::Libstd, target, "doc");
147147
cargo.arg("--manifest-path")
148148
.arg(build.src.join("src/rustc/std_shim/Cargo.toml"))
149-
.arg("--features").arg(build.std_features());
149+
.arg("--features").arg(build.std_features())
150+
.arg("-p").arg("std");
150151
build.run(&mut cargo);
151152
cp_r(&out_dir, &out)
152153
}

src/bootstrap/step.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ pub fn build_rules(build: &Build) -> Rules {
458458
for (krate, path, default) in krates("test_shim") {
459459
rules.doc(&krate.doc_step, path)
460460
.dep(|s| s.name("libtest"))
461-
.default(default && build.config.docs)
461+
.default(default && build.config.compiler_docs)
462462
.run(move |s| doc::test(build, s.stage, s.target));
463463
}
464464
for (krate, path, default) in krates("rustc-main") {

src/liballoc_jemalloc/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ links = "jemalloc"
99
name = "alloc_jemalloc"
1010
path = "lib.rs"
1111
test = false
12+
doc = false
1213

1314
[dependencies]
1415
core = { path = "../libcore" }

src/liballoc_system/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ version = "0.0.0"
77
name = "alloc_system"
88
path = "lib.rs"
99
test = false
10+
doc = false
1011

1112
[dependencies]
1213
core = { path = "../libcore" }

src/libcompiler_builtins/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ name = "compiler_builtins"
99
path = "lib.rs"
1010
test = false
1111
bench = false
12+
doc = false
1213

1314
[dependencies]
1415
core = { path = "../libcore" }

src/libpanic_abort/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ version = "0.0.0"
77
path = "lib.rs"
88
test = false
99
bench = false
10+
doc = false
1011

1112
[dependencies]
1213
core = { path = "../libcore" }

src/libpanic_unwind/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ version = "0.0.0"
77
path = "lib.rs"
88
test = false
99
bench = false
10+
doc = false
1011

1112
[dependencies]
1213
alloc = { path = "../liballoc" }

src/librand/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ version = "0.0.0"
66
[lib]
77
name = "rand"
88
path = "lib.rs"
9+
doc = false
910

1011
[dependencies]
1112
core = { path = "../libcore" }

src/librustc/lint/builtin.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,12 @@ declare_lint! {
211211
not named `mod.rs`"
212212
}
213213

214+
declare_lint! {
215+
pub LEGACY_IMPORTS,
216+
Warn,
217+
"detects names that resolve to ambiguous glob imports with RFC 1560"
218+
}
219+
214220
declare_lint! {
215221
pub DEPRECATED,
216222
Warn,
@@ -257,6 +263,7 @@ impl LintPass for HardwiredLints {
257263
PATTERNS_IN_FNS_WITHOUT_BODY,
258264
EXTRA_REQUIREMENT_IN_IMPL,
259265
LEGACY_DIRECTORY_OWNERSHIP,
266+
LEGACY_IMPORTS,
260267
DEPRECATED
261268
)
262269
}

0 commit comments

Comments
 (0)