Skip to content

Commit 412fb5c

Browse files
author
Keegan McAllister
committed
---
yaml --- r: 134619 b: refs/heads/try c: f85e4f7 h: refs/heads/master i: 134617: 4447302 134615: 2514fa1 v: v3
1 parent 1913fb9 commit 412fb5c

File tree

233 files changed

+2777
-6527
lines changed

Some content is hidden

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

233 files changed

+2777
-6527
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 58413c09cd52ea4005d6ea7733ba1fb3a8f36589
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 437179ed8bf7f7672f84b19265df1ce569e70490
5-
refs/heads/try: aef6c4b1382dcf2f943bd5872656625f935c0b7c
5+
refs/heads/try: f85e4f75b9b60e2ce4b2ade8f04e2537e48f7095
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/configure

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ case $CFG_OSTYPE in
306306
# instead, msys defines $MSYSTEM which is MINGW32 on i686 and
307307
# MINGW64 on x86_64.
308308
CFG_CPUTYPE=i686
309-
CFG_OSTYPE=w64-mingw32
309+
CFG_OSTYPE=pc-mingw32
310310
if [ "$MSYSTEM" = MINGW64 ]
311311
then
312312
CFG_CPUTYPE=x86_64
@@ -453,8 +453,6 @@ valopt datadir "${CFG_PREFIX}/share" "install data"
453453
valopt infodir "${CFG_PREFIX}/share/info" "install additional info"
454454
valopt mandir "${CFG_PREFIX}/share/man" "install man pages in PATH"
455455

456-
valopt release-channel "source" "the name of the release channel to build"
457-
458456
# On windows we just store the libraries in the bin directory because
459457
# there's no rpath. This is where the build system itself puts libraries;
460458
# --libdir is used to configure the installation directory.
@@ -477,22 +475,11 @@ fi
477475
step_msg "validating $CFG_SELF args"
478476
validate_opt
479477

480-
# Validate the release channel
481-
case "$CFG_RELEASE_CHANNEL" in
482-
(source | nightly | beta | stable)
483-
;;
484-
(*)
485-
err "release channel must be 'source', 'nightly', 'beta' or 'stable'"
486-
;;
487-
esac
488-
489-
# Continue supporting the old --enable-nightly flag to transition the bots
478+
# Temporarily support the old windows triples while the bots make the transition
490479
# XXX Remove me
491-
if [ $CFG_ENABLE_NIGHTLY -eq 1 ]
492-
then
493-
CFG_RELEASE_CHANNEL=nightly
494-
putvar CFG_RELEASE_CHANNEL
495-
fi
480+
CFG_BUILD=`echo "${CFG_BUILD}" | sed 's/-pc-mingw32/-w64-mingw32/g'`
481+
CFG_HOST=`echo "${CFG_HOST}" | sed 's/-pc-mingw32/-w64-mingw32/g'`
482+
CFG_TARGET=`echo "${CFG_TARGET}" | sed 's/-pc-mingw32/-w64-mingw32/g'`
496483

497484
step_msg "looking for build programs"
498485

@@ -649,7 +636,7 @@ then
649636
# check that gcc, cc and g++ all point to the same compiler.
650637
# note that for xcode 5, g++ points to clang, not clang++
651638
if !((chk_cc gcc clang && chk_cc g++ clang) ||
652-
(chk_cc gcc gcc &&( chk_cc g++ g++ || chk g++ gcc))); then
639+
(chk_cc gcc gcc &&( chk_cc g++ g++ || chk g++ gcc))) then
653640
err "the gcc and g++ in your path point to different compilers.
654641
Check which versions are in your path with gcc --version and g++ --version.
655642
To resolve this problem, either fix your PATH or run configure with --enable-clang"

branches/try/man/rustc.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH RUSTC "1" "March 2014" "rustc 0.12.0" "User Commands"
1+
.TH RUSTC "1" "March 2014" "rustc 0.12.0-pre" "User Commands"
22
.SH NAME
33
rustc \- The Rust compiler
44
.SH SYNOPSIS

