Skip to content

Commit 1a571f2

Browse files
committed
---
yaml --- r: 176751 b: refs/heads/tmp c: aa874ab h: refs/heads/master i: 176749: 2273f7d 176747: ac531b2 176743: f416125 176735: fb92170 v: v3
1 parent d98f3d2 commit 1a571f2

File tree

401 files changed

+6087
-6267
lines changed

Some content is hidden

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

401 files changed

+6087
-6267
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 44a287e6eb22ec3c2a687fc156813577464017f7
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37-
refs/heads/tmp: 23da54d894f3354bf6e6d560940be6741648d68f
37+
refs/heads/tmp: aa874abc0dab50b5f315778761e1c090f461a2e9

branches/tmp/configure

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,6 @@ opt optimize-tests 1 "build tests with optimizations"
509509
opt libcpp 1 "build with llvm with libc++ instead of libstdc++ when using clang"
510510
opt llvm-assertions 1 "build LLVM with assertions"
511511
opt debug 1 "build with extra debug fun"
512-
opt ratchet-bench 0 "ratchet benchmarks"
513512
opt fast-make 0 "use .gitmodules as timestamp for submodule deps"
514513
opt ccache 0 "invoke gcc/clang via ccache to reuse object files between builds"
515514
opt local-rust 0 "use an installed rustc rather than downloading a snapshot"
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# aarch64-linux-android configuration
2+
# CROSS_PREFIX_aarch64-linux-android-
3+
CC_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-gcc
4+
CXX_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-g++
5+
CPP_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-gcc -E
6+
AR_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-ar
7+
CFG_LIB_NAME_aarch64-linux-android=lib$(1).so
8+
CFG_STATIC_LIB_NAME_aarch64-linux-android=lib$(1).a
9+
CFG_LIB_GLOB_aarch64-linux-android=lib$(1)-*.so
10+
CFG_LIB_DSYM_GLOB_aarch64-linux-android=lib$(1)-*.dylib.dSYM
11+
CFG_JEMALLOC_CFLAGS_aarch64-linux-android := -D__aarch64__ -DANDROID -D__ANDROID__ $(CFLAGS)
12+
CFG_GCCISH_CFLAGS_aarch64-linux-android := -Wall -g -fPIC -D__aarch64__ -DANDROID -D__ANDROID__ $(CFLAGS)
13+
CFG_GCCISH_CXXFLAGS_aarch64-linux-android := -fno-rtti $(CXXFLAGS)
14+
CFG_GCCISH_LINK_FLAGS_aarch64-linux-android := -shared -fPIC -ldl -g -lm -lsupc++
15+
CFG_GCCISH_DEF_FLAG_aarch64-linux-android := -Wl,--export-dynamic,--dynamic-list=
16+
CFG_GCCISH_PRE_LIB_FLAGS_aarch64-linux-android := -Wl,-whole-archive
17+
CFG_GCCISH_POST_LIB_FLAGS_aarch64-linux-android := -Wl,-no-whole-archive
18+
CFG_DEF_SUFFIX_aarch64-linux-android := .android.def
19+
CFG_LLC_FLAGS_aarch64-linux-android :=
20+
CFG_INSTALL_NAME_aarch64-linux-android =
21+
CFG_EXE_SUFFIX_aarch64-linux-android :=
22+
CFG_WINDOWSY_aarch64-linux-android :=
23+
CFG_UNIXY_aarch64-linux-android := 1
24+
CFG_PATH_MUNGE_aarch64-linux-android := true
25+
CFG_LDPATH_aarch64-linux-android :=
26+
CFG_RUN_aarch64-linux-android=
27+
CFG_RUN_TARG_aarch64-linux-android=
28+
RUSTC_FLAGS_aarch64-linux-android :=
29+
RUSTC_CROSS_FLAGS_aarch64-linux-android :=
30+
CFG_GNU_TRIPLE_aarch64-linux-android := aarch64-linux-android

branches/tmp/mk/rt.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ else ifeq ($(OSTYPE_$(1)), apple-ios)
141141
JEMALLOC_ARGS_$(1) := --disable-tls
142142
else ifeq ($(OSTYPE_$(1)), linux-androideabi)
143143
JEMALLOC_ARGS_$(1) := --disable-tls
144+
else ifeq ($(OSTYPE_$(1)), linux-android)
145+
JEMALLOC_ARGS_$(1) := --disable-tls
144146
endif
145147

146148
################################################################################

