Skip to content

Commit fdfdbbe

Browse files
committed
---
yaml --- r: 149096 b: refs/heads/try2 c: de6ed9c h: refs/heads/master v: v3
1 parent d2dbeea commit fdfdbbe

File tree

544 files changed

+1186
-1194
lines changed

Some content is hidden

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

544 files changed

+1186
-1194
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: be3cbcb4314570cd974d349b92e761eaef5078fb
8+
refs/heads/try2: de6ed9c0cee2680e89ccb203be97fedc47729f54
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/Makefile.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@ endif
140140
# snapshot will be generated with a statically linked rustc so we only have to
141141
# worry about the distribution of one file (with its native dynamic
142142
# dependencies)
143-
#
144-
# NOTE: after a snapshot (stage0), put this on stage0 as well
143+
RUSTFLAGS_STAGE0 += -Z prefer-dynamic
145144
RUSTFLAGS_STAGE1 += -C prefer-dynamic
146145

147146
# platform-specific auto-configuration

branches/try2/mk/tests.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ ifdef TESTNAME
3434
TESTARGS += $(TESTNAME)
3535
endif
3636

37-
ifdef CHECK_IGNORED
37+
ifdef CHECK_XFAILS
3838
TESTARGS += --ignored
3939
endif
4040

branches/try2/src/compiletest/compiletest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ pub fn parse_config(args: ~[~str]) -> config {
6161
reqopt("", "stage-id", "the target-stage identifier", "stageN-TARGET"),
6262
reqopt("", "mode", "which sort of compile tests to run",
6363
"(compile-fail|run-fail|run-pass|pretty|debug-info)"),
64-
optflag("", "ignored", "run tests marked as ignored"),
64+
optflag("", "ignored", "run tests marked as ignored / xfailed"),
6565
optopt("", "runtool", "supervisor program to run tests under \
6666
(eg. emulator, valgrind)", "PROGRAM"),
6767
optopt("", "rustcflags", "flags to pass to rustc", "FLAGS"),

branches/try2/src/compiletest/header.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,19 +95,19 @@ pub fn load_props(testfile: &Path) -> TestProps {
9595
}
9696

9797
pub fn is_test_ignored(config: &config, testfile: &Path) -> bool {
98-
fn ignore_target(config: &config) -> ~str {
99-
~"ignore-" + util::get_os(config.target)
98+
fn xfail_target(config: &config) -> ~str {
99+
~"xfail-" + util::get_os(config.target)
100100
}
101-
fn ignore_stage(config: &config) -> ~str {
102-
~"ignore-" + config.stage_id.split('-').next().unwrap()
101+
fn xfail_stage(config: &config) -> ~str {
102+
~"xfail-" + config.stage_id.split('-').next().unwrap()
103103
}
104104
105105
let val = iter_header(testfile, |ln| {
106-
if parse_name_directive(ln, "ignore-test") { false }
107-
else if parse_name_directive(ln, ignore_target(config)) { false }
108-
else if parse_name_directive(ln, ignore_stage(config)) { false }
106+
if parse_name_directive(ln, "xfail-test") { false }
107+
else if parse_name_directive(ln, xfail_target(config)) { false }
108+
else if parse_name_directive(ln, xfail_stage(config)) { false }
109109
else if config.mode == common::mode_pretty &&
110-
parse_name_directive(ln, "ignore-pretty") { false }
110+
parse_name_directive(ln, "xfail-pretty") { false }
111111
else { true }
112112
});
113113

branches/try2/src/doc/tutorial.md

Lines changed: 39 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2679,24 +2679,25 @@ manual.
26792679

26802680
## Files and modules
26812681

2682-
One important aspect of Rust's module system is that source files and modules are not the same thing. You define a module hierarchy, populate it with all your definitions, define visibility, maybe put in a `fn main()`, and that's it.
2682+
One important aspect about Rusts module system is that source files are not important:
2683+
You define a module hierarchy, populate it with all your definitions, define visibility,
2684+
maybe put in a `fn main()`, and that's it: No need to think about source files.
26832685

2684-
The only file that's relevant when compiling is the one that contains the body
2685-
of your crate root, and it's only relevant because you have to pass that file
2686-
to `rustc` to compile your crate.
2686+
The only file that's relevant is the one that contains the body of your crate root,
2687+
and it's only relevant because you have to pass that file to `rustc` to compile your crate.
26872688

2688-
In principle, that's all you need: You can write any Rust program as one giant source file that contains your
2689-
crate root and everything else in `mod ... { ... }` declarations.
2689+
And in principle, that's all you need: You can write any Rust program as one giant source file that contains your
2690+
crate root and everything below it in `mod ... { ... }` declarations.
26902691

2691-
However, in practice you usually want to split up your code into multiple
2692-
source files to make it more manageable. Rust allows you to move the body of
2693-
any module into its own source file. If you declare a module without its body,
2694-
like `mod foo;`, the compiler will look for the files `foo.rs` and `foo/mod.rs`
2695-
inside some directory (usually the same as of the source file containing the
2696-
`mod foo;` declaration). If it finds either, it uses the content of that file
2697-
as the body of the module. If it finds both, that's a compile error.
2692+
However, in practice you usually want to split you code up into multiple source files to make it more manageable.
2693+
In order to do that, Rust allows you to move the body of any module into it's own source file, which works like this:
26982694

2699-
To move the content of `mod farm` into its own file, you can write:
2695+
If you declare a module without its body, like `mod foo;`, the compiler will look for the
2696+
files `foo.rs` and `foo/mod.rs` inside some directory (usually the same as of the source file containing
2697+
the `mod foo;`). If it finds either, it uses the content of that file as the body of the module.
2698+
If it finds both, that's a compile error.
2699+
2700+
So, if we want to move the content of `mod farm` into it's own file, it would look like this:
27002701

27012702
~~~~ {.ignore}
27022703
// `main.rs` - contains body of the crate root
@@ -2721,13 +2722,17 @@ pub mod barn {
27212722

27222723
In short, `mod foo;` is just syntactic sugar for `mod foo { /* content of <...>/foo.rs or <...>/foo/mod.rs */ }`.
27232724

2724-
This also means that having two or more identical `mod foo;` declarations somewhere in your crate hierarchy is generally a bad idea,
2725-
just like copy-and-paste-ing a module into multiple places is a bad idea.
2725+
This also means that having two or more identical `mod foo;` somewhere
2726+
in your crate hierarchy is generally a bad idea,
2727+
just like copy-and-paste-ing a module into two or more places is one.
27262728
Both will result in duplicate and mutually incompatible definitions.
27272729

2728-
When `rustc` resolves these module declarations, it starts by looking in the
2729-
parent directory of the file containing the `mod foo` declaration. For example,
2730-
given a file with the module body:
2730+
The directory the compiler looks in for those two files is determined by starting with
2731+
the same directory as the source file that contains the `mod foo;` declaration, and concatenating to that a
2732+
path equivalent to the relative path of all nested `mod { ... }` declarations the `mod foo;`
2733+
is contained in, if any.
2734+
2735+
For example, given a file with this module body:
27312736

27322737
~~~ {.ignore}
27332738
// `src/main.rs`
@@ -2740,7 +2745,7 @@ mod animals {
27402745
}
27412746
~~~
27422747

2743-
The compiler will look for these files, in this order:
2748+
The compiler would then try all these files:
27442749

27452750
~~~ {.notrust}
27462751
src/plants.rs
@@ -2753,9 +2758,9 @@ src/animals/mammals/humans.rs
27532758
src/animals/mammals/humans/mod.rs
27542759
~~~
27552760

2756-
Keep in mind that identical module hierarchies can still lead to different path
2757-
lookups depending on how and where you've moved a module body to its own file.
2758-
For example, if you move the `animals` module into its own file:
2761+
Keep in mind that identical module hierachies can still lead to different path lookups
2762+
depending on how and where you've moved a module body to its own file.
2763+
For example, if we move the `animals` module above into its own file...
27592764

27602765
~~~ {.ignore}
27612766
// `src/main.rs`
@@ -2771,21 +2776,21 @@ mod mammals {
27712776
}
27722777
~~~
27732778

2774-
...then the source files of `mod animals`'s submodules can either be in the same directory as the animals source file or in a subdirectory of its directory. If the animals file is `src/animals.rs`, `rustc` will look for:
2779+
...then the source files of `mod animals`'s submodules can
2780+
either be placed right next to that of its parents, or in a subdirectory if `animals` source file is:
27752781

27762782
~~~ {.notrust}
2777-
src/animals.rs
2783+
src/plants.rs
2784+
src/plants/mod.rs
2785+
2786+
src/animals.rs - if file sits next to that of parent module's:
27782787
src/fish.rs
27792788
src/fish/mod.rs
27802789
27812790
src/mammals/humans.rs
27822791
src/mammals/humans/mod.rs
2783-
~~
2784-
2785-
If the animals file is `src/animals/mod.rs`, `rustc` will look for:
27862792
2787-
~~ {.notrust}
2788-
src/animals/mod.rs
2793+
src/animals/mod.rs - if file is in it's own subdirectory:
27892794
src/animals/fish.rs
27902795
src/animals/fish/mod.rs
27912796
@@ -2794,11 +2799,11 @@ src/animals/mod.rs
27942799
27952800
~~~
27962801

2797-
These rules allow you to write small modules consisting of single source files which can live in the same directory as well as large modules which group submodule source files in subdirectories.
2802+
These rules allow you to have both small modules that only need
2803+
to consist of one source file each and can be conveniently placed right next to each other,
2804+
and big complicated modules that group the source files of submodules in subdirectories.
27982805

2799-
If you need to override where `rustc` will look for the file containing a
2800-
module's source code, use the `path` compiler directive. For example, to load a
2801-
`classified` module from a different file:
2806+
If you need to circumvent the defaults, you can also overwrite the path a `mod foo;` would take:
28022807

28032808
~~~ {.ignore}
28042809
#[path="../../area51/alien.rs"]

branches/try2/src/etc/combine-tests.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2011-2014 The Rust Project Developers. See the COPYRIGHT
1+
# Copyright 2011-2013 The Rust Project Developers. See the COPYRIGHT
22
# file at the top-level directory of this distribution and at
33
# http://rust-lang.org/COPYRIGHT.
44
#
@@ -36,9 +36,9 @@ def scrub(b):
3636
t.startswith(".") or t.startswith("#") or t.startswith("~")):
3737
f = codecs.open(os.path.join(run_pass, t), "r", "utf8")
3838
s = f.read()
39-
if not ("ignore-test" in s or
40-
"ignore-fast" in s or
41-
"ignore-win32" in s):
39+
if not ("xfail-test" in s or
40+
"xfail-fast" in s or
41+
"xfail-win32" in s):
4242
if not "pub fn main" in s and "fn main" in s:
4343
print("Warning: no public entry point in " + t)
4444
stage2_tests.append(t)

branches/try2/src/etc/extract-tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def extract_code_fragments(dest_dir, lines):
9999
block.appendleft(OUTPUT_BLOCK_HEADER)
100100

101101
if "ignore" in tags:
102-
block.appendleft("//ignore-test\n")
102+
block.appendleft("//xfail-test\n")
103103
elif "should_fail" in tags:
104104
block.appendleft("//should-fail\n")
105105

branches/try2/src/etc/licenseck.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
1+
# Copyright 2013 The Rust Project Developers. See the COPYRIGHT
22
# file at the top-level directory of this distribution and at
33
# http://rust-lang.org/COPYRIGHT.
44
#
@@ -52,12 +52,12 @@ def check_license(name, contents):
5252

5353
# Xfail check
5454
firstlineish = contents[:100]
55-
if firstlineish.find("ignore-license") != -1:
55+
if firstlineish.find("xfail-license") != -1:
5656
return True
5757

5858
# License check
5959
boilerplate = contents[:500]
6060
if (boilerplate.find(license1) == -1 or boilerplate.find(license2) == -1) and \
6161
(boilerplate.find(license3) == -1 or boilerplate.find(license4) == -1):
6262
return False
63-
return True
63+
return True

branches/try2/src/etc/tidy.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
err=0
1616
cols=100
17-
cr_flag="ignore-tidy-cr"
18-
tab_flag="ignore-tidy-tab"
19-
linelength_flag="ignore-tidy-linelength"
17+
cr_flag="xfail-tidy-cr"
18+
tab_flag="xfail-tidy-tab"
19+
linelength_flag="xfail-tidy-linelength"
2020

2121
# Be careful to support Python 2.4, 2.6, and 3.x here!
2222
config_proc=subprocess.Popen([ "git", "config", "core.autocrlf" ],

branches/try2/src/libgreen/sched.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -1364,7 +1364,7 @@ mod test {
13641364
});
13651365
}
13661366

1367-
// FIXME: #9407: ignore-test
1367+
// FIXME: #9407: xfail-test
13681368
#[ignore]
13691369
#[test]
13701370
fn dont_starve_1() {

branches/try2/src/libstd/iter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ This `for` loop syntax can be applied to any iterator over any type.
5959
## Iteration protocol and more
6060
6161
More detailed information about iterators can be found in the [container
62-
tutorial](http://static.rust-lang.org/doc/master/tutorial-container.html) with
62+
guide](http://static.rust-lang.org/doc/master/guide-container.html) with
6363
the rest of the rust manuals.
6464
6565
*/

branches/try2/src/libsyntax/parse/parser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1799,7 +1799,7 @@ impl Parser {
17991799
} else if self.eat_keyword(keywords::Self) {
18001800
let path = ast_util::ident_to_path(mk_sp(lo, hi), special_idents::self_);
18011801
ex = ExprPath(path);
1802-
hi = self.last_span.hi;
1802+
hi = self.span.hi;
18031803
} else if self.eat_keyword(keywords::If) {
18041804
return self.parse_if_expr();
18051805
} else if self.eat_keyword(keywords::For) {
@@ -1934,7 +1934,7 @@ impl Parser {
19341934
&[token::COMMA], &[token::RBRACE]);
19351935
}
19361936

1937-
hi = self.span.hi;
1937+
hi = pth.span.hi;
19381938
self.expect(&token::RBRACE);
19391939
ex = ExprStruct(pth, fields, base);
19401940
return self.mk_expr(lo, hi, ex);

branches/try2/src/test/auxiliary/crateresolve7x.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// ignore-fast
11+
// xfail-fast
1212
// aux-build:crateresolve_calories-1.rs
1313
// aux-build:crateresolve_calories-2.rs
1414

branches/try2/src/test/auxiliary/issue-2414-b.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// ignore-fast
11+
// xfail-fast
1212

1313
#[crate_id="b#0.1"];
1414
#[crate_type = "lib"];

branches/try2/src/test/auxiliary/issue-9906.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// ignore-fast windows doesn't like extern mod
11+
// xfail-fast windows doesn't like extern mod
1212
// aux-build:issue-9906.rs
1313

1414
pub use other::FooBar;

branches/try2/src/test/bench/core-set.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// ignore-pretty
1+
// xfail-pretty
22

3-
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
3+
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
44
// file at the top-level directory of this distribution and at
55
// http://rust-lang.org/COPYRIGHT.
66
//

branches/try2/src/test/bench/shootout-fannkuch-redux.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// ignore-test reading from os::args()[1] - bogus!
11+
// xfail-test reading from os::args()[1] - bogus!
1212

1313
use std::from_str::FromStr;
1414
use std::os;

branches/try2/src/test/bench/shootout-fasta-redux.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// ignore-test reading from os::args()[1] - bogus!
11+
// xfail-test reading from os::args()[1] - bogus!
1212

1313
use std::cast::transmute;
1414
use std::from_str::FromStr;

branches/try2/src/test/bench/shootout-k-nucleotide-pipes.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -8,9 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// ignore-android: FIXME(#10393)
11+
// xfail-android: FIXME(#10393)
1212

13-
// ignore-pretty the `let to_child` line gets an extra newline
13+
// xfail-pretty the `let to_child` line gets an extra newline
1414
// multi tasking k-nucleotide
1515

1616
extern mod extra;

branches/try2/src/test/bench/shootout-k-nucleotide.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// ignore-test
11+
// xfail-test
1212

1313
extern mod extra;
1414

0 commit comments

Comments
 (0)