branches/try/man/rustdoc.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH RUSTDOC "1" "March 2014" "rustdoc 0.12.0" "User Commands"
1+
.TH RUSTDOC "1" "March 2014" "rustdoc 0.12.0-pre" "User Commands"
22
.SH NAME
33
rustdoc \- generate documentation from Rust source code
44
.SH SYNOPSIS

branches/try/mk/main.mk

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,22 @@
1414

1515
# The version number
1616
CFG_RELEASE_NUM=0.12.0
17+
CFG_RELEASE_LABEL=-pre
1718

1819
CFG_FILENAME_EXTRA=4e7c5e5c
1920

20-
ifeq ($(CFG_RELEASE_CHANNEL),stable)
21-
# This is the normal semver version string, e.g. "0.12.0", "0.12.0-nightly"
22-
CFG_RELEASE=$(CFG_RELEASE_NUM)
23-
# This is the string used in dist artifact file names, e.g. "0.12.0", "nightly"
24-
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)
25-
endif
26-
ifeq ($(CFG_RELEASE_CHANNEL),beta)
27-
CFG_RELEASE=$(CFG_RELEASE_NUM)-beta
28-
# When building beta/nightly distributables just reuse the same "beta"
29-
# name so when we upload we'll always override the previous
30-
# nighly. This doesn't actually impact the version reported by rustc -
31-
# it's just for file naming.
32-
CFG_PACKAGE_VERS=beta
33-
endif
34-
ifeq ($(CFG_RELEASE_CHANNEL),nightly)
35-
CFG_RELEASE=$(CFG_RELEASE_NUM)-nightly
21+
ifndef CFG_ENABLE_NIGHTLY
22+
# This is the normal version string
23+
CFG_RELEASE=$(CFG_RELEASE_NUM)$(CFG_RELEASE_LABEL)
24+
CFG_PACKAGE_VERS=$(CFG_RELEASE)
25+
else
26+
# Modify the version label for nightly builds
27+
CFG_RELEASE=$(CFG_RELEASE_NUM)$(CFG_RELEASE_LABEL)-nightly
28+
# When building nightly distributables just reuse the same "rust-nightly" name
29+
# so when we upload we'll always override the previous nighly. This doesn't actually
30+
# impact the version reported by rustc - it's just for file naming.
3631
CFG_PACKAGE_VERS=nightly
3732
endif
38-
ifeq ($(CFG_RELEASE_CHANNEL),source)
39-
CFG_RELEASE=$(CFG_RELEASE_NUM)-pre
40-
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-pre
41-
endif
42-
4333
# The name of the package to use for creating tarballs, installers etc.
4434
CFG_PACKAGE_NAME=rust-$(CFG_PACKAGE_VERS)
4535

branches/try/mk/tests.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,9 @@ check-ref: cleantestlibs cleantmptestlogs check-stage2-rpass \
194194
check-docs: cleantestlibs cleantmptestlogs check-stage2-docs
195195
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
196196

197+
# NOTE: Remove after reprogramming windows bots
198+
check-fast: check-lite
199+
197200
# Some less critical tests that are not prone to breakage.
198201
# Not run as part of the normal test suite, but tested by bors on checkin.
199202
check-secondary: check-lexer check-pretty

branches/try/src/compiletest/header.rs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ pub struct TestProps {
4242
pub pretty_mode: String,
4343
// Only compare pretty output and don't try compiling
4444
pub pretty_compare_only: bool,
45+
// Patterns which must not appear in the output of a cfail test.
46+
pub forbid_output: Vec<String>,
4547
}
4648

