Skip to content

Commit 5b82a2e

Browse files
committed
---
yaml --- r: 179583 b: refs/heads/master c: 8ee8686 h: refs/heads/master i: 179581: 96bc6cd 179579: 546bfde 179575: 5a57fc3 179567: 0de9b0e 179551: aec7216 179519: 2a4b73f 179455: 4067410 v: v3
1 parent 372ef14 commit 5b82a2e

File tree

881 files changed

+10255
-6064
lines changed

Some content is hidden

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

881 files changed

+10255
-6064
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 4ef7551ccacd4d2042493f2ed905813b297634d0
2+
refs/heads/master: 8ee86860bc1a16b24aa4c61ef6dee8967c521e1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 0ba9e1fa52627404a1e5b90f745f96a872a0c564
55
refs/heads/try: ccf8fedf1cffcb8f6f3581d53d220039e192fe77

trunk/Makefile.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@
5959
# * check-stage$(stage)-$(crate) - Test a crate in a specific stage
6060
# * check-stage$(stage)-{rpass,rfail,cfail,rmake,...} - Run tests in src/test/
6161
# * check-stage1-T-$(target)-H-$(host) - Run cross-compiled-tests
62+
# * tidy-basic - show file / line stats
63+
# * tidy-errors - show the highest rustc error code
64+
# * tidy-features - show the status of language and lib features
6265
#
6366
# Then mix in some of these environment variables to harness the
6467
# ultimate power of The Rust Build System.

trunk/configure

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -653,9 +653,7 @@ probe CFG_GRUN grun
653653
probe CFG_FLEX flex
654654
probe CFG_BISON bison
655655
probe CFG_PANDOC pandoc
656-
probe CFG_PDFLATEX pdflatex
657656
probe CFG_XELATEX xelatex
658-
probe CFG_LUALATEX lualatex
659657
probe CFG_GDB gdb
660658
probe CFG_LLDB lldb
661659

trunk/man/rustc.1

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,15 @@ Display the help message
1818
\fB\-\-cfg\fR SPEC
1919
Configure the compilation environment
2020
.TP
21-
\fB\-L\fR PATH
22-
Add a directory to the library search path
23-
.TP
24-
\fB\-l\fR NAME[:KIND]
21+
\fB\-L\fR [KIND=]PATH
22+
Add a directory to the library search path. The optional KIND can be one of:
23+
dependency = only lookup transitive dependencies here
24+
crate = only lookup local `extern crate` directives here
25+
native = only lookup native libraries here
26+
framework = only look for OSX frameworks here
27+
all = look for anything here (the default)
28+
.TP
29+
\fB\-l\fR [KIND=]NAME
2530
Link the generated crate(s) to the specified native library NAME. The optional
2631
KIND can be one of, static, dylib, or framework. If omitted, dylib is assumed.
2732
.TP

trunk/mk/docs.mk

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -85,27 +85,16 @@ else
8585
HTML_DEPS :=
8686
endif
8787

88-
# Check for the various external utilities for the EPUB/PDF docs:
89-
90-
ifeq ($(CFG_LUALATEX),)
91-
$(info cfg: no lualatex found, deferring to xelatex)
92-
ifeq ($(CFG_XELATEX),)
93-
$(info cfg: no xelatex found, deferring to pdflatex)
94-
ifeq ($(CFG_PDFLATEX),)
95-
$(info cfg: no pdflatex found, disabling LaTeX docs)
96-
NO_PDF_DOCS = 1
97-
else
98-
CFG_LATEX := $(CFG_PDFLATEX)
99-
endif
100-
else
88+
# Check for xelatex
89+
90+
ifeq ($(CFG_XELATEX),)
10191
CFG_LATEX := $(CFG_XELATEX)
10292
XELATEX = 1
103-
endif
104-
else
105-
CFG_LATEX := $(CFG_LUALATEX)
93+
else
94+
$(info cfg: no xelatex found, disabling LaTeX docs)
95+
NO_PDF_DOCS = 1
10696
endif
10797

