Skip to content

Rollup of 15 pull requests #21530

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 172 commits into from
Jan 23, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
172 commits
Select commit Hold shift + click to select a range
a72bd69
added optional method chain indentations for emacs major mode
KOMON Dec 16, 2014
ac110df
Expand the section on closures in TRPL.
js-ojus Jan 13, 2015
3819c22
add a section on performance to collection docs
Gankra Jan 16, 2015
bd621f0
Project region bounds out of the trait when deciding whether a
nikomatsakis Jan 16, 2015
b7ef34d
Add regression test for #20971. Fixes #20791.
nikomatsakis Jan 16, 2015
1138579
Add regression test for #20797. Fixes #20797.
nikomatsakis Jan 16, 2015
fe0868b
Add regression tests for #20763. Fixes #20763.
nikomatsakis Jan 16, 2015
785176b
rustup: Don't attempt to download SHA if it exists
mkpankov Jan 15, 2015
618cf5f
Refine wording of Thread::panicking
nagisa Jan 17, 2015
a32249d
libsyntax: uint types to usize
pshc Jan 17, 2015
fa01251
rustc: print filename if file cannot be written
stepancheg Jan 18, 2015
d5c8365
libsyntax: rename functions from uint to usize
pshc Jan 17, 2015
7b4c508
rustdoc: Add Show impls to more clean types
tomjakubowski Jan 14, 2015
d47a113
Remove some dead code from rustc::middle::ty
tomjakubowski Jan 14, 2015
aaf595e
rustdoc: Separate associated types from methods
tomjakubowski Jan 14, 2015
e930aeb
rustdoc: Accept string source in core::run_core
tomjakubowski Jan 18, 2015
8224e0e
rustdoc: Add some re-exports
tomjakubowski Jan 18, 2015
159236a
rustdoc: Handle associated types on inlined impls
tomjakubowski Jan 18, 2015
23a553a
Improve the vec![...] macro with UFCS.
eddyb Jan 18, 2015
f7fe249
Remove associated_types gate from std::ops docs
steveklabnik Jan 18, 2015
e3d099d
Fix #21356
aochagavia Jan 18, 2015
c821e5c
Add test for issue #21356
aochagavia Jan 18, 2015
4347cbb
Error message fixes and removed explicit returns in example code
angst7 Jan 18, 2015
9293607
quick formatting fix
angst7 Jan 18, 2015
c034f4a
Make date of nightly in rustup match server TZ
estsauver Jan 17, 2015
7a24b3a
libsyntax: int => i32 in appropriate places
pshc Jan 17, 2015
5913374
libsyntax: int types -> isize
pshc Jan 18, 2015
3c32cd1
libsyntax: 0u -> 0us, 0i -> 0is
pshc Jan 18, 2015
2c2480d
Replace `0 as *const/mut T` with `ptr::null/null_mut()`
petrochenkov Jan 19, 2015
abccfa4
Impl Send for Timer on Windows
retep998 Jan 19, 2015
d2623f2
rt: Remove libtime wrappers
klutzy Jan 19, 2015
74e111c
impl Iterator for &mut Iterator and Box<Iterator>
Jan 19, 2015
8c3d914
Change the title of if statement in trpl book.
loganchien Jan 19, 2015
4968485
remove unnecessary parentheses from range notation
Jan 19, 2015
3c37a95
Updates of the fix
GuillaumeGomez Jan 19, 2015
e0eb3cc
Kill TraitStore
Jan 18, 2015
8e1e0f0
Remove onceness & bounds - they don't do anything.
Jan 18, 2015
ed769bf
Fix up some ‘help’ messages
ftxqxd Jan 20, 2015
d7b30f9
Remove ratchet-bench from configure.
ahmedcharles Jan 19, 2015
ec41785
Remove unsupported test features from compiletest.
ahmedcharles Jan 19, 2015
4f6f7e5
Remove unsupported test features from libtest.
ahmedcharles Jan 19, 2015
9400805
Initial support for aarch64-linux-android
ejjeong Jan 20, 2015
09d9924
librustc: hint close matches on accessing nonexisting fields
Jan 20, 2015
a729a40
Use assume to inform the optimiser about refcount invariants
Aatch Jan 20, 2015
849a38a
Avoid suggesting traits multiple times.
huonw Jan 20, 2015
01d7b8c
Correct small typos in map.rs.
Jan 20, 2015
f2b8404
prettier Buffer::read_until
Jan 16, 2015
1f50542
docs: typo
Jan 20, 2015
953f294
rustc: Remove deprecated flags
alexcrichton Jan 20, 2015
953d6df
Make error code registration work again. #19624
brson Jan 16, 2015
0c5225c
Add error codes to rustc_typeck
brson Jan 17, 2015
f68029e
Make fatal errors work with codes, add to typeck
brson Jan 18, 2015
cf629e7
Add error codes to resolve
brson Jan 18, 2015
9f59f7e
Add error codes to rustc
brson Jan 19, 2015
9a4401f
Add some extended errors.
michaelsproul Jan 18, 2015
b6380f5
Kill RacyCell in favor of marking SyncSender explicitly Send.
taralx Jan 20, 2015
9bbfd68
Add assumptions that the pointer is non-null
Aatch Jan 20, 2015
64914d9
rustc: Remove deprecated lint names
alexcrichton Jan 20, 2015
a7525bc
Add more explanation for why the assumes are there
Aatch Jan 20, 2015
ace2f09
alloc::boxed: enable test
stepancheg Jan 20, 2015
cd631c6
Register snapshot for 9006c3c
flaper87 Jan 20, 2015
8051bd0
Changed rust-mode code for tabs -> spaces
KOMON Jan 20, 2015
876b266
Make multiline errors work with codes
brson Jan 20, 2015
00cddb0
also forward Iterator::size_hint()
Jan 20, 2015
9714d3c
tests: uncomment regression tests for 13970, 13971, 13972
emberian Jan 20, 2015
1f6eb34
docs: Update for clarity
alfiedotwtf Jan 21, 2015
2cc7feb
implement `ExactSizeIterator` for `slice::{Chunks,ChunksMut}`
apasel422 Jan 12, 2015
eb08650
Display negative trait implementations correctly in rustdoc
Diggsey Jan 21, 2015
ed56c15
remove `NoSendItem` and `NoSyncItem`
Jan 19, 2015
3cb9fa2
std: Rename Show/String to Debug/Display
alexcrichton Jan 20, 2015
f5e093f
Remove write_metric_diff and supporting code.
ahmedcharles Jan 19, 2015
72ae518
Remove compare_to_old().
ahmedcharles Jan 20, 2015
eb00913
Remove ratchet().
ahmedcharles Jan 20, 2015
a55ef3a
debuginfo: Make debuginfo source location assignment more stable (Pt. 1)
michaelwoerister Dec 11, 2014
d4ced7b
De-mut the parser
sanxiyn Jan 21, 2015
53edd76
Remove feature(import_shadowing).
eddyb Dec 20, 2014
38ac9e3
syntax: merge ast::ViewItem into ast::Item.
eddyb Dec 23, 2014
7cece87
syntax: fix fallout of merging ast::ViewItem into ast::Item.
eddyb Jan 13, 2015
e389ab1
rustc_back: fix fallout of merging ast::ViewItem into ast::Item.
eddyb Dec 23, 2014
cfb63d5
rustc: fix fallout of merging ast::ViewItem into ast::Item.
eddyb Dec 23, 2014
9370ae1
rustc_typeck: fix fallout of merging ast::ViewItem into ast::Item.
eddyb Dec 23, 2014
c91761e
rustc_trans: fix fallout of merging ast::ViewItem into ast::Item.
eddyb Dec 23, 2014
7dbefce
rustc_driver: fix fallout of merging ast::ViewItem into ast::Item.
eddyb Dec 23, 2014
f83a972
rustc_resolve: fix fallout of merging ast::ViewItem into ast::Item.
eddyb Dec 23, 2014
3102b9e
rustdoc: fix fallout of merging ast::ViewItem into ast::Item.
eddyb Dec 26, 2014
838b2ea
docs: fix fallout of merging ast::ViewItem into ast::Item.
eddyb Dec 26, 2014
fba0bf6
Stabilize Index traits and most range notation
aturon Jan 16, 2015
092ba6a
Deprecate slicing methods in favor of notation
aturon Jan 18, 2015
a506d4c
Fallout from stabilization.
aturon Jan 18, 2015
da8023d
Change init-large-type to use child thread
aturon Jan 21, 2015
29e5d8d
Improve quality of String#to_slice() deprecation message
steveklabnik Jan 14, 2015
83af23e
rollup merge of #19913: KOMON/rust-mode-emacs-indentation
alexcrichton Jan 21, 2015
2e9adab
rollup merge of #21053: apasel422/exact
alexcrichton Jan 21, 2015
550255d
rollup merge of #21138: mkpankov/master
alexcrichton Jan 21, 2015
89b2e23
rollup merge of #21157: steveklabnik/deprecation
alexcrichton Jan 21, 2015
41890bf
rollup merge of #21274: estsauver/21270
alexcrichton Jan 21, 2015
b250d9a
rollup merge of #21289: brson/errorcodes
alexcrichton Jan 21, 2015
5da2538
rollup merge of #21333: stepancheg/trans-write-diag
alexcrichton Jan 21, 2015
0c98187
rollup merge of #21340: pshc/libsyntax-no-more-ints
alexcrichton Jan 21, 2015
5123f75
rollup merge of #21342: Diggsey/issue-21310
alexcrichton Jan 21, 2015
0447721
rollup merge of #21354: eddyb/vec-ufcs
alexcrichton Jan 21, 2015
ecc9dcc
rollup merge of #21367: steveklabnik/remove_gate
alexcrichton Jan 21, 2015
5fda9bc
rollup merge of #21368: tomjakubowski/rustdoc-miscellany
alexcrichton Jan 21, 2015
9173797
rollup merge of #21372: arielb1/remove-the-box
alexcrichton Jan 21, 2015
8b10733
rollup merge of #21389: retep998/timer
alexcrichton Jan 21, 2015
ad2c3e8
rollup merge of #21391: klutzy/rt-time-cleanup
alexcrichton Jan 21, 2015
9227db3
rollup merge of #21392: japaric/iter
alexcrichton Jan 21, 2015
e4434f9
rollup merge of #21393: loganchien/fix-if-stmt-doc-title
alexcrichton Jan 21, 2015
4b6a056
rollup merge of #21394: japaric/nonono
alexcrichton Jan 21, 2015
1646707
rollup merge of #21396: japaric/no-parens-in-range
alexcrichton Jan 21, 2015
5d82c0f
rollup merge of #21411: P1start/help-tweaks
alexcrichton Jan 21, 2015
81504f2
rollup merge of #21413: ahmedcharles/remove-test-features
alexcrichton Jan 21, 2015
a6780d8
rollup merge of #21414: ejjeong/aarch64-linux-android
alexcrichton Jan 21, 2015
229243c
rollup merge of #21418: Aatch/assume-refcount
alexcrichton Jan 21, 2015
e4e9a27
rollup merge of #21419: Toby-S/patch-1
alexcrichton Jan 21, 2015
bf77f6c
rollup merge of #21421: huonw/one-suggestion-per-trait
alexcrichton Jan 21, 2015
9ef5484
rollup merge of #21423: oli-obk/prettier_read_until
alexcrichton Jan 21, 2015
28937be
rollup merge of #21429: GuillaumeGomez/macro-fix
alexcrichton Jan 21, 2015
de89dc8
rollup merge of #21433: alfie/typobook
alexcrichton Jan 21, 2015
04a2255
rollup merge of #21437: FlaPer87/snapshot
alexcrichton Jan 21, 2015
2783807
rollup merge of #21438: taralx/kill-racycell
alexcrichton Jan 21, 2015
b5de833
rollup merge of #21441: alexcrichton/rustc-opts
alexcrichton Jan 21, 2015
907db6c
rollup merge of #21444: petrochenkov/null
alexcrichton Jan 21, 2015
efea645
rollup merge of #21446: stepancheg/boxed-test
alexcrichton Jan 21, 2015
e4b81d2
rollup merge of #21447: cmr/master
alexcrichton Jan 21, 2015
87c3ee8
rollup merge of #21457: alexcrichton/issue-21436
alexcrichton Jan 21, 2015
79708e6
rollup merge of #21462: ahmedcharles/remove-ratchet
alexcrichton Jan 21, 2015
9c999c7
rollup merge of #21463: sanxiyn/demut
alexcrichton Jan 21, 2015
3a44107
debuginfo: Fix issue with associated types and struct fields
michaelwoerister Jan 21, 2015
973c2f6
Explain that RefCell is single-threaded.
steveklabnik Jan 21, 2015
139346a
tests: fix fallout of merging ast::ViewItem into ast::Item.
eddyb Dec 26, 2014
652445f
Added some tests for arbitrary ordered view items
Kimundi Jan 2, 2015
5e07f5a
Added another test with success local-item shadowing
eddyb Jan 13, 2015
2d17a33
Deny imports after non-item statements.
eddyb Jan 13, 2015
4ffde08
Test fixes and rebase conflicts
alexcrichton Jan 21, 2015
537889a
Fix type inference problems in tests and docs
aturon Jan 21, 2015
626db33
Move regression test for #20971 into run-fail, since it panics.
nikomatsakis Jan 21, 2015
f4df69a
rollup merge of #20642: michaelwoerister/sane-source-locations-pt1
alexcrichton Jan 21, 2015
036d8c4
rollup merge of #21252: nikomatsakis/assoc-type-ice-hunt-take-2
alexcrichton Jan 21, 2015
886c6f3
rollup merge of #21258: aturon/stab-3-index
alexcrichton Jan 21, 2015
bbbdd10
Improve RwLock::new's docs
steveklabnik Jan 21, 2015
df1cddf
rollup merge of #20179: eddyb/blind-items
alexcrichton Jan 21, 2015
23da54d
Move rustdoc.md into the book
steveklabnik Jan 21, 2015
ecbee2e
More test fixes and rebase conflicts
alexcrichton Jan 21, 2015
ee253c9
Revert "Add more explanation for why the assumes are there"
alexcrichton Jan 21, 2015
e6f85c2
Revert "Add assumptions that the pointer is non-null"
alexcrichton Jan 21, 2015
91cec5b
Revert "Use assume to inform the optimiser about refcount invariants"
alexcrichton Jan 21, 2015
22d2387
add doc examples for connect/concat
steveklabnik Jan 21, 2015
a2936a3
Make compiletest set an environment variable so that on Windows 32-bi…
ColonelJ Jan 22, 2015
90af723
Make diagnostic ordering deterministic
alexcrichton Jan 21, 2015
5d2056a
Auto merge of #21473 - alexcrichton:rollup, r=alexcrichton
bors Jan 22, 2015
48aa068
powerpc: Fix liblibc
richo Jan 22, 2015
b7930d9
Auto merge of #21187 - oli-obk:feature/hint_struct_field_access, r=al…
bors Jan 22, 2015
8160fc4
Auto merge of #21078 - js-ojus:master, r=steveklabnik
bors Jan 22, 2015
42cbd7a
Reference correct fn during lifetime ellision
SeanTAllen Jan 22, 2015
cef8295
Return the String guide to its former glory.
steveklabnik Jan 12, 2015
5a3bded
Beef up docs for Box<T>
steveklabnik Jan 22, 2015
d1c7ae4
Rollup merge of #21056 - steveklabnik:return_strings, r=sfackler
steveklabnik Jan 22, 2015
c76ce8c
Rollup merge of #21091 - steveklabnik:add_attribute_docs, r=huonw
steveklabnik Jan 22, 2015
4db64bd
Rollup merge of #21217 - Gankro:docadoca, r=steveklabnik
steveklabnik Jan 22, 2015
3364d41
Rollup merge of #21325 - nagisa:thread-panicking, r=steveklabnik
steveklabnik Jan 22, 2015
5f71c22
Rollup merge of #21373 - angst7:pointer_doc_1, r=steveklabnik
steveklabnik Jan 22, 2015
1644978
Rollup merge of #21450 - alfie:book2, r=steveklabnik
steveklabnik Jan 22, 2015
07fb31a
Rollup merge of #21471 - michaelwoerister:associated-types, r=alexcri…
steveklabnik Jan 22, 2015
0b793ea
Rollup merge of #21472 - steveklabnik:gh21469, r=huonw
steveklabnik Jan 22, 2015
22ed381
Rollup merge of #21477 - steveklabnik:gh21440, r=alexcrichton
steveklabnik Jan 22, 2015
aa874ab
Rollup merge of #21479 - steveklabnik:rustdoc_to_book, r=alexcrichton
steveklabnik Jan 22, 2015
acd044c
Rollup merge of #21484 - steveklabnik:connect_docs, r=alexcrichton
steveklabnik Jan 22, 2015
dc27d29
Rollup merge of #21496 - ColonelJ:paatch, r=alexcrichton
steveklabnik Jan 22, 2015
bb80310
Rollup merge of #21500 - richo:power-fixups, r=alexcrichton
steveklabnik Jan 22, 2015
b994a3e
Rollup merge of #21516 - steveklabnik:document_box, r=alexcrichton
steveklabnik Jan 22, 2015
9fb672b
Rollup merge of #21517 - SeanTAllen:master, r=steveklabnik
steveklabnik Jan 22, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,6 @@ opt optimize-tests 1 "build tests with optimizations"
opt libcpp 1 "build with llvm with libc++ instead of libstdc++ when using clang"
opt llvm-assertions 1 "build LLVM with assertions"
opt debug 1 "build with extra debug fun"
opt ratchet-bench 0 "ratchet benchmarks"
opt fast-make 0 "use .gitmodules as timestamp for submodule deps"
opt ccache 0 "invoke gcc/clang via ccache to reuse object files between builds"
opt local-rust 0 "use an installed rustc rather than downloading a snapshot"
Expand Down
30 changes: 30 additions & 0 deletions mk/cfg/aarch64-linux-android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# aarch64-linux-android configuration
# CROSS_PREFIX_aarch64-linux-android-
CC_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-gcc
CXX_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-g++
CPP_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-gcc -E
AR_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-ar
CFG_LIB_NAME_aarch64-linux-android=lib$(1).so
CFG_STATIC_LIB_NAME_aarch64-linux-android=lib$(1).a
CFG_LIB_GLOB_aarch64-linux-android=lib$(1)-*.so
CFG_LIB_DSYM_GLOB_aarch64-linux-android=lib$(1)-*.dylib.dSYM
CFG_JEMALLOC_CFLAGS_aarch64-linux-android := -D__aarch64__ -DANDROID -D__ANDROID__ $(CFLAGS)
CFG_GCCISH_CFLAGS_aarch64-linux-android := -Wall -g -fPIC -D__aarch64__ -DANDROID -D__ANDROID__ $(CFLAGS)
CFG_GCCISH_CXXFLAGS_aarch64-linux-android := -fno-rtti $(CXXFLAGS)
CFG_GCCISH_LINK_FLAGS_aarch64-linux-android := -shared -fPIC -ldl -g -lm -lsupc++
CFG_GCCISH_DEF_FLAG_aarch64-linux-android := -Wl,--export-dynamic,--dynamic-list=
CFG_GCCISH_PRE_LIB_FLAGS_aarch64-linux-android := -Wl,-whole-archive
CFG_GCCISH_POST_LIB_FLAGS_aarch64-linux-android := -Wl,-no-whole-archive
CFG_DEF_SUFFIX_aarch64-linux-android := .android.def
CFG_LLC_FLAGS_aarch64-linux-android :=
CFG_INSTALL_NAME_aarch64-linux-android =
CFG_EXE_SUFFIX_aarch64-linux-android :=
CFG_WINDOWSY_aarch64-linux-android :=
CFG_UNIXY_aarch64-linux-android := 1
CFG_PATH_MUNGE_aarch64-linux-android := true
CFG_LDPATH_aarch64-linux-android :=
CFG_RUN_aarch64-linux-android=
CFG_RUN_TARG_aarch64-linux-android=
RUSTC_FLAGS_aarch64-linux-android :=
RUSTC_CROSS_FLAGS_aarch64-linux-android :=
CFG_GNU_TRIPLE_aarch64-linux-android := aarch64-linux-android
2 changes: 2 additions & 0 deletions mk/rt.mk
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ else ifeq ($(OSTYPE_$(1)), apple-ios)
JEMALLOC_ARGS_$(1) := --disable-tls
else ifeq ($(OSTYPE_$(1)), linux-androideabi)
JEMALLOC_ARGS_$(1) := --disable-tls
else ifeq ($(OSTYPE_$(1)), linux-android)
JEMALLOC_ARGS_$(1) := --disable-tls
endif

