Skip to content

Commit 552dc92

Browse files
committed
---
yaml --- r: 208123 b: refs/heads/snap-stage3 c: 2258aef h: refs/heads/master i: 208121: de4c470 208119: d28348c v: v3
1 parent d83fe7b commit 552dc92

File tree

268 files changed

+2351
-6308
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

+2351
-6308
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: 38a97becdf3e6a6157f6f7ec2d98ade8d8edc193
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: a39d4fc68472ed7a512a7de93f422d7697d92e06
4+
refs/heads/snap-stage3: 2258aef74f4af9b7ac2087098494df77a6d5206c
55
refs/heads/try: 7b4ef47b7805a402d756fb8157101f64880a522f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ fi
544544
BOOL_OPTIONS=""
545545
VAL_OPTIONS=""
546546

547-
opt debug 0 "debug mode; disables optimization unless \`--enable-optimize\` given"
547+
opt debug 0 "debug mode"
548548
opt valgrind 0 "run tests with valgrind (memcheck by default)"
549549
opt helgrind 0 "run tests with helgrind instead of memcheck"
550550
opt valgrind-rpass 1 "run rpass-valgrind tests with valgrind"

branches/snap-stage3/mk/crates.mk

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ RUSTC_CRATES := rustc rustc_typeck rustc_borrowck rustc_resolve rustc_driver \
5858
rustc_data_structures
5959
HOST_CRATES := syntax $(RUSTC_CRATES) rustdoc fmt_macros
6060
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
61-
TOOLS := compiletest rustdoc rustc rustbook error-index-generator
61+
TOOLS := compiletest rustdoc rustc rustbook
6262

6363
DEPS_core :=
6464
DEPS_libc := core
@@ -107,12 +107,10 @@ TOOL_DEPS_compiletest := test getopts
107107
TOOL_DEPS_rustdoc := rustdoc
108108
TOOL_DEPS_rustc := rustc_driver
109109
TOOL_DEPS_rustbook := std rustdoc
110-
TOOL_DEPS_error-index-generator := rustdoc syntax serialize
111110
TOOL_SOURCE_compiletest := $(S)src/compiletest/compiletest.rs
112111
TOOL_SOURCE_rustdoc := $(S)src/driver/driver.rs
113112
TOOL_SOURCE_rustc := $(S)src/driver/driver.rs
114113
TOOL_SOURCE_rustbook := $(S)src/rustbook/main.rs
115-
TOOL_SOURCE_error-index-generator := $(S)src/error-index-generator/main.rs
116114

117115
ONLY_RLIB_core := 1
118116
ONLY_RLIB_libc := 1

branches/snap-stage3/mk/docs.mk

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,9 @@ RUSTBOOK_EXE = $(HBIN2_H_$(CFG_BUILD))/rustbook$(X_$(CFG_BUILD))
7171
# ./configure
7272
RUSTBOOK = $(RPATH_VAR2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) $(RUSTBOOK_EXE)
7373

74-
# The error-index-generator executable...
75-
ERR_IDX_GEN_EXE = $(HBIN2_H_$(CFG_BUILD))/error-index-generator$(X_$(CFG_BUILD))
76-
ERR_IDX_GEN = $(RPATH_VAR2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) $(ERR_IDX_GEN_EXE)
77-
7874
D := $(S)src/doc
7975

80-
DOC_TARGETS := trpl style error-index
76+
DOC_TARGETS := trpl style
8177
COMPILER_DOC_TARGETS :=
8278
DOC_L10N_TARGETS :=
8379