108-
10998
ifeq ($(CFG_PANDOC),)
11099
$(info cfg: no pandoc found, omitting PDF and EPUB docs)
111100
ONLY_HTML_DOCS = 1

trunk/mk/main.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ endif
7272
# numbers and dots here
7373
CFG_VERSION_WIN = $(CFG_RELEASE_NUM)
7474

75+
CFG_INFO := $(info cfg: version $(CFG_VERSION))
7576

7677
######################################################################
7778
# More configuration
@@ -179,6 +180,7 @@ endif
179180

180181
ifndef CFG_DISABLE_VALGRIND_RPASS
181182
$(info cfg: enabling valgrind run-pass tests (CFG_ENABLE_VALGRIND_RPASS))
183+
$(info cfg: valgrind-rpass command set to $(CFG_VALGRIND))
182184
CFG_VALGRIND_RPASS :=$(CFG_VALGRIND)
183185
else
184186
CFG_VALGRIND_RPASS :=

trunk/mk/tests.mk

Lines changed: 25 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ $(foreach file,$(wildcard $(S)src/doc/trpl/*.md), \
162162
######################################################################
163163

164164
# The main testing target. Tests lots of stuff.
165-
check: cleantmptestlogs cleantestlibs check-notidy tidy
165+
check: cleantmptestlogs cleantestlibs all check-stage2 tidy
166+
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
166167

167168
# As above but don't bother running tidy.
168169
check-notidy: cleantmptestlogs cleantestlibs all check-stage2
@@ -235,57 +236,24 @@ cleantestlibs:
235236
######################################################################
236237

237238
ifdef CFG_NOTIDY
239+
.PHONY: tidy
238240
tidy:
239241
else
240242

241-
ALL_CS := $(wildcard $(S)src/rt/*.cpp \
242-
$(S)src/rt/*/*.cpp \
243-
$(S)src/rt/*/*/*.cpp \
244-
$(S)src/rustllvm/*.cpp)
245-
ALL_CS := $(filter-out $(S)src/rt/miniz.cpp \
246-
$(wildcard $(S)src/rt/hoedown/src/*.c) \
247-
$(wildcard $(S)src/rt/hoedown/bin/*.c) \
248-
,$(ALL_CS))
249-
ALL_HS := $(wildcard $(S)src/rt/*.h \
250-
$(S)src/rt/*/*.h \
251-
$(S)src/rt/*/*/*.h \
252-
$(S)src/rustllvm/*.h)
253-
ALL_HS := $(filter-out $(S)src/rt/valgrind/valgrind.h \
254-
$(S)src/rt/valgrind/memcheck.h \
255-
$(S)src/rt/msvc/typeof.h \
256-
$(S)src/rt/msvc/stdint.h \
257-
$(S)src/rt/msvc/inttypes.h \
258-
$(wildcard $(S)src/rt/hoedown/src/*.h) \
259-
$(wildcard $(S)src/rt/hoedown/bin/*.h) \
260-
,$(ALL_HS))
261-
262243
# Run the tidy script in multiple parts to avoid huge 'echo' commands
263-
tidy:
244+
.PHONY: tidy
245+
tidy: tidy-basic tidy-binaries tidy-errors tidy-features
246+
247+
endif
248+
249+
.PHONY: tidy-basic
250+
tidy-basic:
264251
@$(call E, check: formatting)
265-
$(Q)find $(S)src -name '*.r[sc]' \
266-
-and -not -regex '^$(S)src/jemalloc.*' \
267-
-and -not -regex '^$(S)src/libuv.*' \
268-
-and -not -regex '^$(S)src/llvm.*' \
269-
-and -not -regex '^$(S)src/gyp.*' \
270-
-and -not -regex '^$(S)src/libbacktrace.*' \
271-
-print0 \
272-
| xargs -0 -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
273-
$(Q)find $(S)src/etc -name '*.py' \
274-
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
275-
$(Q)find $(S)src/doc -name '*.js' \
276-
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
277-
$(Q)find $(S)src/etc -name '*.sh' \
278-
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
279-
$(Q)find $(S)src/etc -name '*.pl' \
280-
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
281-
$(Q)find $(S)src/etc -name '*.c' \
282-
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
283-
$(Q)find $(S)src/etc -name '*.h' \
284-
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
285-
$(Q)echo $(ALL_CS) \
286-
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
287-
$(Q)echo $(ALL_HS) \
288-
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
252+
$(Q) $(CFG_PYTHON) $(S)src/etc/tidy.py $(S)src/
253+
254+
.PHONY: tidy-binaries
255+
tidy-binaries:
256+
@$(call E, check: binaries)
289257
$(Q)find $(S)src -type f -perm +a+x \
290258
-not -name '*.rs' -and -not -name '*.py' \
291259
-and -not -name '*.sh' \
@@ -300,11 +268,16 @@ tidy:
300268
| grep '^$(S)src/libbacktrace' -v \
301269
| grep '^$(S)src/rust-installer' -v \
302270
| xargs $(CFG_PYTHON) $(S)src/etc/check-binaries.py
303-
$(Q) $(CFG_PYTHON) $(S)src/etc/errorck.py $(S)src/
304-
$(Q) $(CFG_PYTHON) $(S)src/etc/featureck.py $(S)src/
305271

272+
.PHONY: tidy-errors
273+
tidy-errors:
274+
@$(call E, check: extended errors)
275+
$(Q) $(CFG_PYTHON) $(S)src/etc/errorck.py $(S)src/
306276

307-
endif
277+
.PHONY: tidy-features
278+
tidy-features:
279+
@$(call E, check: feature sanity)
280+
$(Q) $(CFG_PYTHON) $(S)src/etc/featureck.py $(S)src/
308281

309282

310283
######################################################################
@@ -479,6 +452,7 @@ RPASS_FULL_RS := $(wildcard $(S)src/test/run-pass-fulldeps/*.rs)
479452
CFAIL_FULL_RS := $(wildcard $(S)src/test/compile-fail-fulldeps/*.rs)
480453
RFAIL_RS := $(wildcard $(S)src/test/run-fail/*.rs)
481454
CFAIL_RS := $(wildcard $(S)src/test/compile-fail/*.rs)
455+
PFAIL_RS := $(wildcard $(S)src/test/parse-fail/*.rs)
482456
BENCH_RS := $(wildcard $(S)src/test/bench/*.rs)
483457
PRETTY_RS := $(wildcard $(S)src/test/pretty/*.rs)
484458
DEBUGINFO_GDB_RS := $(wildcard $(S)src/test/debuginfo/*.rs)
@@ -495,7 +469,7 @@ RPASS_VALGRIND_TESTS := $(RPASS_VALGRIND_RS)
495469
RPASS_FULL_TESTS := $(RPASS_FULL_RS)
496470
CFAIL_FULL_TESTS := $(CFAIL_FULL_RS)
497471
RFAIL_TESTS := $(RFAIL_RS)
498-
CFAIL_TESTS := $(CFAIL_RS)
472+
CFAIL_TESTS := $(CFAIL_RS) $(PFAIL_RS)
499473
BENCH_TESTS := $(BENCH_RS)
500474
PERF_TESTS := $(PERF_RS)
501475
PRETTY_TESTS := $(PRETTY_RS)
@@ -639,7 +613,6 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
639613

640614
ifdef CFG_VALGRIND_RPASS
641615
ifdef GOOD_VALGRIND_$(2)
642-
$(info cfg: valgrind-path set to $(CFG_VALGRIND_RPASS))
643616
CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) += --valgrind-path "$(CFG_VALGRIND_RPASS)"
644617
endif
645618
endif

trunk/src/compiletest/compiletest.rs

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -97,28 +97,31 @@ pub fn parse_config(args: Vec<String> ) -> Config {
9797
assert!(!args.is_empty());
9898
let argv0 = args[0].clone();
9999
let args_ = args.tail();
100-
if args[1].as_slice() == "-h" || args[1].as_slice() == "--help" {
100+
if args[1] == "-h" || args[1] == "--help" {
101101
let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0);
102-
println!("{}", getopts::usage(message.as_slice(), groups.as_slice()));
102+
println!("{}", getopts::usage(&message, &groups));
103103
println!("");
104104
panic!()
105105
}
106106

107107
let matches =
108-
&match getopts::getopts(args_.as_slice(), groups.as_slice()) {
108+
&match getopts::getopts(args_, &groups) {
109109
Ok(m) => m,
110110
Err(f) => panic!("{:?}", f)
111111
};
112112

113113
if matches.opt_present("h") || matches.opt_present("help") {
114114
let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0);
115-
println!("{}", getopts::usage(message.as_slice(), groups.as_slice()));
115+
println!("{}", getopts::usage(&message, &groups));
116116
println!("");
117117
panic!()
118118
}
119119

120120
fn opt_path(m: &getopts::Matches, nm: &str) -> Path {
121-
Path::new(m.opt_str(nm).unwrap())
121+
match m.opt_str(nm) {
122+
Some(s) => Path::new(s),
123+
None => panic!("no option (=path) found for {}", nm),
124+
}
122125
}
123126

124127
let filter = if !matches.free.is_empty() {
@@ -156,9 +159,9 @@ pub fn parse_config(args: Vec<String> ) -> Config {
156159
adb_test_dir: opt_str2(matches.opt_str("adb-test-dir")),
157160
adb_device_status:
158161
"arm-linux-androideabi" ==
159-
opt_str2(matches.opt_str("target")).as_slice() &&
162+
opt_str2(matches.opt_str("target")) &&
160163
"(none)" !=
161-
opt_str2(matches.opt_str("adb-test-dir")).as_slice() &&
164+
opt_str2(matches.opt_str("adb-test-dir")) &&
162165
!opt_str2(matches.opt_str("adb-test-dir")).is_empty(),
163166
lldb_python_dir: matches.opt_str("lldb-python-dir"),
164167
verbose: matches.opt_present("verbose"),
@@ -201,7 +204,7 @@ pub fn log_config(config: &Config) {
201204
pub fn opt_str<'a>(maybestr: &'a Option<String>) -> &'a str {
202205
match *maybestr {
203206
None => "(none)",
204-
Some(ref s) => s.as_slice(),
207+
Some(ref s) => s,
205208
}
206209
}
207210

@@ -213,7 +216,7 @@ pub fn opt_str2(maybestr: Option<String>) -> String {
213216
}
214217

215218
pub fn run_tests(config: &Config) {
216-
if config.target.as_slice() == "arm-linux-androideabi" {
219+
if config.target == "arm-linux-androideabi" {
217220
match config.mode {
218221
DebugInfoGdb => {
219222
println!("arm-linux-androideabi debug-info \
@@ -306,13 +309,13 @@ pub fn is_test(config: &Config, testfile: &Path) -> bool {
306309
let mut valid = false;
307310

308311
for ext in &valid_extensions {
309-
if name.ends_with(ext.as_slice()) {
312+
if name.ends_with(ext) {
310313
valid = true;
311314
}
312315
}
313316

314317
for pre in &invalid_prefixes {
315-
if name.starts_with(pre.as_slice()) {
318+
if name.starts_with(pre) {
316319
valid = false;
317320
}
318321
}
@@ -359,7 +362,7 @@ pub fn make_metrics_test_closure(config: &Config, testfile: &Path) -> test::Test
359362
let config = (*config).clone();
360363
// FIXME (#9639): This needs to handle non-utf8 paths
361364
let testfile = testfile.as_str().unwrap().to_string();
362-
test::DynMetricFn(box move |: mm: &mut test::MetricMap| {
365+
test::DynMetricFn(box move |mm: &mut test::MetricMap| {
363366
runtest::run_metrics(config, testfile, mm)
364367
})
365368
}

trunk/src/compiletest/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub fn load_errors(testfile: &Path) -> Vec<ExpectedError> {
4444
rdr.lines().enumerate().filter_map(|(line_no, ln)| {
4545
parse_expected(last_nonfollow_error,
4646
line_no + 1,
47-
ln.unwrap().as_slice())
47+
&ln.unwrap())
4848
.map(|(which, error)| {
4949
match which {
5050
FollowPrevious(_) => {}

0 commit comments

Comments
 (0)