Skip to content

Commit a0a0e58

Browse files
committed
---
yaml --- r: 180157 b: refs/heads/tmp c: c9fdfdb h: refs/heads/master i: 180155: 47558c9 v: v3
1 parent d1c5f64 commit a0a0e58

File tree

597 files changed

+10706
-4153
lines changed

Some content is hidden

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

597 files changed

+10706
-4153
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: 73201fd675e6d7d6f1ab6c116a360a39a593de93
37+
refs/heads/tmp: c9fdfdb2bb53565953c2a7fbf1e1e938804f32e6

branches/tmp/configure

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,7 @@ opt verify-install 1 "verify installed binaries work"
525525
opt dist-host-only 0 "only install bins for the host architecture"
526526
opt inject-std-version 1 "inject the current compiler version of libstd into programs"
527527
opt jemalloc 1 "build liballoc with jemalloc"
528+
opt llvm-version-check 1 "don't check if the LLVM version is supported, build anyway"
528529

529530
valopt localstatedir "/var/lib" "local state directory"
530531
valopt sysconfdir "/etc" "install system configuration files"
@@ -653,9 +654,7 @@ probe CFG_GRUN grun
653654
probe CFG_FLEX flex
654655
probe CFG_BISON bison
655656
probe CFG_PANDOC pandoc
656-
probe CFG_PDFLATEX pdflatex
657657
probe CFG_XELATEX xelatex
658-
probe CFG_LUALATEX lualatex
659658
probe CFG_GDB gdb
660659
probe CFG_LLDB lldb
661660

@@ -798,7 +797,7 @@ then
798797
putvar CFG_ENABLE_CLANG
799798
fi
800799

801-
if [ ! -z "$CFG_LLVM_ROOT" -a -e "$CFG_LLVM_ROOT/bin/llvm-config" ]
800+
if [ ! -z "$CFG_LLVM_ROOT" -a -z "$CFG_DISABLE_LLVM_VERSION_CHECK" -a -e "$CFG_LLVM_ROOT/bin/llvm-config" ]
802801
then
803802
step_msg "using custom LLVM at $CFG_LLVM_ROOT"
804803