################################################################################
Expand Down
1 change: 1 addition & 0 deletions mk/tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ tidy:
| grep '^$(S)src/libbacktrace' -v \
| grep '^$(S)src/rust-installer' -v \
| xargs $(CFG_PYTHON) $(S)src/etc/check-binaries.py
$(Q) $(CFG_PYTHON) $(S)src/etc/errorck.py $(S)src/


endif
Expand Down
26 changes: 3 additions & 23 deletions src/compiletest/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use std::fmt;
use std::str::FromStr;
use regex::Regex;

#[derive(Clone, PartialEq)]
#[derive(Clone, PartialEq, Debug)]
pub enum Mode {
CompileFail,
RunFail,
Expand Down Expand Up @@ -43,9 +43,9 @@ impl FromStr for Mode {
}
}

impl fmt::String for Mode {
impl fmt::Display for Mode {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fmt::String::fmt(match *self {
fmt::Display::fmt(match *self {
CompileFail => "compile-fail",
RunFail => "run-fail",
RunPass => "run-pass",
Expand All @@ -58,12 +58,6 @@ impl fmt::String for Mode {
}
}

impl fmt::Show for Mode {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fmt::String::fmt(self, f)
}
}

#[derive(Clone)]
pub struct Config {
// The library paths required for running the compiler
Expand Down Expand Up @@ -115,20 +109,6 @@ pub struct Config {
// Write out a parseable log of tests that were run
pub logfile: Option<Path>,

// Write out a json file containing any metrics of the run
pub save_metrics: Option<Path>,

// Write and ratchet a metrics file
pub ratchet_metrics: Option<Path>,

// Percent change in metrics to consider noise
pub ratchet_noise_percent: Option<f64>,

// "Shard" of the testsuite to pub run: this has the form of
// two numbers (a,b), and causes only those tests with
// positional order equal to a mod b to run.
pub test_shard: Option<(uint,uint)>,

// A command line to prefix program execution with,
// for running under valgrind
pub runtool: Option<String>,
Expand Down
26 changes: 3 additions & 23 deletions src/compiletest/compiletest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@ pub fn parse_config(args: Vec<String> ) -> Config {
optopt("", "target-rustcflags", "flags to pass to rustc for target", "FLAGS"),
optflag("", "verbose", "run tests verbosely, showing all output"),
optopt("", "logfile", "file to log test execution to", "FILE"),
optopt("", "save-metrics", "file to save metrics to", "FILE"),
optopt("", "ratchet-metrics", "file to ratchet metrics against", "FILE"),
optopt("", "ratchet-noise-percent",
"percent change in metrics to consider noise", "N"),
optflag("", "jit", "run tests under the JIT"),
optopt("", "target", "the target to build for", "TARGET"),
optopt("", "host", "the host to build for", "HOST"),
Expand All @@ -90,7 +86,6 @@ pub fn parse_config(args: Vec<String> ) -> Config {
optopt("", "adb-path", "path to the android debugger", "PATH"),
optopt("", "adb-test-dir", "path to tests for the android debugger", "PATH"),
optopt("", "lldb-python-dir", "directory containing LLDB's python module", "PATH"),
optopt("", "test-shard", "run shard A, of B shards, worth of the testsuite", "A.B"),
optflag("h", "help", "show this message"));

assert!(!args.is_empty());
Expand Down Expand Up @@ -152,12 +147,6 @@ pub fn parse_config(args: Vec<String> ) -> Config {
filter: filter,
cfail_regex: Regex::new(errors::EXPECTED_PATTERN).unwrap(),
logfile: matches.opt_str("logfile").map(|s| Path::new(s)),
save_metrics: matches.opt_str("save-metrics").map(|s| Path::new(s)),
ratchet_metrics:
matches.opt_str("ratchet-metrics").map(|s| Path::new(s)),
ratchet_noise_percent:
matches.opt_str("ratchet-noise-percent")
.and_then(|s| s.as_slice().parse::<f64>()),
runtool: matches.opt_str("runtool"),
host_rustcflags: matches.opt_str("host-rustcflags"),
target_rustcflags: matches.opt_str("target-rustcflags"),
Expand All @@ -176,7 +165,6 @@ pub fn parse_config(args: Vec<String> ) -> Config {
opt_str2(matches.opt_str("adb-test-dir")).as_slice() &&
!opt_str2(matches.opt_str("adb-test-dir")).is_empty(),
lldb_python_dir: matches.opt_str("lldb-python-dir"),
test_shard: test::opt_shard(matches.opt_str("test-shard")),
verbose: matches.opt_present("verbose"),
}
}
Expand Down Expand Up @@ -210,10 +198,6 @@ pub fn log_config(config: &Config) {
logv(c, format!("adb_test_dir: {:?}", config.adb_test_dir));
logv(c, format!("adb_device_status: {}",
config.adb_device_status));
match config.test_shard {
None => logv(c, "test_shard: (all)".to_string()),
Some((a,b)) => logv(c, format!("test_shard: {}.{}", a, b))
}
logv(c, format!("verbose: {}", config.verbose));
logv(c, format!("\n"));
}
Expand Down Expand Up @@ -264,6 +248,9 @@ pub fn run_tests(config: &Config) {
// parallel (especially when we have lots and lots of child processes).
// For context, see #8904
io::test::raise_fd_limit();
// Prevent issue #21352 UAC blocking .exe containing 'patch' etc. on Windows
// If #11207 is resolved (adding manifest to .exe) this becomes unnecessary
os::setenv("__COMPAT_LAYER", "RunAsInvoker");
let res = test::run_tests_console(&opts, tests.into_iter().collect());
match res {
Ok(true) => {}
Expand All @@ -284,15 +271,8 @@ pub fn test_opts(config: &Config) -> test::TestOpts {
logfile: config.logfile.clone(),
run_tests: true,
run_benchmarks: true,
ratchet_metrics: config.ratchet_metrics.clone(),
ratchet_noise_percent: config.ratchet_noise_percent.clone(),
save_metrics: config.save_metrics.clone(),
test_shard: config.test_shard.clone(),
nocapture: false,
color: test::AutoColor,
show_boxplot: false,
boxplot_width: 50,
show_all_stats: false,
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/compiletest/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,7 @@ pub fn parse_name_value_directive(line: &str, directive: &str)
let keycolon = format!("{}:", directive);
match line.find_str(keycolon.as_slice()) {
Some(colon) => {
let value = line.slice(colon + keycolon.len(),
line.len()).to_string();
let value = line[(colon + keycolon.len()) .. line.len()].to_string();
debug!("{}: {}", directive, value);
Some(value)
}
Expand Down
13 changes: 7 additions & 6 deletions src/compiletest/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) {
let aux_dir = aux_output_dir_name(config, testfile);
// FIXME (#9639): This needs to handle non-utf8 paths
let mut args = vec!("-".to_string(),
"-Zunstable-options".to_string(),
"--pretty".to_string(),
pretty_type,
format!("--target={}", config.target),
Expand Down Expand Up @@ -340,7 +341,7 @@ actual:\n\
};
// FIXME (#9639): This needs to handle non-utf8 paths
let mut args = vec!("-".to_string(),
"--no-trans".to_string(),
"-Zno-trans".to_string(),
"--crate-type=lib".to_string(),
format!("--target={}", target),
"-L".to_string(),
Expand Down Expand Up @@ -547,7 +548,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {

// Add line breakpoints
for line in breakpoint_lines.iter() {
script_str.push_str(&format!("break '{:?}':{}\n",
script_str.push_str(&format!("break '{}':{}\n",
testfile.filename_display(),
*line)[]);
}
Expand Down Expand Up @@ -750,7 +751,7 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
status: status,
stdout: out,
stderr: err,
cmdline: format!("{}", cmd)
cmdline: format!("{:?}", cmd)
};
}
}
Expand Down Expand Up @@ -862,7 +863,7 @@ fn check_debugger_output(debugger_run_result: &ProcRes, check_lines: &[String])
break;
}
Some(i) => {
rest = rest.slice_from(i + frag.len());
rest = &rest[(i + frag.len())..];
}
}
first = false;
Expand Down Expand Up @@ -953,7 +954,7 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
}

let prefixes = expected_errors.iter().map(|ee| {
format!("{:?}:{}:", testfile.display(), ee.line)
format!("{}:{}:", testfile.display(), ee.line)
}).collect::<Vec<String> >();

#[cfg(windows)]
Expand Down Expand Up @@ -1045,7 +1046,7 @@ fn scan_until_char(haystack: &str, needle: char, idx: &mut uint) -> bool {
if *idx >= haystack.len() {
return false;
}
let opt = haystack.slice_from(*idx).find(needle);
let opt = haystack[(*idx)..].find(needle);
if opt.is_none() {
return false;
}
Expand Down
8 changes: 3 additions & 5 deletions src/doc/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -480,14 +480,12 @@ use std::sync::{Arc,Mutex};
fn main() {
let numbers = Arc::new(Mutex::new(vec![1is, 2, 3]));

for i in 0..3 {
for i in 0us..3 {
let number = numbers.clone();
Thread::spawn(move || {
let mut array = number.lock().unwrap();

(*array)[i] += 1;

println!("numbers[{}] is {}", i, (*array)[i]);
array[i] += 1;
println!("numbers[{}] is {}", i, array[i]);
});
}
}
Expand Down
36 changes: 9 additions & 27 deletions src/doc/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -812,8 +812,9 @@ Crates contain [items](#items), each of which may have some number of
## Items

```{.ebnf .gram}
item : mod_item | fn_item | type_item | struct_item | enum_item
| static_item | trait_item | impl_item | extern_block ;
item : extern_crate_decl | use_decl | mod_item | fn_item | type_item
| struct_item | enum_item | static_item | trait_item | impl_item
| extern_block ;
```

An _item_ is a component of a crate; some module items can be defined in crate
Expand All @@ -827,6 +828,8 @@ execution, and may reside in read-only memory.

There are several kinds of item:

* [`extern crate` declarations](#extern-crate-declarations)
* [`use` declarations](#use-declarations)
* [modules](#modules)
* [functions](#functions)
* [type definitions](#type-definitions)
Expand Down Expand Up @@ -863,13 +866,10 @@ no notion of type abstraction: there are no first-class "forall" types.

```{.ebnf .gram}
mod_item : "mod" ident ( ';' | '{' mod '}' );
mod : [ view_item | item ] * ;
mod : item * ;
```

A module is a container for zero or more [view items](#view-items) and zero or
more [items](#items). The view items manage the visibility of the items defined
within the module, as well as the visibility of names from outside the module
when referenced from inside the module.
A module is a container for zero or more [items](#items).

A _module item_ is a module, surrounded in braces, named, and prefixed with the
keyword `mod`. A module item introduces a new, named module into the tree of
Expand Down Expand Up @@ -927,19 +927,6 @@ mod thread {
}
```

#### View items

```{.ebnf .gram}
view_item : extern_crate_decl | use_decl ;
```

A view item manages the namespace of a module. View items do not define new
items, but rather, simply change other items' visibility. There are two
kinds of view items:

* [`extern crate` declarations](#extern-crate-declarations)
* [`use` declarations](#use-declarations)

##### Extern crate declarations

```{.ebnf .gram}
Expand Down Expand Up @@ -2389,10 +2376,6 @@ These types help drive the compiler's analysis
: ___Needs filling in___
* `no_copy_bound`
: This type does not implement "copy", even if eligible.
* `no_send_bound`
: This type does not implement "send", even if eligible.
* `no_sync_bound`
: This type does not implement "sync", even if eligible.
* `eh_personality`
: ___Needs filling in___
* `exchange_free`
Expand Down Expand Up @@ -2903,13 +2886,12 @@ Point3d {y: 0, z: 10, .. base};
### Block expressions

```{.ebnf .gram}
block_expr : '{' [ view_item ] *
[ stmt ';' | item ] *
block_expr : '{' [ stmt ';' | item ] *
[ expr ] '}' ;
```

A _block expression_ is similar to a module in terms of the declarations that
are possible. Each block conceptually introduces a new namespace scope. View
are possible. Each block conceptually introduces a new namespace scope. Use
items can bring new names into scopes and declared items are in scope for only
the block itself.

Expand Down
Loading