Skip to content

Commit 36fac32

Browse files
committed
---
yaml --- r: 179961 b: refs/heads/snap-stage3 c: 1500df8 h: refs/heads/master i: 179959: ae3b8eb v: v3
1 parent b40f7d0 commit 36fac32

File tree

148 files changed

+1616
-835
lines changed

Some content is hidden

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

148 files changed

+1616
-835
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 5936278ed6bef736f6eb8c0dd4d650fd8e10461b
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 2a367b9330dc9208389a052e103d5e91f0262fbe
4+
refs/heads/snap-stage3: 1500df8934431dd7842827209528211ae53ded12
55
refs/heads/try: ccf8fedf1cffcb8f6f3581d53d220039e192fe77
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/configure

Lines changed: 2 additions & 1 deletion
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"
@@ -796,7 +797,7 @@ then
796797
putvar CFG_ENABLE_CLANG
797798
fi
798799

799-
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" ]
800801
then
801802
step_msg "using custom LLVM at $CFG_LLVM_ROOT"
802803

branches/snap-stage3/src/compiletest/compiletest.rs

Lines changed: 0 additions & 1 deletion
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)]

branches/snap-stage3/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/snap-stage3/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/snap-stage3/src/doc/reference.md

Lines changed: 19 additions & 19 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 |
@@ -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
@@ -2014,6 +2014,11 @@ type int8_t = i8;
20142014
- `no_start` - disable linking to the `native` crate, which specifies the
20152015
"start" language item.
20162016
- `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.
20172022

20182023
### Module-only attributes
20192024

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

2085-
### Macro- and plugin-related attributes
2090+
### Macro-related attributes
20862091

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

20982103
- `macro_export` - export a macro for cross-crate usage.
20992104

2100-
- `plugin` on an `extern crate` — load this crate as a [compiler
2101-
plugin][plugin]. The `plugin` feature gate is required. Any arguments to
2102-
the attribute, e.g. `#[plugin=...]` or `#[plugin(...)]`, are provided to the
2103-
plugin.
2104-
2105-
- `no_link` on an `extern crate` — even if we load this crate for macros or
2106-
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.
21072107

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

23602360
### Compiler Features
23612361

branches/snap-stage3/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/snap-stage3/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/snap-stage3/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/snap-stage3/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/snap-stage3/src/doc/trpl/plugins.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ information.
3030
extend the compiler's behavior with new syntax extensions, lint checks, etc.
3131

3232
A plugin is a dynamic library crate with a designated *registrar* function that
33-
registers extensions with `rustc`. Other crates can use these extensions by
34-
loading the plugin crate with `#[plugin] extern crate`. See the
33+
registers extensions with `rustc`. Other crates can load these extensions using
34+
the crate attribute `#![plugin(...)]`. See the
3535
[`rustc::plugin`](../rustc/plugin/index.html) documentation for more about the
3636
mechanics of defining and loading a plugin.
3737

38-
Arguments passed as `#[plugin=...]` or `#[plugin(...)]` are not interpreted by
39-
rustc itself. They are provided to the plugin through the `Registry`'s [`args`
40-
method](../rustc/plugin/registry/struct.Registry.html#method.args).
38+
If present, arguments passed as `#![plugin(foo(... args ...))]` are not
39+
interpreted by rustc itself. They are provided to the plugin through the
40+
`Registry`'s [`args` method](../rustc/plugin/registry/struct.Registry.html#method.args).
4141

4242
# Syntax extensions
4343

@@ -110,8 +110,7 @@ Then we can use `rn!()` like any other macro:
110110

111111
```ignore
112112
#![feature(plugin)]
113-
114-
#[plugin] extern crate roman_numerals;
113+
#![plugin(roman_numerals)]
115114
116115
fn main() {
117116
assert_eq!(rn!(MMXV), 2015);
@@ -219,7 +218,7 @@ pub fn plugin_registrar(reg: &mut Registry) {
219218
Then code like
220219

221220
```ignore
222-
#[plugin] extern crate lint_plugin_test;
221+
#![plugin(lint_plugin_test)]
223222
224223
fn lintme() { }
225224
```

0 commit comments

Comments
 (0)