Skip to content

Commit ead1e0f

Browse files
committed
---
yaml --- r: 179806 b: refs/heads/tmp c: 0568422 h: refs/heads/master v: v3
1 parent f17a527 commit ead1e0f

File tree

268 files changed

+4462
-893
lines changed

Some content is hidden

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

268 files changed

+4462
-893
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: 8fb426469a4f7b08a240172c8f4295e868c65db8
37+
refs/heads/tmp: 0568422a27ce4dd9a7f2b1c71710700be54a1da4

branches/tmp/configure

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -653,9 +653,7 @@ probe CFG_GRUN grun
653653
probe CFG_FLEX flex
654654
probe CFG_BISON bison
655655
probe CFG_PANDOC pandoc
656-
probe CFG_PDFLATEX pdflatex
657656
probe CFG_XELATEX xelatex
658-
probe CFG_LUALATEX lualatex
659657
probe CFG_GDB gdb
660658
probe CFG_LLDB lldb
661659

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+
ifeq ($(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/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: 16 additions & 14 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
@@ -2014,6 +2016,11 @@ type int8_t = i8;
20142016
- `no_start` - disable linking to the `native` crate, which specifies the
20152017
"start" language item.
20162018
- `no_std` - disable linking to the `std` crate.
2019+
- `plugin` — load a list of named crates as compiler plugins, e.g.
2020+
`#![plugin(foo, bar)]`. Optional arguments for each plugin,
2021+
i.e. `#![plugin(foo(... args ...))]`, are provided to the plugin's
2022+
registrar function. The `plugin` feature gate is required to use
2023+
this attribute.
20172024

20182025
### Module-only attributes
20192026

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

2085-
### Macro- and plugin-related attributes
2092+
### Macro-related attributes
20862093

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

20982105
- `macro_export` - export a macro for cross-crate usage.
20992106

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

21082110
See the [macros section of the
21092111
book](book/macros.html#scoping-and-macro-import/export) for more information on

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/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
```

branches/tmp/src/grammar/testparser.py

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,34 +35,42 @@
3535
ok[parser] = 0
3636
bad[parser] = []
3737
devnull = open(os.devnull, 'w')
38-
print "\n"
38+
print("\n")
3939

4040
for base, dirs, files in os.walk(args.source_dir[0]):
4141
for f in filter(lambda p: p.endswith('.rs'), files):
4242
p = os.path.join(base, f)
43-
compile_fail = 'compile-fail' in p
44-
ignore = any('ignore-test' in line or 'ignore-lexer-test' in line
45-
for line in open(p).readlines())
46-
if compile_fail or ignore:
43+
parse_fail = 'parse-fail' in p
44+
if sys.version_info.major == 3:
45+
lines = open(p, encoding='utf-8').readlines()
46+
else:
47+
lines = open(p).readlines()
48+
if any('ignore-test' in line or 'ignore-lexer-test' in line for line in lines):
4749
continue
4850
total += 1
4951
for parser in args.parser:
5052
if subprocess.call(parser, stdin=open(p), stderr=subprocess.STDOUT, stdout=devnull) == 0:
51-
ok[parser] += 1
53+
if parse_fail:
54+
bad[parser].append(p)
55+
else:
56+
ok[parser] += 1
5257
else:
53-
bad[parser].append(p)
58+
if parse_fail:
59+
ok[parser] += 1
60+
else:
61+
bad[parser].append(p)
5462
parser_stats = ', '.join(['{}: {}'.format(parser, ok[parser]) for parser in args.parser])
5563
sys.stdout.write("\033[K\r total: {}, {}, scanned {}"
5664
.format(total, os.path.relpath(parser_stats), os.path.relpath(p)))
5765

5866
devnull.close()
5967

60-
print "\n"
68+
print("\n")
6169

6270
for parser in args.parser:
6371
filename = os.path.basename(parser) + '.bad'
64-
print("writing {} files that failed to parse with {} to {}".format(len(bad[parser]), parser, filename))
72+
print("writing {} files that did not yield the correct result with {} to {}".format(len(bad[parser]), parser, filename))
6573
with open(filename, "w") as f:
66-
for p in bad[parser]:
67-
f.write(p)
68-
f.write("\n")
74+
for p in bad[parser]:
75+
f.write(p)
76+
f.write("\n")

branches/tmp/src/libcollections/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#![feature(unboxed_closures)]
3131
#![feature(unicode)]
3232
#![feature(unsafe_destructor, slicing_syntax)]
33-
#![cfg_attr(test, feature(test))]
33+
#![cfg_attr(test, feature(rand, rustc_private, test))]
3434
#![cfg_attr(test, allow(deprecated))] // rand
3535

3636
#![feature(no_std)]

branches/tmp/src/libcollections/str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ pub use core::str::{Lines, LinesAny, MatchIndices, SplitStr, CharRange};
8080
pub use core::str::{Split, SplitTerminator};
8181
pub use core::str::{SplitN, RSplitN};
8282
pub use core::str::{from_utf8, CharEq, Chars, CharIndices, Bytes};
83-
pub use core::str::{from_utf8_unchecked, from_c_str};
83+
pub use core::str::{from_utf8_unchecked, from_c_str, ParseBoolError};
8484
pub use unicode::str::{Words, Graphemes, GraphemeIndices};
8585

8686
/*

branches/tmp/src/libcollections/vec.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,8 @@ impl<T> Vec<T> {
690690
/// Panics if the number of elements in the vector overflows a `usize`.
691691
///
692692
/// # Examples
693-
/// ```rust
693+
///
694+
/// ```
694695
/// let mut vec = vec![1, 2, 3];
695696
/// let mut vec2 = vec![4, 5, 6];
696697
/// vec.append(&mut vec2);
@@ -1002,8 +1003,13 @@ impl<T> Vec<T> {
10021003
///
10031004
/// Note that the capacity of `self` does not change.
10041005
///
1006+
/// # Panics
1007+
///
1008+
/// Panics if `at > len`.
1009+
///
10051010
/// # Examples
1006-
/// ```rust
1011+
///
1012+
/// ```
10071013
/// let mut vec = vec![1,2,3];
10081014
/// let vec2 = vec.split_off(1);
10091015
/// assert_eq!(vec, vec![1]);
@@ -1013,7 +1019,7 @@ impl<T> Vec<T> {
10131019
#[unstable(feature = "collections",
10141020
reason = "new API, waiting for dust to settle")]
10151021
pub fn split_off(&mut self, at: usize) -> Self {
1016-
assert!(at < self.len(), "`at` out of bounds");
1022+
assert!(at <= self.len(), "`at` out of bounds");
10171023

10181024
let other_len = self.len - at;
10191025
let mut other = Vec::with_capacity(other_len);

branches/tmp/src/libcore/iter.rs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2646,13 +2646,7 @@ impl<A: Int> Iterator for RangeStepInclusive<A> {
26462646
macro_rules! range_exact_iter_impl {
26472647
($($t:ty)*) => ($(
26482648
#[stable(feature = "rust1", since = "1.0.0")]
2649-
impl ExactSizeIterator for ::ops::Range<$t> {
2650-
#[inline]
2651-
fn len(&self) -> usize {
2652-
debug_assert!(self.end >= self.start);
2653-
(self.end - self.start) as usize
2654-
}
2655-
}
2649+
impl ExactSizeIterator for ::ops::Range<$t> { }
26562650
)*)
26572651
}
26582652

@@ -2673,9 +2667,12 @@ impl<A: Int> Iterator for ::ops::Range<A> {
26732667

26742668
#[inline]
26752669
fn size_hint(&self) -> (usize, Option<usize>) {
2676-
debug_assert!(self.end >= self.start);
2677-
let hint = (self.end - self.start).to_uint();
2678-
(hint.unwrap_or(0), hint)
2670+
if self.start >= self.end {
2671+
(0, Some(0))
2672+
} else {
2673+
let length = (self.end - self.start).to_uint();
2674+
(length.unwrap_or(0), length)
2675+
}
26792676
}
26802677
}
26812678

branches/tmp/src/libcoretest/iter.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,7 @@ fn test_range() {
756756
// this test is only meaningful when sizeof uint < sizeof u64
757757
assert_eq!((uint::MAX - 1..uint::MAX).size_hint(), (1, Some(1)));
758758
assert_eq!((-10..-1).size_hint(), (9, Some(9)));
759+
assert_eq!((-1..-10).size_hint(), (0, Some(0)));
759760
}
760761

761762
#[test]

branches/tmp/src/librustc/diagnostics.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ register_diagnostics! {
126126
E0312, // lifetime of reference outlives lifetime of borrowed content
127127
E0313, // lifetime of borrowed pointer outlives lifetime of captured variable
128128
E0314, // closure outlives stack frame
129-
E0315 // cannot invoke closure outside of its lifetime
129+
E0315, // cannot invoke closure outside of its lifetime
130+
E0316 // nested quantification of lifetimes
130131
}
131132

132133
__build_diagnostic_array! { DIAGNOSTICS }

0 commit comments

Comments
 (0)