Skip to content

Commit ccdcb1a

Browse files
committed
---
yaml --- r: 179903 b: refs/heads/snap-stage3 c: 577c51c h: refs/heads/master i: 179901: 5b6a676 179899: d7e9e6a 179895: 330d4e5 179887: 10a062f 179871: b1a6675 179839: 4a9f4f8 v: v3
1 parent 7f05038 commit ccdcb1a

File tree

336 files changed

+4951
-1066
lines changed

Some content is hidden

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

336 files changed

+4951
-1066
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: bb49195d22105e11feffc604a2c25128617816b6
4+
refs/heads/snap-stage3: 577c51cdc03c7ef95f15e36cf1130080082bce5a
55
refs/heads/try: ccf8fedf1cffcb8f6f3581d53d220039e192fe77
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/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/snap-stage3/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/snap-stage3/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/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: 20 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 |
@@ -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

@@ -2016,6 +2016,11 @@ type int8_t = i8;
20162016
- `no_start` - disable linking to the `native` crate, which specifies the
20172017
"start" language item.
20182018
- `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.
20192024

20202025
### Module-only attributes
20212026

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

2087-
### Macro- and plugin-related attributes
2092+
### Macro-related attributes
20882093

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

21002105
- `macro_export` - export a macro for cross-crate usage.
21012106

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

21102110
See the [macros section of the
21112111
book](book/macros.html#scoping-and-macro-import/export) for more information on
@@ -2469,6 +2469,12 @@ The currently implemented features of the reference compiler are:
24692469

24702470
* `associated_types` - Allows type aliases in traits. Experimental.
24712471

2472+
* `no_std` - Allows the `#![no_std]` crate attribute, which disables the implicit
2473+
`extern crate std`. This typically requires use of the unstable APIs
2474+
behind the libstd "facade", such as libcore and libcollections. It
2475+
may also cause problems when using syntax extensions, including
2476+
`#[derive]`.
2477+
24722478
If a feature is promoted to a language feature, then all existing programs will
24732479
start to receive compilation warnings about #[feature] directives which enabled
24742480
the new feature (because the directive is no longer necessary). However, if a

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

branches/snap-stage3/src/doc/trpl/unsafe.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,7 @@ attribute attached to the crate.
433433
```ignore
434434
// a minimal library
435435
#![crate_type="lib"]
436+
#![feature(no_std)]
436437
#![no_std]
437438
# // fn main() {} tricked you, rustdoc!
438439
```
@@ -446,8 +447,8 @@ The function marked `#[start]` is passed the command line parameters
446447
in the same format as C:
447448

448449
```
450+
#![feature(lang_items, start, no_std)]
449451
#![no_std]
450-
#![feature(lang_items, start)]
451452
452453
// Pull in the system libc library for what crt0.o likely requires
453454
extern crate libc;
@@ -473,6 +474,7 @@ correct ABI and the correct name, which requires overriding the
473474
compiler's name mangling too:
474475

475476
```ignore
477+
#![feature(no_std)]
476478
#![no_std]
477479
#![no_main]
478480
#![feature(lang_items, start)]
@@ -528,8 +530,8 @@ As an example, here is a program that will calculate the dot product of two
528530
vectors provided from C, using idiomatic Rust practices.
529531

530532
```
533+
#![feature(lang_items, start, no_std)]
531534
#![no_std]
532-
#![feature(lang_items, start)]
533535
534536
# extern crate libc;
535537
extern crate core;
@@ -576,10 +578,6 @@ extern fn panic_fmt(args: &core::fmt::Arguments,
576578
#[lang = "eh_personality"] extern fn eh_personality() {}
577579
# #[start] fn start(argc: isize, argv: *const *const u8) -> isize { 0 }
578580
# fn main() {}
579-
# mod std { // for-loops
580-
# pub use core::iter;
581-
# pub use core::option;
582-
# }
583581
```
584582

585583
Note that there is one extra lang item here which differs from the examples
@@ -656,8 +654,8 @@ and one for deallocation. A freestanding program that uses the `Box`
656654
sugar for dynamic allocations via `malloc` and `free`:
657655

658656
```
657+
#![feature(lang_items, box_syntax, start, no_std)]
659658
#![no_std]
660-
#![feature(lang_items, box_syntax, start)]
661659
662660
extern crate libc;
663661

branches/snap-stage3/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/snap-stage3/src/liballoc/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
6666
html_root_url = "http://doc.rust-lang.org/nightly/")]
6767

68+
#![feature(no_std)]
6869
#![no_std]
6970
#![feature(lang_items, unsafe_destructor)]
7071
#![feature(box_syntax)]
@@ -126,7 +127,8 @@ pub fn oom() -> ! {
126127
#[doc(hidden)]
127128
pub fn fixme_14344_be_sure_to_link_to_collections() {}
128129

129-
#[cfg(not(test))]
130+
// NOTE: remove after next snapshot
131+
#[cfg(all(stage0, not(test)))]
130132
#[doc(hidden)]
131133
mod std {
132134
pub use core::fmt;

branches/snap-stage3/src/liballoc/rc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ struct RcBox<T> {
172172

173173
/// An immutable reference-counted pointer type.
174174
///
175-
/// See the [module level documentation](../index.html) for more details.
175+
/// See the [module level documentation](./index.html) for more details.
176176
#[unsafe_no_drop_flag]
177177
#[stable(feature = "rust1", since = "1.0.0")]
178178
pub struct Rc<T> {
@@ -624,7 +624,7 @@ impl<T: fmt::Debug> fmt::Debug for Rc<T> {
624624
///
625625
/// Weak references do not count when determining if the inner value should be dropped.
626626
///
627-
/// See the [module level documentation](../index.html) for more.
627+
/// See the [module level documentation](./index.html) for more.
628628
#[unsafe_no_drop_flag]
629629
#[unstable(feature = "alloc",
630630
reason = "Weak pointers may not belong in this module.")]

0 commit comments

Comments
 (0)