Skip to content

Commit 1a06ff6

Browse files
committed
---
yaml --- r: 277087 b: refs/heads/try c: 6f95d5b h: refs/heads/master i: 277085: 2cd8ec4 277083: 8b13053 277079: 7ca7db2 277071: 6f00e7d 277055: 40bcaf2
1 parent 7a63b1d commit 1a06ff6

File tree

195 files changed

+1961
-2942
lines changed

Some content is hidden

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

195 files changed

+1961
-2942
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 6dbb0e86aec11050480beb76eade6fb805010ba7
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
4-
refs/heads/try: 3a208308e359a773b6d48bb0ca4515652b2ad568
4+
refs/heads/try: 6f95d5b73defe8a4792cf6d4da7dc846f44984f3
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@
7878
/stage3/
7979
/test/
8080
/tmp/
81-
/obj/
8281
TAGS
8382
TAGS.emacs
8483
TAGS.vi

branches/try/RELEASES.md

Lines changed: 0 additions & 288 deletions
Large diffs are not rendered by default.

branches/try/mk/main.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
######################################################################
1414

1515
# The version number
16-
CFG_RELEASE_NUM=1.9.0
16+
CFG_RELEASE_NUM=1.10.0
1717

1818
# An optional number to put after the label, e.g. '.2' -> '-beta.2'
1919
# NB Make sure it starts with a dot to conform to semver pre-release

branches/try/mk/tests.mk

Lines changed: 45 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -240,16 +240,52 @@ cleantestlibs:
240240
# Tidy
241241
######################################################################
242242

243+
ifdef CFG_NOTIDY
243244
.PHONY: tidy
244-
tidy: $(HBIN0_H_$(CFG_BUILD))/tidy$(X_$(CFG_BUILD))
245-
$(TARGET_RPATH_VAR0_T_$(CFG_BUILD)_H_$(CFG_BUILD)) $< $(S)src
246-
247-
$(HBIN0_H_$(CFG_BUILD))/tidy$(X_$(CFG_BUILD)): \
248-
$(TSREQ0_T_$(CFG_BUILD)_H_$(CFG_BUILD)) \
249-
$(TLIB0_T_$(CFG_BUILD)_H_$(CFG_BUILD))/stamp.std \
250-
$(call rwildcard,$(S)src/tools/tidy/src,*.rs)
251-
$(STAGE0_T_$(CFG_BUILD)_H_$(CFG_BUILD)) $(S)src/tools/tidy/src/main.rs \
252-
--out-dir $(@D) --crate-name tidy
245+
tidy:
246+
else
247+
248+
# Run the tidy script in multiple parts to avoid huge 'echo' commands
249+
.PHONY: tidy
250+
tidy: tidy-basic tidy-binaries tidy-errors tidy-features
251+
252+
endif
253+
254+
.PHONY: tidy-basic
255+
tidy-basic:
256+
@$(call E, check: formatting)
257+
$(Q) $(CFG_PYTHON) $(S)src/etc/tidy.py $(S)src/
258+
259+
.PHONY: tidy-binaries
260+
tidy-binaries:
261+
@$(call E, check: binaries)
262+
$(Q)find $(S)src -type f \
263+
\( -perm -u+x -or -perm -g+x -or -perm -o+x \) \
264+
-not -name '*.rs' -and -not -name '*.py' \
265+
-and -not -name '*.sh' -and -not -name '*.pp' \
266+
| grep '^$(S)src/jemalloc' -v \
267+
| grep '^$(S)src/libuv' -v \
268+
| grep '^$(S)src/llvm' -v \
269+
| grep '^$(S)src/rt/hoedown' -v \
270+
| grep '^$(S)src/gyp' -v \
271+
| grep '^$(S)src/etc' -v \
272+
| grep '^$(S)src/doc' -v \
273+
| grep '^$(S)src/compiler-rt' -v \
274+
| grep '^$(S)src/libbacktrace' -v \
275+
| grep '^$(S)src/rust-installer' -v \
276+
| grep '^$(S)src/liblibc' -v \
277+
| xargs $(CFG_PYTHON) $(S)src/etc/check-binaries.py
278+
279+
.PHONY: tidy-errors
280+
tidy-errors:
281+
@$(call E, check: extended errors)
282+
$(Q) $(CFG_PYTHON) $(S)src/etc/errorck.py $(S)src/
283+
284+
.PHONY: tidy-features
285+
tidy-features:
286+
@$(call E, check: feature sanity)
287+
$(Q) $(CFG_PYTHON) $(S)src/etc/featureck.py $(S)src/
288+
253289