4749
// Load any test directives embedded in the file
@@ -59,6 +61,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
5961
let mut no_pretty_expanded = false;
6062
let mut pretty_mode = None;
6163
let mut pretty_compare_only = false;
64+
let mut forbid_output = Vec::new();
6265
iter_header(testfile, |ln| {
6366
match parse_error_pattern(ln) {
6467
Some(ep) => error_patterns.push(ep),
@@ -116,6 +119,11 @@ pub fn load_props(testfile: &Path) -> TestProps {
116119
None => ()
117120
};
118121

122+
match parse_forbid_output(ln) {
123+
Some(of) => forbid_output.push(of),
124+
None => (),
125+
}
126+
119127
true
120128
});
121129

@@ -132,7 +140,8 @@ pub fn load_props(testfile: &Path) -> TestProps {
132140
no_prefer_dynamic: no_prefer_dynamic,
133141
no_pretty_expanded: no_pretty_expanded,
134142
pretty_mode: pretty_mode.unwrap_or("normal".to_string()),
135-
pretty_compare_only: pretty_compare_only
143+
pretty_compare_only: pretty_compare_only,
144+
forbid_output: forbid_output,
136145
}
137146
}
138147

@@ -210,6 +219,10 @@ fn parse_error_pattern(line: &str) -> Option<String> {
210219
parse_name_value_directive(line, "error-pattern")
211220
}
212221

222+
fn parse_forbid_output(line: &str) -> Option<String> {
223+
parse_name_value_directive(line, "forbid-output")
224+
}
225+
213226
fn parse_aux_build(line: &str) -> Option<String> {
214227
parse_name_value_directive(line, "aux-build")
215228
}

branches/try/src/compiletest/runtest.rs

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,14 @@ pub fn run_metrics(config: Config, testfile: String, mm: &mut MetricMap) {
7171
}
7272
}
7373

