Skip to content

Commit d1c5f64

Browse files
committed
---
yaml --- r: 180156 b: refs/heads/tmp c: 73201fd h: refs/heads/master v: v3
1 parent 47558c9 commit d1c5f64

File tree

597 files changed

+4174
-10689
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

+4174
-10689
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: 8b8331ad09790a2500b315acc436281c78f3c719
37+
refs/heads/tmp: 73201fd675e6d7d6f1ab6c116a360a39a593de93

branches/tmp/configure

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,6 @@ 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"
529528

530529
valopt localstatedir "/var/lib" "local state directory"
531530
valopt sysconfdir "/etc" "install system configuration files"
@@ -654,7 +653,9 @@ probe CFG_GRUN grun
654653
probe CFG_FLEX flex
655654
probe CFG_BISON bison
656655
probe CFG_PANDOC pandoc
656+
probe CFG_PDFLATEX pdflatex
657657
probe CFG_XELATEX xelatex
658+
probe CFG_LUALATEX lualatex
658659
probe CFG_GDB gdb
659660
probe CFG_LLDB lldb
660661

@@ -797,7 +798,7 @@ then
797798
putvar CFG_ENABLE_CLANG
798799
fi
799800

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

branches/tmp/mk/docs.mk

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,27 @@ else
8585
HTML_DEPS :=
8686
endif
8787

88-
# Check for xelatex
89-
90-
ifneq ($(CFG_XELATEX),)
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
91101
CFG_LATEX := $(CFG_XELATEX)
92102
XELATEX = 1
93-
else
94-
$(info cfg: no xelatex found, disabling LaTeX docs)
95-
NO_PDF_DOCS = 1
103+
endif
104+
else
105+
CFG_LATEX := $(CFG_LUALATEX)
96106
endif
97107

108+
98109
ifeq ($(CFG_PANDOC),)
99110
$(info cfg: no pandoc found, omitting PDF and EPUB docs)
100111
ONLY_HTML_DOCS = 1

branches/tmp/mk/tests.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,6 @@ 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)
456455
BENCH_RS := $(wildcard $(S)src/test/bench/*.rs)
457456
PRETTY_RS := $(wildcard $(S)src/test/pretty/*.rs)
458457
DEBUGINFO_GDB_RS := $(wildcard $(S)src/test/debuginfo/*.rs)
@@ -469,7 +468,7 @@ RPASS_VALGRIND_TESTS := $(RPASS_VALGRIND_RS)
469468
RPASS_FULL_TESTS := $(RPASS_FULL_RS)
470469
CFAIL_FULL_TESTS := $(CFAIL_FULL_RS)
471470
RFAIL_TESTS := $(RFAIL_RS)
472-
CFAIL_TESTS := $(CFAIL_RS) $(PFAIL_RS)
471+
CFAIL_TESTS := $(CFAIL_RS)
473472
BENCH_TESTS := $(BENCH_RS)
474473
PERF_TESTS := $(PERF_RS)
475474
PRETTY_TESTS := $(PRETTY_RS)

branches/tmp/src/compiletest/compiletest.rs

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

1313
#![feature(box_syntax)]
1414
#![feature(collections)]
15+
#![feature(core)]
1516
#![feature(int_uint)]
1617
#![feature(io)]
1718
#![feature(os)]
@@ -117,10 +118,7 @@ pub fn parse_config(args: Vec<String> ) -> Config {
117118
}
118119

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

126124
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 | become | box |
160+
| abstract | alignof | as | be | 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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ 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-
[`rustdoc`](book/documentation.html) is used to generate documentation for Rust code.
62+
[The `rustdoc` manual](rustdoc.html) contains information about Rust's
63+
documentation tool.
6364

6465
# FAQs
6566

branches/tmp/src/doc/reference.md

Lines changed: 25 additions & 33 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 | become | box |
192+
| abstract | alignof | as | be | 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_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 |
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 |
264264

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

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

382382
##### Byte string literals
383383

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.
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.
391389

392390
Some additional _escapes_ are available in either byte or non-raw byte string
393391
literals. An escape starts with a `U+005C` (`\`) and continues with one of the
@@ -1255,7 +1253,9 @@ fn my_err(s: &str) -> ! {
12551253
We call such functions "diverging" because they never return a value to the
12561254
caller. Every control path in a diverging function must end with a `panic!()` or
12571255
a call to another diverging function on every control path. The `!` annotation
1258-
does *not* denote a type.
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 ⊥.
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,6 +1813,7 @@ 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)]
18161817
# fn main() {}
18171818
// Declare a private struct
18181819
struct Foo;
@@ -2014,11 +2015,6 @@ type int8_t = i8;
20142015
- `no_start` - disable linking to the `native` crate, which specifies the
20152016
"start" language item.
20162017
- `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.
20222018

20232019
### Module-only attributes
20242020

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

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

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

21032099
- `macro_export` - export a macro for cross-crate usage.
21042100

2105-
- `no_link` on an `extern crate` — even if we load this crate for macros, don't
2106-
link it into the output.
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.
21072108

21082109
See the [macros section of the
21092110
book](book/macros.html#scoping-and-macro-import/export) for more information on
@@ -2354,8 +2355,8 @@ Supported traits for `derive` are:
23542355
* `FromPrimitive`, to create an instance from a numeric primitive.
23552356
* `Hash`, to iterate over the bytes in a data type.
23562357
* `Rand`, to create a random instance of a 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.
2358+
* `Show`, to format a value using the `{}` formatter.
2359+
* `Zero`, to create a zero instance of a numeric data type.
23592360

23602361
### Compiler Features
23612362

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

24682469
* `associated_types` - Allows type aliases in traits. Experimental.
24692470

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-
24762471
If a feature is promoted to a language feature, then all existing programs will
24772472
start to receive compilation warnings about #[feature] directives which enabled
24782473
the new feature (because the directive is no longer necessary). However, if a
@@ -3196,7 +3191,6 @@ stands for a *single* data field, whereas a wildcard `..` stands for *all* the
31963191
fields of a particular variant. For example:
31973192

31983193
```
3199-
#![feature(box_patterns)]
32003194
#![feature(box_syntax)]
32013195
enum List<X> { Nil, Cons(X, Box<List<X>>) }
32023196
@@ -3260,7 +3254,6 @@ the inside of the match.
32603254
An example of a `match` expression:
32613255

32623256
```
3263-
#![feature(box_patterns)]
32643257
#![feature(box_syntax)]
32653258
# fn process_pair(a: i32, b: i32) { }
32663259
# fn process_ten() { }
@@ -3296,7 +3289,6 @@ Subpatterns can also be bound to variables by the use of the syntax `variable @
32963289
subpattern`. For example:
32973290

32983291
```
3299-
#![feature(box_patterns)]
33003292
#![feature(box_syntax)]
33013293
33023294
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", Georgia, Times, "Times New Roman", serif;
61+
font-family: "Source Serif Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
6262
font-size: 18px;
6363
color: #333;
6464
line-height: 1.428571429;

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
* [Iterators](iterators.md)
2828
* [Generics](generics.md)
2929
* [Traits](traits.md)
30-
* [Static and Dynamic Dispatch](static-and-dynamic-dispatch.md)
3130
* [Concurrency](concurrency.md)
3231
* [Error Handling](error-handling.md)
3332
* [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: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -72,20 +72,6 @@ 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-
8975
One other use of tuples is to return multiple values from a function:
9076

9177
```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 preceding example, `lvl` doesn't need a lifetime because it's not a
526+
// In the preceeding 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)