Skip to content

Commit 7d8b2d7

Browse files
committed
---
yaml --- r: 183518 b: refs/heads/beta c: 63091ef h: refs/heads/master v: v3
1 parent dc4e21f commit 7d8b2d7

File tree

717 files changed

+21420
-8364
lines changed

Some content is hidden

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

717 files changed

+21420
-8364
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
3232
refs/heads/batch: b7fd822592a4fb577552d93010c4a4e14f314346
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34-
refs/heads/beta: effad62bc5d8a0733c60ebee5faf13c24e8ce148
34+
refs/heads/beta: 63091efa3bdcb18a6fac8af48acfa5634087624b
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
3737
refs/heads/tmp: eb836bf767aa1d8d4cba488a9091cde3c0ab4b2f

branches/beta/configure

Lines changed: 4 additions & 4 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

@@ -1380,7 +1379,8 @@ do
13801379
done
13811380

13821381
# Munge any paths that appear in config.mk back to posix-y
1383-
sed -i.bak -e 's@ \([a-zA-Z]\):[/\\]@ /\1/@g;' config.tmp
1382+
cp config.tmp config.tmp.bak
1383+
sed -e 's@ \([a-zA-Z]\):[/\\]@ /\1/@g;' <config.tmp.bak >config.tmp
13841384
rm -f config.tmp.bak
13851385

13861386
msg

branches/beta/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/beta/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/beta/src/compiletest/compiletest.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@
1212

1313
#![feature(box_syntax)]
1414
#![feature(collections)]
15-
#![feature(core)]
1615
#![feature(int_uint)]
1716
#![feature(io)]
18-
#![feature(os)]
1917
#![feature(path)]
2018
#![feature(rustc_private)]
2119
#![feature(slicing_syntax, unboxed_closures)]
@@ -49,8 +47,7 @@ pub mod common;
4947
pub mod errors;
5048

5149
pub fn main() {
52-
let args = env::args().map(|s| s.into_string().unwrap()).collect();;
53-
let config = parse_config(args);
50+
let config = parse_config(env::args().collect());
5451

5552
if config.valgrind_path.is_none() && config.force_valgrind {
5653
panic!("Can't find Valgrind to run Valgrind tests");
@@ -118,7 +115,10 @@ pub fn parse_config(args: Vec<String> ) -> Config {
118115
}
119116

120117
fn opt_path(m: &getopts::Matches, nm: &str) -> Path {
121-
Path::new(m.opt_str(nm).unwrap())
118+
match m.opt_str(nm) {
119+
Some(s) => Path::new(s),
120+
None => panic!("no option (=path) found for {}", nm),
121+
}
122122
}
123123

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

branches/beta/src/compiletest/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pub fn make_new_path(path: &str) -> String {
4040

4141
// Windows just uses PATH as the library search path, so we have to
4242
// maintain the current value while adding our own
43-
match env::var_string(lib_path_env_var()) {
43+
match env::var(lib_path_env_var()) {
4444
Ok(curr) => {
4545
format!("{}{}{}", path, path_div(), curr)
4646
}

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

Lines changed: 36 additions & 28 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
@@ -3000,7 +3005,7 @@ Some examples of call expressions:
30003005
# fn add(x: i32, y: i32) -> i32 { 0 }
30013006
30023007
let x: i32 = add(1i32, 2i32);
3003-
let pi: Option<f32> = "3.14".parse().ok();
3008+
let pi: Result<f32, _> = "3.14".parse();
30043009
```
30053010

30063011
### Lambda expressions
@@ -3143,7 +3148,7 @@ An example of a for loop over a series of integers:
31433148

31443149
```
31453150
# fn bar(b:usize) { }
3146-
for i in range(0us, 256) {
3151+
for i in 0us..256 {
31473152
bar(i);
31483153
}
31493154
```
@@ -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>) }
@@ -3524,7 +3532,7 @@ An example of each kind:
35243532
```{rust}
35253533
let vec: Vec<i32> = vec![1, 2, 3];
35263534
let arr: [i32; 3] = [1, 2, 3];
3527-
let s: &[i32] = &vec;
3535+
let s: &[i32] = &vec[];
35283536
```
35293537

35303538
As you can see, the `vec!` macro allows you to create a `Vec<T>` easily. The

branches/beta/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/beta/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)

0 commit comments

Comments
 (0)