@@ -292,9 +288,3 @@ doc/style/index.html: $(RUSTBOOK_EXE) $(wildcard $(S)/src/doc/style/*.md) | doc/
292288
@$(call E, rustbook: $@)
293289
$(Q)rm -rf doc/style
294290
$(Q)$(RUSTBOOK) build $(S)src/doc/style doc/style
295-
296-
error-index: doc/error-index.html
297-
298-
doc/error-index.html: $(ERR_IDX_GEN_EXE) | doc/
299-
$(Q)$(call E, error-index-generator: $@)
300-
$(Q)$(ERR_IDX_GEN)

branches/snap-stage3/mk/prepare.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ define PREPARE_MAN
7070
$(Q)$(PREPARE_MAN_CMD) $(PREPARE_SOURCE_MAN_DIR)/$(1) $(PREPARE_DEST_MAN_DIR)/$(1)
7171
endef
7272

73-
PREPARE_TOOLS = $(filter-out compiletest rustbook error-index-generator, $(TOOLS))
73+
PREPARE_TOOLS = $(filter-out compiletest rustbook, $(TOOLS))
7474

7575

7676
# $(1) is tool

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ pub fn test_opts(config: &Config) -> test::TestOpts {
269269
run_ignored: config.run_ignored,
270270
logfile: config.logfile.clone(),
271271
run_tests: true,
272-
bench_benchmarks: true,
272+
run_benchmarks: true,
273273
nocapture: env::var("RUST_TEST_NOCAPTURE").is_ok(),
274274
color: test::AutoColor,
275275
}

branches/snap-stage3/src/doc/complement-design-faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ representation as a primitive. This allows using Rust `enum`s in FFI where C
3939
`enum`s are also used, for most use cases. The attribute can also be applied
4040
to `struct`s to get the same layout as a C struct would.
4141

42-
[repr]: reference.html#ffi-attributes
42+
[repr]: reference.html#miscellaneous-attributes
4343

4444
## There is no GC
4545

branches/snap-stage3/src/doc/complement-lang-faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ This does mean that indexed access to a Unicode codepoint inside a `str` value i
109109
* Most "character oriented" operations on text only work under very restricted language assumptions sets such as "ASCII-range codepoints only". Outside ASCII-range, you tend to have to use a complex (non-constant-time) algorithm for determining linguistic-unit (glyph, word, paragraph) boundaries anyways. We recommend using an "honest" linguistically-aware, Unicode-approved algorithm.
110110
* The `char` type is UCS4. If you honestly need to do a codepoint-at-a-time algorithm, it's trivial to write a `type wstr = [char]`, and unpack a `str` into it in a single pass, then work with the `wstr`. In other words: the fact that the language is not "decoding to UCS4 by default" shouldn't stop you from decoding (or re-encoding any other way) if you need to work with that encoding.
111111

112-
## Why are `str`s, slices, arrays etc. built-in types rather than (say) special kinds of trait/impl?
112+
## Why are strings, vectors etc. built-in types rather than (say) special kinds of trait/impl?
113113

114114
In each case there is one or more operator, literal constructor, overloaded use or integration with a built-in control structure that makes us think it would be awkward to phrase the type in terms of more-general type constructors. Same as, say, with numbers! But this is partly an aesthetic call, and we'd be willing to look at a worked-out proposal for eliminating or rephrasing these special cases.
115115

branches/snap-stage3/src/doc/grammar.md

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -176,15 +176,9 @@ excluded from the `ident` rule.
176176

177177
```antlr
178178
lit_suffix : ident;
179-
literal : [ string_lit | char_lit | byte_string_lit | byte_lit | num_lit | bool_lit ] lit_suffix ?;
179+
literal : [ string_lit | char_lit | byte_string_lit | byte_lit | num_lit ] lit_suffix ?;
180180
```
181181

182-
The optional `lit_suffix` production is only used for certain numeric literals,
183-
but is reserved for future extension. That is, the above gives the lexical
184-
grammar, but a Rust parser will reject everything but the 12 special cases
185-
mentioned in [Number literals](reference.html#number-literals) in the
186-
reference.
187-
188182
#### Character and string literals
189183

190184
```antlr
@@ -244,9 +238,7 @@ dec_lit : [ dec_digit | '_' ] + ;
244238

245239
#### Boolean literals
246240

247-
```antlr
248-
bool_lit : [ "true" | "false" ] ;
249-
```
241+
**FIXME:** write grammar
250242

251243
The two values of the boolean type are written `true` and `false`.
252244

@@ -305,7 +297,7 @@ transcriber : '(' transcriber * ')' | '[' transcriber * ']'
305297

306298
```antlr
307299
item : mod_item | fn_item | type_item | struct_item | enum_item
308-
| const_item | static_item | trait_item | impl_item | extern_block ;
300+
| static_item | trait_item | impl_item | extern_block ;
309301
```
310302

311303
### Type Parameters
@@ -377,10 +369,6 @@ path_item : ident | "mod" ;
377369

378370
**FIXME:** grammar?
379371

380-
### Enumerations
381-
382-
**FIXME:** grammar?
383-
384372
### Constant items
385373

386374
```antlr

branches/snap-stage3/src/doc/reference.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,11 @@ of tokens, that immediately and directly denotes the value it evaluates to,
130130
rather than referring to it by name or some other evaluation rule. A literal is
131131
a form of constant expression, so is evaluated (primarily) at compile time.
132132

133+
The optional suffix is only used for certain numeric literals, but is
134+
reserved for future extension, that is, the above gives the lexical
135+
grammar, but a Rust parser will reject everything but the 12 special
136+
cases mentioned in [Number literals](#number-literals) below.
137+
133138
#### Examples
134139

135140
##### Characters and strings
@@ -1557,7 +1562,8 @@ warnings are generated, or otherwise "you used a private item of another module
15571562
and weren't allowed to."
15581563

15591564
By default, everything in Rust is *private*, with one exception. Enum variants
1560-
in a `pub` enum are also public by default. When an item is declared as `pub`,
1565+
in a `pub` enum are also public by default. You are allowed to alter this
1566+
default visibility with the `priv` keyword. When an item is declared as `pub`,
15611567
it can be thought of as being accessible to the outside world. For example:
15621568

15631569
```
@@ -1867,12 +1873,13 @@ macro scope.
18671873
lower to the target's SIMD instructions, if any; the `simd` feature gate
18681874
is necessary to use this attribute.
18691875
- `static_assert` - on statics whose type is `bool`, terminates compilation
1870-
with an error if it is not initialized to `true`. To use this, the `static_assert`
1871-
feature gate must be enabled.
1876+
with an error if it is not initialized to `true`.
1877+
- `unsafe_destructor` - allow implementations of the "drop" language item
1878+
where the type it is implemented for does not implement the "send" language
1879+
item; the `unsafe_destructor` feature gate is needed to use this attribute
18721880
- `unsafe_no_drop_flag` - on structs, remove the flag that prevents
18731881
destructors from being run twice. Destructors might be run multiple times on
1874-
the same object with this attribute. To use this, the `unsafe_no_drop_flag` feature
1875-
gate must be enabled.
1882+
the same object with this attribute.
18761883
- `doc` - Doc comments such as `/// foo` are equivalent to `#[doc = "foo"]`.
18771884
- `rustc_on_unimplemented` - Write a custom note to be shown along with the error
18781885
when the trait is found to be unimplemented on a type.
@@ -2043,21 +2050,21 @@ A complete list of the built-in language items will be added in the future.
20432050

20442051
### Inline attributes
20452052

2046-
The inline attribute suggests that the compiler should place a copy of
2047-
the function or static in the caller, rather than generating code to
2048-
call the function or access the static where it is defined.
2053+
The inline attribute is used to suggest to the compiler to perform an inline
2054+
expansion and place a copy of the function or static in the caller rather than
2055+
generating code to call the function or access the static where it is defined.
20492056

20502057
The compiler automatically inlines functions based on internal heuristics.
2051-
Incorrectly inlining functions can actually make the program slower, so it
2058+
Incorrectly inlining functions can actually making the program slower, so it
20522059
should be used with care.
20532060

20542061
Immutable statics are always considered inlineable unless marked with
20552062
`#[inline(never)]`. It is undefined whether two different inlineable statics
20562063
have the same memory address. In other words, the compiler is free to collapse
20572064
duplicate inlineable statics together.
20582065

2059-
`#[inline]` and `#[inline(always)]` always cause the function to be serialized
2060-
into the crate metadata to allow cross-crate inlining.
2066+
`#[inline]` and `#[inline(always)]` always causes the function to be serialized
2067+
into crate metadata to allow cross-crate inlining.
20612068

20622069
There are three different types of inline attributes:
20632070

@@ -2424,18 +2431,11 @@ Tuples are written by enclosing zero or more comma-separated expressions in
24242431
parentheses. They are used to create [tuple-typed](#tuple-types) values.
24252432

24262433
```{.tuple}
2434+
(0,);
24272435
(0.0, 4.5);
24282436
("a", 4usize, true);
24292437
```
24302438

2431-
You can disambiguate a single-element tuple from a value in parentheses with a
2432-
comma:
2433-
2434-
```
2435-
(0,); // single-element tuple
2436-
(0); // zero in parentheses
2437-
```
2438-
24392439
### Unit expressions
24402440

24412441
The expression `()` denotes the _unit value_, the only value of the type with

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@ want to dive in with a project, or ‘Syntax and Semantics’ if you prefer to
4040
start small, and learn a single concept thoroughly before moving onto the next.
4141
Copious cross-linking connects these parts together.
4242

43-
### Contributing
44-
45-
The source files from which this book is generated can be found on Github:
46-
[github.com/rust-lang/rust/tree/master/src/doc/trpl](https://github.com/rust-lang/rust/tree/master/src/doc/trpl)
47-
4843
## A brief introduction to Rust
4944

5045
Is Rust a language you might be interested in? Let’s examine a few small code
@@ -195,5 +190,5 @@ fn main() {
195190
We created an inner scope with an additional set of curly braces. `y` will go out of
196191
scope before we call `push()`, and so we’re all good.
197192

198-
This concept of ownership isn’t just good for preventing dangling pointers, but an
193+
This concept of ownership isn’t just good for preventing danging pointers, but an
199194
entire set of related problems, like iterator invalidation, concurrency, and more.

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* [Hello, world!](hello-world.md)
66
* [Hello, Cargo!](hello-cargo.md)
77
* [Learn Rust](learn-rust.md)
8-
* [Guessing Game](guessing-game.md)
98
* [Effective Rust](effective-rust.md)
109
* [The Stack and the Heap](the-stack-and-the-heap.md)
1110
* [Testing](testing.md)
@@ -27,6 +26,7 @@
2726
* [References and Borrowing](references-and-borrowing.md)
2827
* [Lifetimes](lifetimes.md)
2928
* [Mutability](mutability.md)
29+
* [Move semantics](move-semantics.md)
3030
* [Enums](enums.md)
3131
* [Match](match.md)
3232
* [Structs](structs.md)
@@ -64,6 +64,5 @@
6464
* [Benchmark Tests](benchmark-tests.md)
6565
* [Box Syntax and Patterns](box-syntax-and-patterns.md)
6666
* [Slice Patterns](slice-patterns.md)
67-
* [Associated Constants](associated-constants.md)
6867
* [Glossary](glossary.md)
6968
* [Academic Research](academic-research.md)

branches/snap-stage3/src/doc/trpl/associated-constants.md

Lines changed: 0 additions & 79 deletions
This file was deleted.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@ Rust attributes are used for a number of different things. There is a full list
6767
of attributes [in the reference][reference]. Currently, you are not allowed to
6868
create your own attributes, the Rust compiler defines them.
6969

70-
[reference]: ../reference.html#attributes
70+
[reference]: reference.html#attributes

branches/snap-stage3/src/doc/trpl/casting-between-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ what it does is very simple, but very scary. It tells Rust to treat a value of
4343
one type as though it were another type. It does this regardless of the
4444
typechecking system, and just completely trusts you.
4545

46-
[intrinsics]: intrinsics.html
46+
[intrinsic]: intrinsics.html
4747

4848
In our previous example, we know that an array of four `u8`s represents a `u32`
4949
properly, and so we want to do the cast. Using `transmute` instead of `as`,

0 commit comments

Comments
 (0)