74+
fn get_output(props: &TestProps, proc_res: &ProcRes) -> String {
75+
if props.check_stdout {
76+
format!("{}{}", proc_res.stdout, proc_res.stderr)
77+
} else {
78+
proc_res.stderr.clone()
79+
}
80+
}
81+
7482
fn run_cfail_test(config: &Config, props: &TestProps, testfile: &Path) {
7583
let proc_res = compile_test(config, props, testfile);
7684

@@ -81,16 +89,22 @@ fn run_cfail_test(config: &Config, props: &TestProps, testfile: &Path) {
8189

8290
check_correct_failure_status(&proc_res);
8391

92+
if proc_res.status.success() {
93+
fatal("process did not return an error status");
94+
}
95+
96+
let output_to_check = get_output(props, &proc_res);
8497
let expected_errors = errors::load_errors(&config.cfail_regex, testfile);
8598
if !expected_errors.is_empty() {
8699
if !props.error_patterns.is_empty() {
87100
fatal("both error pattern and expected errors specified");
88101
}
89102
check_expected_errors(expected_errors, testfile, &proc_res);
90103
} else {
91-
check_error_patterns(props, testfile, &proc_res);
104+
check_error_patterns(props, testfile, output_to_check.as_slice(), &proc_res);
92105
}
93106
check_no_compiler_crash(&proc_res);
107+
check_forbid_output(props, output_to_check.as_slice(), &proc_res);
94108
}
95109

96110
fn run_rfail_test(config: &Config, props: &TestProps, testfile: &Path) {
@@ -112,8 +126,9 @@ fn run_rfail_test(config: &Config, props: &TestProps, testfile: &Path) {
112126
fatal_proc_rec("run-fail test isn't valgrind-clean!", &proc_res);
113127
}
114128

129+
let output_to_check = get_output(props, &proc_res);
115130
check_correct_failure_status(&proc_res);
116-
check_error_patterns(props, testfile, &proc_res);
131+
check_error_patterns(props, testfile, output_to_check.as_slice(), &proc_res);
117132
}
118133

119134
fn check_correct_failure_status(proc_res: &ProcRes) {
@@ -834,24 +849,15 @@ fn check_debugger_output(debugger_run_result: &ProcRes, check_lines: &[String])
834849

835850
fn check_error_patterns(props: &TestProps,
836851
testfile: &Path,
852+
output_to_check: &str,
837853
proc_res: &ProcRes) {
838854
if props.error_patterns.is_empty() {
839855
fatal(format!("no error pattern specified in {}",
840856
testfile.display()).as_slice());
841857
}
842-
843-
if proc_res.status.success() {
844-
fatal("process did not return an error status");
845-
}
846-
847858
let mut next_err_idx = 0u;
848859
let mut next_err_pat = &props.error_patterns[next_err_idx];
849860
let mut done = false;
850-
let output_to_check = if props.check_stdout {
851-
format!("{}{}", proc_res.stdout, proc_res.stderr)
852-
} else {
853-
proc_res.stderr.clone()
854-
};
855861
for line in output_to_check.as_slice().lines() {
856862
if line.contains(next_err_pat.as_slice()) {
857863
debug!("found error pattern {}", next_err_pat);
@@ -890,6 +896,16 @@ fn check_no_compiler_crash(proc_res: &ProcRes) {
890896
}
891897
}
892898

899+
fn check_forbid_output(props: &TestProps,
900+
output_to_check: &str,
901+
proc_res: &ProcRes) {
902+
for pat in props.forbid_output.iter() {
903+
if output_to_check.contains(pat.as_slice()) {
904+
fatal_proc_rec("forbidden pattern found in compiler output", proc_res);
905+
}
906+
}
907+
}
908+
893909
fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
894910
testfile: &Path,
895911
proc_res: &ProcRes) {

branches/try/src/doc/guide-tasks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ fn partial_sum(start: uint) -> f64 {
235235
}
236236
237237
fn main() {
238-
let mut futures = Vec::from_fn(200, |ind| Future::spawn( proc() { partial_sum(ind) }));
238+
let mut futures = Vec::from_fn(1000, |ind| Future::spawn( proc() { partial_sum(ind) }));
239239
240240
let mut final_res = 0f64;
241241
for ft in futures.iter_mut() {

branches/try/src/doc/guide.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,8 @@ $ curl -s https://static.rust-lang.org/rustup.sh | sudo sh
2929
(If you're concerned about `curl | sudo sh`, please keep reading. Disclaimer
3030
below.)
3131

32-
If you're on Windows, please download either the [32-bit
33-
installer](https://static.rust-lang.org/dist/rust-nightly-i686-w64-mingw32.exe)
34-
or the [64-bit
35-
installer](https://static.rust-lang.org/dist/rust-nightly-x86_64-w64-mingw32.exe)
36-
and run it.
32+
If you're on Windows, please [download this .exe and run
33+
it](https://static.rust-lang.org/dist/rust-nightly-install.exe).
3734

3835
If you decide you don't want Rust anymore, we'll be a bit sad, but that's okay.
3936
Not every programming language is great for everyone. Just pass an argument to
@@ -188,8 +185,8 @@ Next up is this line:
188185
This line does all of the work in our little program. There are a number of
189186
details that are important here. The first is that it's indented with four
190187
spaces, not tabs. Please configure your editor of choice to insert four spaces
191-
with the tab key. We provide some [sample configurations for various
192-
editors](https://github.com/rust-lang/rust/tree/master/src/etc).
188+
with the tab key. We provide some sample configurations for various editors
189+
[here](https://github.com/rust-lang/rust/tree/master/src/etc).
193190

194191
The second point is the `println!()` part. This is calling a Rust **macro**,
195192
which is how metaprogramming is done in Rust. If it were a function instead, it
@@ -395,10 +392,14 @@ By the way, in these examples, `i` indicates that the number is an integer.
395392

396393
Rust is a statically typed language, which means that we specify our types up
397394
front. So why does our first example compile? Well, Rust has this thing called
398-
"type inference." If it can figure out what the type of something is, Rust
395+
"[Hindley-Milner type
396+
inference](http://en.wikipedia.org/wiki/Hindley%E2%80%93Milner_type_system)",
397+
named after some really smart type theorists. If you clicked that link, don't
398+
be scared: what this means for you is that Rust will attempt to infer the types
399+
in your program, and it's pretty good at it. If it can infer the type, Rust
399400
doesn't require you to actually type it out.
400401

401-
We can add the type if we want to, though. Types come after a colon (`:`):
402+
We can add the type if we want to. Types come after a colon (`:`):
402403

403404
```{rust}
404405
let x: int = 5;
@@ -1280,15 +1281,15 @@ two main looping constructs: `for` and `while`.
12801281

12811282
The `for` loop is used to loop a particular number of times. Rust's `for` loops
12821283
work a bit differently than in other systems languages, however. Rust's `for`
1283-
loop doesn't look like this "C style" `for` loop:
1284+
loop doesn't look like this C `for` loop:
12841285

1285-
```{c}
1286+
```{ignore,c}
12861287
for (x = 0; x < 10; x++) {
12871288
printf( "%d\n", x );
12881289
}
12891290
```
12901291

1291-
Instead, it looks like this:
1292+
It looks like this:
12921293

12931294
```{rust}
12941295
for x in range(0i, 10i) {
@@ -1311,9 +1312,10 @@ valid for the loop body. Once the body is over, the next value is fetched from
13111312
the iterator, and we loop another time. When there are no more values, the
13121313
`for` loop is over.
13131314

1314-
In our example, `range` is a function that takes a start and an end position,
1315-
and gives an iterator over those values. The upper bound is exclusive, though,
1316-
so our loop will print `0` through `9`, not `10`.
1315+
In our example, the `range` function is a function, provided by Rust, that
1316+
takes a start and an end position, and gives an iterator over those values. The
1317+
upper bound is exclusive, though, so our loop will print `0` through `9`, not
1318+
`10`.
13171319

13181320
Rust does not have the "C style" `for` loop on purpose. Manually controlling
13191321
each element of the loop is complicated and error prone, even for experienced C
@@ -1575,6 +1577,8 @@ we haven't seen before. Here's a simple program that reads some input,
15751577
and then prints it back out:
15761578

15771579
```{rust,ignore}
1580+
use std::io;
1581+
15781582
fn main() {
15791583
println!("Type something!");
15801584

branches/try/src/doc/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ There are questions that are asked quite often, and so we've made FAQs for them:
8686

8787
# The standard library
8888

89-
We have [API documentation for the entire standard
90-
library](std/index.html). There's a list of crates on the left with more
91-
specific sections, or you can use the search bar at the top to search for
92-
something if you know its name.
89+
You can find function-level documentation for the entire standard library
90+
[here](std/index.html). There's a list of crates on the left with more specific
91+
sections, or you can use the search bar at the top to search for something if
92+
you know its name.
9393

9494
# External documentation
9595

branches/try/src/doc/rust.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2557,8 +2557,6 @@ The currently implemented features of the reference compiler are:
25572557

25582558
* `tuple_indexing` - Allows use of tuple indexing (expressions like `expr.0`)
25592559

2560-
* `associated_types` - Allows type aliases in traits. Experimental.
2561-
25622560
If a feature is promoted to a language feature, then all existing programs will
25632561
start to receive compilation warnings about #[feature] directives which enabled
25642562
the new feature (because the directive is no longer necessary). However, if

branches/try/src/etc/kate/rust.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<!ENTITY rustIdent "[a-zA-Z_][a-zA-Z_0-9]*">
88
<!ENTITY rustIntSuf "([iu](8|16|32|64)?)?">
99
]>
10-
<language name="Rust" version="0.12.0" kateversion="2.4" section="Sources" extensions="*.rs" mimetype="text/x-rust" priority="15">
10+
<language name="Rust" version="0.12.0-pre" kateversion="2.4" section="Sources" extensions="*.rs" mimetype="text/x-rust" priority="15">
1111
<highlighting>
1212
<list name="fn">
1313
<item> fn </item>

0 commit comments

Comments
 (0)