254290
######################################################################
255291
# Sets of tests

branches/try/src/bootstrap/Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

branches/try/src/bootstrap/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ path = "rustdoc.rs"
2121

2222
[dependencies]
2323
build_helper = { path = "../build_helper" }
24-
cmake = "0.1.17"
24+
cmake = "0.1.10"
2525
filetime = "0.1"
2626
num_cpus = "0.2"
2727
toml = "0.1"

branches/try/src/bootstrap/build/check.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,3 @@ pub fn cargotest(build: &Build, stage: u32, host: &str) {
3333
.env("PATH", newpath)
3434
.arg(&build.cargo));
3535
}
36-
37-
pub fn tidy(build: &Build, stage: u32, host: &str) {
38-
println!("tidy check stage{} ({})", stage, host);
39-
let compiler = Compiler::new(stage, host);
40-
build.run(build.tool_cmd(&compiler, "tidy")
41-
.arg(build.src.join("src")));
42-
}

branches/try/src/bootstrap/build/config.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ use toml::{Parser, Decoder, Value};
3131
#[derive(Default)]
3232
pub struct Config {
3333
pub ccache: bool,
34-
pub ninja: bool,
3534
pub verbose: bool,
3635
pub submodules: bool,
3736
pub compiler_docs: bool,
@@ -108,7 +107,6 @@ struct Build {
108107
#[derive(RustcDecodable, Default)]
109108
struct Llvm {
110109
ccache: Option<bool>,
111-
ninja: Option<bool>,
112110
assertions: Option<bool>,
113111
optimize: Option<bool>,
114112
version_check: Option<bool>,
@@ -202,9 +200,9 @@ impl Config {
202200

203201
if let Some(ref llvm) = toml.llvm {
204202
set(&mut config.ccache, llvm.ccache);
205-
set(&mut config.ninja, llvm.ninja);
206203
set(&mut config.llvm_assertions, llvm.assertions);
207204
set(&mut config.llvm_optimize, llvm.optimize);
205+
set(&mut config.llvm_optimize, llvm.optimize);
208206
set(&mut config.llvm_version_check, llvm.version_check);
209207
set(&mut config.llvm_static_stdcpp, llvm.static_libstdcpp);
210208
}

branches/try/src/bootstrap/build/mod.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,6 @@ impl Build {
197197
ToolCargoTest { stage } => {
198198
compile::tool(self, stage, target.target, "cargotest");
199199
}
200-
ToolTidy { stage } => {
201-
compile::tool(self, stage, target.target, "tidy");
202-
}
203200
DocBook { stage } => {
204201
doc::rustbook(self, stage, target.target, "book", &doc_out);
205202
}
@@ -233,9 +230,6 @@ impl Build {
233230
CheckCargoTest { stage } => {
234231
check::cargotest(self, stage, target.target);
235232
}
236-
CheckTidy { stage } => {
237-
check::tidy(self, stage, target.target);
238-
}
239233

240234
DistDocs { stage } => dist::docs(self, stage, target.target),
241235
DistMingw { _dummy } => dist::mingw(self, target.target),

branches/try/src/bootstrap/build/native.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ pub fn llvm(build: &Build, target: &str) {
4343

4444
// http://llvm.org/docs/CMake.html
4545
let mut cfg = cmake::Config::new(build.src.join("src/llvm"));
46-
if build.config.ninja {
47-
cfg.generator("Ninja");
48-
}
4946
cfg.target(target)
5047
.host(&build.config.build)
5148
.out_dir(&dst)

branches/try/src/bootstrap/build/sanity.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ pub fn check(build: &mut Build) {
4848
}
4949
}
5050
need_cmd("cmake".as_ref());
51-
if build.config.ninja {
52-
need_cmd("ninja".as_ref())
53-
}
5451
break
5552
}
5653

branches/try/src/bootstrap/build/step.rs

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ macro_rules! targets {
5151
(tool_rustbook, ToolRustbook { stage: u32 }),
5252
(tool_error_index, ToolErrorIndex { stage: u32 }),
5353
(tool_cargotest, ToolCargoTest { stage: u32 }),
54-
(tool_tidy, ToolTidy { stage: u32 }),
5554

5655
// Steps for long-running native builds. Ideally these wouldn't
5756
// actually exist and would be part of build scripts, but for now
@@ -80,7 +79,6 @@ macro_rules! targets {
8079
(check, Check { stage: u32, compiler: Compiler<'a> }),
8180
(check_linkcheck, CheckLinkcheck { stage: u32 }),
8281
(check_cargotest, CheckCargoTest { stage: u32 }),
83-
(check_tidy, CheckTidy { stage: u32 }),
8482

8583
// Distribution targets, creating tarballs
8684
(dist, Dist { stage: u32 }),
@@ -150,9 +148,7 @@ fn top_level(build: &Build) -> Vec<Step> {
150148
src: Source::Llvm { _dummy: () },
151149
target: &build.config.build,
152150
};
153-
if build.config.docs {
154-
targets.push(t.doc(stage));
155-
}
151+
targets.push(t.doc(stage));
156152
for host in build.config.host.iter() {
157153
if !build.flags.host.contains(host) {
158154
continue
@@ -320,12 +316,8 @@ impl<'a> Step<'a> {
320316
Source::CheckCargoTest { stage } => {
321317
vec![self.tool_cargotest(stage)]
322318
}
323-
Source::CheckTidy { stage } => {
324-
vec![self.tool_tidy(stage)]
325-
}
326319

327-
Source::ToolLinkchecker { stage } |
328-
Source::ToolTidy { stage } => {
320+
Source::ToolLinkchecker { stage } => {
329321
vec![self.libstd(self.compiler(stage))]
330322
}
331323
Source::ToolErrorIndex { stage } |
@@ -358,9 +350,7 @@ impl<'a> Step<'a> {
358350
let compiler = self.compiler(stage);
359351
for target in build.config.target.iter() {
360352
let target = self.target(target);
361-
if build.config.docs {
362-
base.push(target.dist_docs(stage));
363-
}
353+
base.push(target.dist_docs(stage));
364354
base.push(target.dist_std(compiler));
365355
}
366356
}

branches/try/src/bootstrap/mk/Makefile.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,5 @@ check-cargotest:
4242
$(Q)$(BOOTSTRAP) --step check-cargotest
4343
dist:
4444
$(Q)$(BOOTSTRAP) --step dist
45-
tidy:
46-
$(Q)$(BOOTSTRAP) --step check-tidy --stage 0
4745

4846
.PHONY: dist

branches/try/src/compiletest/compiletest.rs

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#![feature(box_syntax)]
1414
#![feature(libc)]
1515
#![feature(rustc_private)]
16+
#![feature(str_char)]
1617
#![feature(test)]
1718
#![feature(question_mark)]
1819

@@ -411,26 +412,16 @@ fn extract_gdb_version(full_version_line: Option<String>) -> Option<String> {
411412

412413
// used to be a regex "(^|[^0-9])([0-9]\.[0-9]+)"
413414
for (pos, c) in full_version_line.char_indices() {
414-
if !c.is_digit(10) {
415-
continue
416-
}
417-
if pos + 2 >= full_version_line.len() {
418-
continue
419-
}
420-
if full_version_line[pos + 1..].chars().next().unwrap() != '.' {
421-
continue
422-
}
423-
if !full_version_line[pos + 2..].chars().next().unwrap().is_digit(10) {
424-
continue
425-
}
426-
if pos > 0 && full_version_line[..pos].chars().next_back()
427-
.unwrap().is_digit(10) {
415+
if !c.is_digit(10) { continue }
416+
if pos + 2 >= full_version_line.len() { continue }
417+
if full_version_line.char_at(pos + 1) != '.' { continue }
418+
if !full_version_line.char_at(pos + 2).is_digit(10) { continue }
419+
if pos > 0 && full_version_line.char_at_reverse(pos).is_digit(10) {
428420
continue
429421
}
430422
let mut end = pos + 3;
431423
while end < full_version_line.len() &&
432-
full_version_line[end..].chars().next()
433-
.unwrap().is_digit(10) {
424+
full_version_line.char_at(end).is_digit(10) {
434425
end += 1;
435426
}
436427
return Some(full_version_line[pos..end].to_owned());
@@ -462,13 +453,13 @@ fn extract_lldb_version(full_version_line: Option<String>) -> Option<String> {
462453
for (pos, l) in full_version_line.char_indices() {
463454
if l != 'l' && l != 'L' { continue }
464455
if pos + 5 >= full_version_line.len() { continue }
465-
let l = full_version_line[pos + 1..].chars().next().unwrap();
456+
let l = full_version_line.char_at(pos + 1);
466457
if l != 'l' && l != 'L' { continue }
467-
let d = full_version_line[pos + 2..].chars().next().unwrap();
458+
let d = full_version_line.char_at(pos + 2);
468459
if d != 'd' && d != 'D' { continue }
469-
let b = full_version_line[pos + 3..].chars().next().unwrap();
460+
let b = full_version_line.char_at(pos + 3);
470461
if b != 'b' && b != 'B' { continue }
471-
let dash = full_version_line[pos + 4..].chars().next().unwrap();
462+
let dash = full_version_line.char_at(pos + 4);
472463
if dash != '-' { continue }
473464

474465
let vers = full_version_line[pos + 5..].chars().take_while(|c| {

branches/try/src/compiletest/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ fn parse_expected(last_nonfollow_error: Option<usize>,
115115
tag: &str)
116116
-> Option<(WhichLine, ExpectedError)> {
117117
let start = match line.find(tag) { Some(i) => i, None => return None };
118-
let (follow, adjusts) = if line[start + tag.len()..].chars().next().unwrap() == '|' {
118+
let (follow, adjusts) = if line.char_at(start + tag.len()) == '|' {
119119
(true, 0)
120120
} else {
121121
(false, line[start + tag.len()..].chars().take_while(|c| *c == '^').count())

branches/try/src/compiletest/runtest.rs

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -868,11 +868,27 @@ fn cleanup_debug_info_options(options: &Option<String>) -> Option<String> {
868868
"-g".to_owned(),
869869
"--debuginfo".to_owned()
870870
];
871-
let new_options =
871+
let mut new_options =
872872
split_maybe_args(options).into_iter()
873873
.filter(|x| !options_to_remove.contains(x))
874874
.collect::<Vec<String>>();
875875

876+
let mut i = 0;
877+
while i + 1 < new_options.len() {
878+
if new_options[i] == "-Z" {
879+
// FIXME #31005 MIR missing debuginfo currently.
880+
if new_options[i + 1] == "orbit" {
881+
// Remove "-Z" and "orbit".
882+
new_options.remove(i);
883+
new_options.remove(i);
884+
continue;
885+
}
886+
// Always skip over -Z's argument.
887+
i += 1;
888+
}
889+
i += 1;
890+
}
891+
876892
Some(new_options.join(" "))
877893
}
878894

@@ -1161,7 +1177,7 @@ fn scan_char(haystack: &str, needle: char, idx: &mut usize) -> bool {
11611177
if *idx >= haystack.len() {
11621178
return false;
11631179
}
1164-
let ch = haystack[*idx..].chars().next().unwrap();
1180+
let ch = haystack.char_at(*idx);
11651181
if ch != needle {
11661182
return false;
11671183
}
@@ -1172,7 +1188,7 @@ fn scan_char(haystack: &str, needle: char, idx: &mut usize) -> bool {
11721188
fn scan_integer(haystack: &str, idx: &mut usize) -> bool {
11731189
let mut i = *idx;
11741190
while i < haystack.len() {
1175-
let ch = haystack[i..].chars().next().unwrap();
1191+
let ch = haystack.char_at(i);
11761192
if ch < '0' || '9' < ch {
11771193
break;
11781194
}
@@ -1192,7 +1208,7 @@ fn scan_string(haystack: &str, needle: &str, idx: &mut usize) -> bool {
11921208
if haystack_i >= haystack.len() {
11931209
return false;
11941210
}
1195-
let ch = haystack[haystack_i..].chars().next().unwrap();
1211+
let ch = haystack.char_at(haystack_i);
11961212
haystack_i += ch.len_utf8();
11971213
if !scan_char(needle, ch, &mut needle_i) {
11981214
return false;

0 commit comments

Comments
 (0)