branches/tmp/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+
ifneq ($(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

branches/tmp/mk/tests.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,7 @@ RPASS_FULL_RS := $(wildcard $(S)src/test/run-pass-fulldeps/*.rs)
452452
CFAIL_FULL_RS := $(wildcard $(S)src/test/compile-fail-fulldeps/*.rs)
453453
RFAIL_RS := $(wildcard $(S)src/test/run-fail/*.rs)
454454
CFAIL_RS := $(wildcard $(S)src/test/compile-fail/*.rs)
455+
PFAIL_RS := $(wildcard $(S)src/test/parse-fail/*.rs)
455456
BENCH_RS := $(wildcard $(S)src/test/bench/*.rs)
456457
PRETTY_RS := $(wildcard $(S)src/test/pretty/*.rs)
457458
DEBUGINFO_GDB_RS := $(wildcard $(S)src/test/debuginfo/*.rs)
@@ -468,7 +469,7 @@ RPASS_VALGRIND_TESTS := $(RPASS_VALGRIND_RS)
468469
RPASS_FULL_TESTS := $(RPASS_FULL_RS)
469470
CFAIL_FULL_TESTS := $(CFAIL_FULL_RS)
470471
RFAIL_TESTS := $(RFAIL_RS)
471-
CFAIL_TESTS := $(CFAIL_RS)
472+
CFAIL_TESTS := $(CFAIL_RS) $(PFAIL_RS)
472473
BENCH_TESTS := $(BENCH_RS)
473474
PERF_TESTS := $(PERF_RS)
474475
PRETTY_TESTS := $(PRETTY_RS)

branches/tmp/src/compiletest/compiletest.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
#![feature(box_syntax)]
1414
#![feature(collections)]
15-
#![feature(core)]
1615
#![feature(int_uint)]
1716
#![feature(io)]
1817
#![feature(os)]
@@ -118,7 +117,10 @@ pub fn parse_config(args: Vec<String> ) -> Config {
118117
}
119118

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

124126
let filter = if !matches.free.is_empty() {

branches/tmp/src/doc/grammar.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ token : simple_token | ident | literal | symbol | whitespace token ;
157157

158158
| | | | | |
159159
|----------|----------|----------|----------|--------|
160-
| abstract | alignof | as | be | box |
160+
| abstract | alignof | as | become | box |
161161
| break | const | continue | crate | do |
162162
| else | enum | extern | false | final |
163163
| fn | for | if | impl | in |

branches/tmp/src/doc/index.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ tools we have are really nice.
5959
[Cargo](http://crates.io) is Rust's package manager, and its website contains
6060
lots of good documentation.
6161

62-
[The `rustdoc` manual](rustdoc.html) contains information about Rust's
63-
documentation tool.
62+
[`rustdoc`](book/documentation.html) is used to generate documentation for Rust code.
6463

6564
# FAQs
6665

branches/tmp/src/doc/reference.md

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ grammar as double-quoted strings. Other tokens have exact rules given.
189189

190190
| | | | | |
191191
|----------|----------|----------|----------|---------|
192-
| abstract | alignof | as | be | box |
192+
| abstract | alignof | as | become | box |
193193
| break | const | continue | crate | do |
194194
| else | enum | extern | false | final |
195195
| fn | for | if | impl | in |
@@ -256,11 +256,11 @@ cases mentioned in [Number literals](#number-literals) below.
256256

257257
| [Number literals](#number-literals)`*` | Example | Exponentiation | Suffixes |
258258
|----------------------------------------|---------|----------------|----------|
259-
| Decimal integer | `98_222is` | `N/A` | Integer suffixes |
260-
| Hex integer | `0xffis` | `N/A` | Integer suffixes |
261-
| Octal integer | `0o77is` | `N/A` | Integer suffixes |
262-
| Binary integer | `0b1111_0000is` | `N/A` | Integer suffixes |
263-
| Floating-point | `123.0E+77f64` | `Optional` | Floating-point suffixes |
259+
| Decimal integer | `98_222` | `N/A` | Integer suffixes |
260+
| Hex integer | `0xff` | `N/A` | Integer suffixes |
261+
| Octal integer | `0o77` | `N/A` | Integer suffixes |
262+
| Binary integer | `0b1111_0000` | `N/A` | Integer suffixes |
263+
| Floating-point | `123.0E+77` | `Optional` | Floating-point suffixes |
264264

265265
`*` All number literals allow `_` as a visual separator: `1_234.0E+18f64`
266266

@@ -381,11 +381,13 @@ character (`\`), or a single _escape_. It is equivalent to a `u8` unsigned
381381

382382
##### Byte string literals
383383

384-
A _byte string literal_ is a sequence of ASCII characters and _escapes_
385-
enclosed within two `U+0022` (double-quote) characters, with the exception of
386-
`U+0022` itself, which must be _escaped_ by a preceding `U+005C` character
387-
(`\`), or a _raw byte string literal_. It is equivalent to a `&'static [u8]`
388-
borrowed array of unsigned 8-bit integers.
384+
A non-raw _byte string literal_ is a sequence of ASCII characters and _escapes_,
385+
preceded by the characters `U+0062` (`b`) and `U+0022` (double-quote), and
386+
followed by the character `U+0022`. If the character `U+0022` is present within
387+
the literal, it must be _escaped_ by a preceding `U+005C` (`\`) character.
388+
Alternatively, a byte string literal can be a _raw byte string literal_, defined
389+
below. A byte string literal is equivalent to a `&'static [u8]` borrowed array
390+
of unsigned 8-bit integers.
389391

390392
Some additional _escapes_ are available in either byte or non-raw byte string
391393
literals. An escape starts with a `U+005C` (`\`) and continues with one of the
@@ -1253,9 +1255,7 @@ fn my_err(s: &str) -> ! {
12531255
We call such functions "diverging" because they never return a value to the
12541256
caller. Every control path in a diverging function must end with a `panic!()` or
12551257
a call to another diverging function on every control path. The `!` annotation
1256-
does *not* denote a type. Rather, the result type of a diverging function is a
1257-
special type called ⊥ ("bottom") that unifies with any type. Rust has no
1258-
syntax for ⊥.
1258+
does *not* denote a type.
12591259

12601260
It might be necessary to declare a diverging function because as mentioned
12611261
previously, the typechecker checks that every control path in a function ends
@@ -1813,7 +1813,6 @@ default visibility with the `priv` keyword. When an item is declared as `pub`,
18131813
it can be thought of as being accessible to the outside world. For example:
18141814

18151815
```
1816-
# #![allow(missing_copy_implementations)]
18171816
# fn main() {}
18181817
// Declare a private struct
18191818
struct Foo;
@@ -2015,6 +2014,11 @@ type int8_t = i8;
20152014
- `no_start` - disable linking to the `native` crate, which specifies the
20162015
"start" language item.
20172016
- `no_std` - disable linking to the `std` crate.
2017+
- `plugin` — load a list of named crates as compiler plugins, e.g.
2018+
`#![plugin(foo, bar)]`. Optional arguments for each plugin,
2019+
i.e. `#![plugin(foo(... args ...))]`, are provided to the plugin's
2020+
registrar function. The `plugin` feature gate is required to use
2021+
this attribute.
20182022

20192023
### Module-only attributes
20202024

@@ -2083,7 +2087,7 @@ On `struct`s:
20832087
remove any padding between fields (note that this is very fragile and may
20842088
break platforms which require aligned access).
20852089

2086-
### Macro- and plugin-related attributes
2090+
### Macro-related attributes
20872091

20882092
- `macro_use` on a `mod` — macros defined in this module will be visible in the
20892093
module's parent, after this module has been included.
@@ -2098,13 +2102,8 @@ On `struct`s:
20982102

20992103
- `macro_export` - export a macro for cross-crate usage.
21002104

2101-
- `plugin` on an `extern crate` — load this crate as a [compiler
2102-
plugin][plugin]. The `plugin` feature gate is required. Any arguments to
2103-
the attribute, e.g. `#[plugin=...]` or `#[plugin(...)]`, are provided to the
2104-
plugin.
2105-
2106-
- `no_link` on an `extern crate` — even if we load this crate for macros or
2107-
compiler plugins, don't link it into the output.
2105+
- `no_link` on an `extern crate` — even if we load this crate for macros, don't
2106+
link it into the output.
21082107

21092108
See the [macros section of the
21102109
book](book/macros.html#scoping-and-macro-import/export) for more information on
@@ -2355,8 +2354,8 @@ Supported traits for `derive` are:
23552354
* `FromPrimitive`, to create an instance from a numeric primitive.
23562355
* `Hash`, to iterate over the bytes in a data type.
23572356
* `Rand`, to create a random instance of a data type.
2358-
* `Show`, to format a value using the `{}` formatter.
2359-
* `Zero`, to create a zero instance of a numeric data type.
2357+
* `Debug`, to format a value using the `{:?}` formatter.
2358+
* `Copy`, for "Plain Old Data" types which can be copied by simply moving bits.
23602359

23612360
### Compiler Features
23622361

@@ -2468,6 +2467,12 @@ The currently implemented features of the reference compiler are:
24682467

24692468
* `associated_types` - Allows type aliases in traits. Experimental.
24702469

2470+
* `no_std` - Allows the `#![no_std]` crate attribute, which disables the implicit
2471+
`extern crate std`. This typically requires use of the unstable APIs
2472+
behind the libstd "facade", such as libcore and libcollections. It
2473+
may also cause problems when using syntax extensions, including
2474+
`#[derive]`.
2475+
24712476
If a feature is promoted to a language feature, then all existing programs will
24722477
start to receive compilation warnings about #[feature] directives which enabled
24732478
the new feature (because the directive is no longer necessary). However, if a
@@ -3191,6 +3196,7 @@ stands for a *single* data field, whereas a wildcard `..` stands for *all* the
31913196
fields of a particular variant. For example:
31923197

31933198
```
3199+
#![feature(box_patterns)]
31943200
#![feature(box_syntax)]
31953201
enum List<X> { Nil, Cons(X, Box<List<X>>) }
31963202
@@ -3254,6 +3260,7 @@ the inside of the match.
32543260
An example of a `match` expression:
32553261

32563262
```
3263+
#![feature(box_patterns)]
32573264
#![feature(box_syntax)]
32583265
# fn process_pair(a: i32, b: i32) { }
32593266
# fn process_ten() { }
@@ -3289,6 +3296,7 @@ Subpatterns can also be bound to variables by the use of the syntax `variable @
32893296
subpattern`. For example:
32903297

32913298
```
3299+
#![feature(box_patterns)]
32923300
#![feature(box_syntax)]
32933301
32943302
enum List { Nil, Cons(uint, Box<List>) }

branches/tmp/src/doc/rust.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
body {
5959
margin: 0 auto;
6060
padding: 0 15px;
61-
font-family: "Source Serif Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
61+
font-family: "Source Serif Pro", Georgia, Times, "Times New Roman", serif;
6262
font-size: 18px;
6363
color: #333;
6464
line-height: 1.428571429;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
* [Iterators](iterators.md)
2828
* [Generics](generics.md)
2929
* [Traits](traits.md)
30+
* [Static and Dynamic Dispatch](static-and-dynamic-dispatch.md)
3031
* [Concurrency](concurrency.md)
3132
* [Error Handling](error-handling.md)
3233
* [Documentation](documentation.md)

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ arguments, really powerful things are possible.
99
Let's make a closure:
1010

1111
```{rust}
12-
let add_one = |&: x| { 1 + x };
12+
let add_one = |x| { 1 + x };
1313
1414
println!("The sum of 5 plus 1 is {}.", add_one(5));
1515
```
@@ -21,8 +21,8 @@ binding name and two parentheses, just like we would for a named function.
2121
Let's compare syntax. The two are pretty close:
2222

2323
```{rust}
24-
let add_one = |&: x: i32| -> i32 { 1 + x };
25-
fn add_one (x: i32) -> i32 { 1 + x }
24+
let add_one = |x: i32| -> i32 { 1 + x };
25+
fn add_one (x: i32) -> i32 { 1 + x }
2626
```
2727

2828
As you may have noticed, closures infer their argument and return types, so you
@@ -37,7 +37,7 @@ this:
3737
fn main() {
3838
let x: i32 = 5;
3939
40-
let printer = |&:| { println!("x is: {}", x); };
40+
let printer = || { println!("x is: {}", x); };
4141
4242
printer(); // prints "x is: 5"
4343
}
@@ -53,7 +53,7 @@ defined. The closure borrows any variables it uses, so this will error:
5353
fn main() {
5454
let mut x: i32 = 5;
5555
56-
let printer = |&:| { println!("x is: {}", x); };
56+
let printer = || { println!("x is: {}", x); };
5757
5858
x = 6; // error: cannot assign to `x` because it is borrowed
5959
}
@@ -80,7 +80,7 @@ fn twice<F: Fn(i32) -> i32>(x: i32, f: F) -> i32 {
8080
}
8181
8282
fn main() {
83-
let square = |&: x: i32| { x * x };
83+
let square = |x: i32| { x * x };
8484
8585
twice(5, square); // evaluates to 50
8686
}
@@ -89,15 +89,15 @@ fn main() {
8989
Let's break the example down, starting with `main`:
9090

9191
```{rust}
92-
let square = |&: x: i32| { x * x };
92+
let square = |x: i32| { x * x };
9393
```
9494

9595
We've seen this before. We make a closure that takes an integer, and returns
9696
its square.
9797

9898
```{rust}
9999
# fn twice<F: Fn(i32) -> i32>(x: i32, f: F) -> i32 { f(x) + f(x) }
100-
# let square = |&: x: i32| { x * x };
100+
# let square = |x: i32| { x * x };
101101
twice(5, square); // evaluates to 50
102102
```
103103

@@ -184,8 +184,8 @@ fn compose<F, G>(x: i32, f: F, g: G) -> i32
184184
185185
fn main() {
186186
compose(5,
187-
|&: n: i32| { n + 42 },
188-
|&: n: i32| { n * 2 }); // evaluates to 94
187+
|n: i32| { n + 42 },
188+
|n: i32| { n * 2 }); // evaluates to 94
189189
}
190190
```
191191

branches/tmp/src/doc/trpl/compound-data-types.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,20 @@ if x == y {
7272

7373
This will print `no`, because some of the values aren't equal.
7474

75+
Note that the order of the values is considered when checking for equality,
76+
so the following example will also print `no`.
77+
78+
```rust
79+
let x = (1, 2, 3);
80+
let y = (2, 1, 3);
81+
82+
if x == y {
83+
println!("yes");
84+
} else {
85+
println!("no");
86+
}
87+
```
88+
7589
One other use of tuples is to return multiple values from a function:
7690

7791
```rust

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ fn print<'a>(s: &'a str); // expanded
523523
fn debug(lvl: u32, s: &str); // elided
524524
fn debug<'a>(lvl: u32, s: &'a str); // expanded
525525
526-
// In the preceeding example, `lvl` doesn't need a lifetime because it's not a
526+
// In the preceding example, `lvl` doesn't need a lifetime because it's not a
527527
// reference (`&`). Only things relating to references (such as a `struct`
528528
// which contains a reference) need lifetimes.
529529

0 commit comments

Comments
 (0)