branches/tmp/mk/tests.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ tidy:
300300
| grep '^$(S)src/libbacktrace' -v \
301301
| grep '^$(S)src/rust-installer' -v \
302302
| xargs $(CFG_PYTHON) $(S)src/etc/check-binaries.py
303+
$(Q) $(CFG_PYTHON) $(S)src/etc/errorck.py $(S)src/
303304

304305

305306
endif

branches/tmp/src/compiletest/common.rs

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use std::fmt;
1313
use std::str::FromStr;
1414
use regex::Regex;
1515

16-
#[derive(Clone, PartialEq)]
16+
#[derive(Clone, PartialEq, Debug)]
1717
pub enum Mode {
1818
CompileFail,
1919
RunFail,
@@ -43,9 +43,9 @@ impl FromStr for Mode {
4343
}
4444
}
4545

46-
impl fmt::String for Mode {
46+
impl fmt::Display for Mode {
4747
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
48-
fmt::String::fmt(match *self {
48+
fmt::Display::fmt(match *self {
4949
CompileFail => "compile-fail",
5050
RunFail => "run-fail",
5151
RunPass => "run-pass",
@@ -58,12 +58,6 @@ impl fmt::String for Mode {
5858
}
5959
}
6060

61-
impl fmt::Show for Mode {
62-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
63-
fmt::String::fmt(self, f)
64-
}
65-
}
66-
6761
#[derive(Clone)]
6862
pub struct Config {
6963
// The library paths required for running the compiler
@@ -115,20 +109,6 @@ pub struct Config {
115109
// Write out a parseable log of tests that were run
116110
pub logfile: Option<Path>,
117111

118-
// Write out a json file containing any metrics of the run
119-
pub save_metrics: Option<Path>,
120-
121-
// Write and ratchet a metrics file
122-
pub ratchet_metrics: Option<Path>,
123-
124-
// Percent change in metrics to consider noise
125-
pub ratchet_noise_percent: Option<f64>,
126-
127-
// "Shard" of the testsuite to pub run: this has the form of
128-
// two numbers (a,b), and causes only those tests with
129-
// positional order equal to a mod b to run.
130-
pub test_shard: Option<(uint,uint)>,
131-
132112
// A command line to prefix program execution with,
133113
// for running under valgrind
134114
pub runtool: Option<String>,

branches/tmp/src/compiletest/compiletest.rs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,6 @@ pub fn parse_config(args: Vec<String> ) -> Config {
7777
optopt("", "target-rustcflags", "flags to pass to rustc for target", "FLAGS"),
7878
optflag("", "verbose", "run tests verbosely, showing all output"),
7979
optopt("", "logfile", "file to log test execution to", "FILE"),
80-
optopt("", "save-metrics", "file to save metrics to", "FILE"),
81-
optopt("", "ratchet-metrics", "file to ratchet metrics against", "FILE"),
82-
optopt("", "ratchet-noise-percent",
83-
"percent change in metrics to consider noise", "N"),
8480
optflag("", "jit", "run tests under the JIT"),
8581
optopt("", "target", "the target to build for", "TARGET"),
8682
optopt("", "host", "the host to build for", "HOST"),
@@ -90,7 +86,6 @@ pub fn parse_config(args: Vec<String> ) -> Config {
9086
optopt("", "adb-path", "path to the android debugger", "PATH"),
9187
optopt("", "adb-test-dir", "path to tests for the android debugger", "PATH"),
9288
optopt("", "lldb-python-dir", "directory containing LLDB's python module", "PATH"),
93-
optopt("", "test-shard", "run shard A, of B shards, worth of the testsuite", "A.B"),
9489
optflag("h", "help", "show this message"));
9590

9691
assert!(!args.is_empty());
@@ -152,12 +147,6 @@ pub fn parse_config(args: Vec<String> ) -> Config {
152147
filter: filter,
153148
cfail_regex: Regex::new(errors::EXPECTED_PATTERN).unwrap(),
154149
logfile: matches.opt_str("logfile").map(|s| Path::new(s)),
155-
save_metrics: matches.opt_str("save-metrics").map(|s| Path::new(s)),
156-
ratchet_metrics:
157-
matches.opt_str("ratchet-metrics").map(|s| Path::new(s)),
158-
ratchet_noise_percent:
159-
matches.opt_str("ratchet-noise-percent")
160-
.and_then(|s| s.as_slice().parse::<f64>()),
161150
runtool: matches.opt_str("runtool"),
162151
host_rustcflags: matches.opt_str("host-rustcflags"),
163152
target_rustcflags: matches.opt_str("target-rustcflags"),
@@ -176,7 +165,6 @@ pub fn parse_config(args: Vec<String> ) -> Config {
176165
opt_str2(matches.opt_str("adb-test-dir")).as_slice() &&
177166
!opt_str2(matches.opt_str("adb-test-dir")).is_empty(),
178167
lldb_python_dir: matches.opt_str("lldb-python-dir"),
179-
test_shard: test::opt_shard(matches.opt_str("test-shard")),
180168
verbose: matches.opt_present("verbose"),
181169
}
182170
}
@@ -210,10 +198,6 @@ pub fn log_config(config: &Config) {
210198
logv(c, format!("adb_test_dir: {:?}", config.adb_test_dir));
211199
logv(c, format!("adb_device_status: {}",
212200
config.adb_device_status));
213-
match config.test_shard {
214-
None => logv(c, "test_shard: (all)".to_string()),
215-
Some((a,b)) => logv(c, format!("test_shard: {}.{}", a, b))
216-
}
217201
logv(c, format!("verbose: {}", config.verbose));
218202
logv(c, format!("\n"));
219203
}
@@ -284,15 +268,8 @@ pub fn test_opts(config: &Config) -> test::TestOpts {
284268
logfile: config.logfile.clone(),
285269
run_tests: true,
286270
run_benchmarks: true,
287-
ratchet_metrics: config.ratchet_metrics.clone(),
288-
ratchet_noise_percent: config.ratchet_noise_percent.clone(),
289-
save_metrics: config.save_metrics.clone(),
290-
test_shard: config.test_shard.clone(),
291271
nocapture: false,
292272
color: test::AutoColor,
293-
show_boxplot: false,
294-
boxplot_width: 50,
295-
show_all_stats: false,
296273
}
297274
}
298275

branches/tmp/src/compiletest/header.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,7 @@ pub fn parse_name_value_directive(line: &str, directive: &str)
332332
let keycolon = format!("{}:", directive);
333333
match line.find_str(keycolon.as_slice()) {
334334
Some(colon) => {
335-
let value = line.slice(colon + keycolon.len(),
336-
line.len()).to_string();
335+
let value = line[(colon + keycolon.len()) .. line.len()].to_string();
337336
debug!("{}: {}", directive, value);
338337
Some(value)
339338
}

branches/tmp/src/compiletest/runtest.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) {
294294
let aux_dir = aux_output_dir_name(config, testfile);
295295
// FIXME (#9639): This needs to handle non-utf8 paths
296296
let mut args = vec!("-".to_string(),
297+
"-Zunstable-options".to_string(),
297298
"--pretty".to_string(),
298299
pretty_type,
299300
format!("--target={}", config.target),
@@ -340,7 +341,7 @@ actual:\n\
340341
};
341342
// FIXME (#9639): This needs to handle non-utf8 paths
342343
let mut args = vec!("-".to_string(),
343-
"--no-trans".to_string(),
344+
"-Zno-trans".to_string(),
344345
"--crate-type=lib".to_string(),
345346
format!("--target={}", target),
346347
"-L".to_string(),
@@ -547,7 +548,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
547548

548549
// Add line breakpoints
549550
for line in breakpoint_lines.iter() {
550-
script_str.push_str(&format!("break '{:?}':{}\n",
551+
script_str.push_str(&format!("break '{}':{}\n",
551552
testfile.filename_display(),
552553
*line)[]);
553554
}
@@ -750,7 +751,7 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
750751
status: status,
751752
stdout: out,
752753
stderr: err,
753-
cmdline: format!("{}", cmd)
754+
cmdline: format!("{:?}", cmd)
754755
};
755756
}
756757
}
@@ -862,7 +863,7 @@ fn check_debugger_output(debugger_run_result: &ProcRes, check_lines: &[String])
862863
break;
863864
}
864865
Some(i) => {
865-
rest = rest.slice_from(i + frag.len());
866+
rest = &rest[(i + frag.len())..];
866867
}
867868
}
868869
first = false;
@@ -953,7 +954,7 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
953954
}
954955

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

959960
#[cfg(windows)]
@@ -1045,7 +1046,7 @@ fn scan_until_char(haystack: &str, needle: char, idx: &mut uint) -> bool {
10451046
if *idx >= haystack.len() {
10461047
return false;
10471048
}
1048-
let opt = haystack.slice_from(*idx).find(needle);
1049+
let opt = haystack[(*idx)..].find(needle);
10491050
if opt.is_none() {
10501051
return false;
10511052
}

branches/tmp/src/doc/intro.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -480,14 +480,12 @@ use std::sync::{Arc,Mutex};
480480
fn main() {
481481
let numbers = Arc::new(Mutex::new(vec![1is, 2, 3]));
482482
483-
for i in 0..3 {
483+
for i in 0us..3 {
484484
let number = numbers.clone();
485485
Thread::spawn(move || {
486486
let mut array = number.lock().unwrap();
487-
488-
(*array)[i] += 1;
489-
490-
println!("numbers[{}] is {}", i, (*array)[i]);
487+
array[i] += 1;
488+
println!("numbers[{}] is {}", i, array[i]);
491489
});
492490
}
493491
}

branches/tmp/src/doc/reference.md

Lines changed: 21 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,15 @@ Rust syntax is restricted in two ways:
739739
* `concat!` : concatenates a comma-separated list of literals
740740
* `concat_idents!` : create a new identifier by concatenating the arguments
741741

742+
The following attributes are used for quasiquoting in procedural macros:
743+
744+
* `quote_expr!`
745+
* `quote_item!`
746+
* `quote_pat!`
747+
* `quote_stmt!`
748+
* `quote_tokens!`
749+
* `quote_ty!`
750+
742751
# Crates and source files
743752

744753
Rust is a *compiled* language. Its semantics obey a *phase distinction*
@@ -803,8 +812,9 @@ Crates contain [items](#items), each of which may have some number of
803812
## Items
804813

805814
```{.ebnf .gram}
806-
item : mod_item | fn_item | type_item | struct_item | enum_item
807-
| static_item | trait_item | impl_item | extern_block ;
815+
item : extern_crate_decl | use_decl | mod_item | fn_item | type_item
816+
| struct_item | enum_item | static_item | trait_item | impl_item
817+
| extern_block ;
808818
```
809819

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

819829
There are several kinds of item:
820830

831+
* [`extern crate` declarations](#extern-crate-declarations)
832+
* [`use` declarations](#use-declarations)
821833
* [modules](#modules)
822834
* [functions](#functions)
823835
* [type definitions](#type-definitions)
@@ -854,13 +866,10 @@ no notion of type abstraction: there are no first-class "forall" types.
854866

855867
```{.ebnf .gram}
856868
mod_item : "mod" ident ( ';' | '{' mod '}' );
857-
mod : [ view_item | item ] * ;
869+
mod : item * ;
858870
```
859871

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

865874
A _module item_ is a module, surrounded in braces, named, and prefixed with the
866875
keyword `mod`. A module item introduces a new, named module into the tree of
@@ -918,19 +927,6 @@ mod thread {
918927
}
919928
```
920929

921-
#### View items
922-
923-
```{.ebnf .gram}
924-
view_item : extern_crate_decl | use_decl ;
925-
```
926-
927-
A view item manages the namespace of a module. View items do not define new
928-
items, but rather, simply change other items' visibility. There are two
929-
kinds of view items:
930-
931-
* [`extern crate` declarations](#extern-crate-declarations)
932-
* [`use` declarations](#use-declarations)
933-
934930
##### Extern crate declarations
935931

936932
```{.ebnf .gram}
@@ -2041,6 +2037,9 @@ type int8_t = i8;
20412037
item](#language-items) for more details.
20422038
- `test` - indicates that this function is a test function, to only be compiled
20432039
in case of `--test`.
2040+
- `should_fail` - indicates that this test function should panic, inverting the success condition.
2041+
- `cold` - The function is unlikely to be executed, so optimize it (and calls
2042+
to it) differently.
20442043

20452044
### Static-only attributes
20462045

@@ -2377,10 +2376,6 @@ These types help drive the compiler's analysis
23772376
: ___Needs filling in___
23782377
* `no_copy_bound`
23792378
: This type does not implement "copy", even if eligible.
2380-
* `no_send_bound`
2381-
: This type does not implement "send", even if eligible.
2382-
* `no_sync_bound`
2383-
: This type does not implement "sync", even if eligible.
23842379
* `eh_personality`
23852380
: ___Needs filling in___
23862381
* `exchange_free`
@@ -2891,13 +2886,12 @@ Point3d {y: 0, z: 10, .. base};
28912886
### Block expressions
28922887

28932888
```{.ebnf .gram}
2894-
block_expr : '{' [ view_item ] *
2895-
[ stmt ';' | item ] *
2889+
block_expr : '{' [ stmt ';' | item ] *
28962890
[ expr ] '}' ;
28972891
```
28982892

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

branches/tmp/src/doc/trpl/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* [Standard Input](standard-input.md)
1717
* [Guessing Game](guessing-game.md)
1818
* [II: Intermediate Rust](intermediate.md)
19+
* [More Strings](more-strings.md)
1920
* [Crates and Modules](crates-and-modules.md)
2021
* [Testing](testing.md)
2122
* [Pointers](pointers.md)

0 commit comments

Comments
 (0)