Skip to content

Commit fb12dff

Browse files
committed
---
yaml --- r: 172543 b: refs/heads/auto c: 0aec4db h: refs/heads/master i: 172541: 2272130 172539: cc71234 172535: ec7964c 172527: 80fdc4e 172511: 69984e9 172479: c7ccb09 172415: d02c9ce 172287: d4148d2 172031: fb39452 v: v3
1 parent c54c013 commit fb12dff

File tree

113 files changed

+1170
-525
lines changed

Some content is hidden

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

113 files changed

+1170
-525
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: 02d0a8bbcf0a64339e4279c4ddb4841189ba5069
13+
refs/heads/auto: 0aec4db1c09574da2f30e3844de6d252d79d4939
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/mk/docs.mk

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ DOCS := index intro tutorial complement-bugreport \
2929
complement-lang-faq complement-design-faq complement-project-faq \
3030
rustdoc reference
3131

32+
# Legacy guides, preserved for a while to reduce the number of 404s
33+
DOCS += guide-crates guide-error-handling guide-ffi guide-macros guide \
34+
guide-ownership guide-plugins guide-pointers guide-strings guide-tasks \
35+
guide-testing
36+
37+
3238
PDF_DOCS := reference
3339

3440
RUSTDOC_DEPS_reference := doc/full-toc.inc
@@ -277,6 +283,6 @@ compiler-docs: $(COMPILER_DOC_TARGETS)
277283

278284
trpl: doc/book/index.html
279285

280-
doc/book/index.html: $(RUSTBOOK_EXE) $(wildcard $(S)/src/doc/trpl/*.md)
286+
doc/book/index.html: $(RUSTBOOK_EXE) $(wildcard $(S)/src/doc/trpl/*.md) | doc/
281287
$(Q)rm -rf doc/book
282288
$(Q)$(RUSTBOOK) build $(S)src/doc/trpl doc/book

branches/auto/src/compiletest/header.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ pub struct TestProps {
4242
pub pretty_compare_only: bool,
4343
// Patterns which must not appear in the output of a cfail test.
4444
pub forbid_output: Vec<String>,
45-
// Ignore errors which originate from a command line span
46-
pub ignore_command_line: bool,
4745
}
4846

4947
// Load any test directives embedded in the file
@@ -62,8 +60,6 @@ pub fn load_props(testfile: &Path) -> TestProps {
6260
let mut pretty_mode = None;
6361
let mut pretty_compare_only = false;
6462
let mut forbid_output = Vec::new();
65-
let mut ignore_command_line = false;
66-
6763
iter_header(testfile, |ln| {
6864
match parse_error_pattern(ln) {
6965
Some(ep) => error_patterns.push(ep),
@@ -106,10 +102,6 @@ pub fn load_props(testfile: &Path) -> TestProps {
106102
pretty_compare_only = parse_pretty_compare_only(ln);
107103
}
108104

109-
if !ignore_command_line {
110-
ignore_command_line = parse_ignore_command_line(ln);
111-
}
112-
113105
match parse_aux_build(ln) {
114106
Some(ab) => { aux_builds.push(ab); }
115107
None => {}
@@ -148,7 +140,6 @@ pub fn load_props(testfile: &Path) -> TestProps {
148140
pretty_mode: pretty_mode.unwrap_or("normal".to_string()),
149141
pretty_compare_only: pretty_compare_only,
150142
forbid_output: forbid_output,
151-
ignore_command_line: ignore_command_line,
152143
}
153144
}
154145

@@ -300,10 +291,6 @@ fn parse_pretty_compare_only(line: &str) -> bool {
300291
parse_name_directive(line, "pretty-compare-only")
301292
}
302293

303-
fn parse_ignore_command_line(line: &str) -> bool {
304-
parse_name_directive(line, "ignore-command-line")
305-
}
306-
307294
fn parse_exec_env(line: &str) -> Option<(String, String)> {
308295
parse_name_value_directive(line, "exec-env").map(|nv| {
309296
// nv is either FOO or FOO=BAR

branches/auto/src/compiletest/runtest.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ fn run_cfail_test(config: &Config, props: &TestProps, testfile: &Path) {
104104
if !props.error_patterns.is_empty() {
105105
fatal("both error pattern and expected errors specified");
106106
}
107-
check_expected_errors(props, expected_errors, testfile, &proc_res);
107+
check_expected_errors(expected_errors, testfile, &proc_res);
108108
} else {
109109
check_error_patterns(props, testfile, output_to_check.as_slice(), &proc_res);
110110
}
@@ -941,8 +941,7 @@ fn check_forbid_output(props: &TestProps,
941941
}
942942
}
943943

944-
fn check_expected_errors(props: &TestProps,
945-
expected_errors: Vec<errors::ExpectedError> ,
944+
fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
946945
testfile: &Path,
947946
proc_res: &ProcRes) {
948947

@@ -997,11 +996,6 @@ fn check_expected_errors(props: &TestProps,
997996
was_expected = true;
998997
}
999998

1000-
if line.starts_with("<command line option>") &&
1001-
props.ignore_command_line {
1002-
was_expected = true;
1003-
}
1004-
1005999
if !was_expected && is_compiler_error_or_warning(line) {
10061000
fatal_proc_rec(format!("unexpected compiler error or warning: '{}'",
10071001
line).as_slice(),

branches/auto/src/doc/guide-crates.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
% The (old) Rust Crates and Modules Guide
2+
3+
This content has moved into the
4+
[the Rust Programming Language book](book/crates-and-modules.html).
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
% Error Handling in Rust
2+
3+
This content has moved into the
4+
[the Rust Programming Language book](book/error-handling.html).

branches/auto/src/doc/guide-ffi.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
% The (old) Rust Foreign Function Interface Guide
2+
3+
This content has moved into the
4+
[the Rust Programming Language book](book/ffi.html).

branches/auto/src/doc/guide-macros.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
% The (old) Rust Macros Guide
2+
3+
This content has moved into the
4+
[the Rust Programming Language book](book/macros.html).
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
% The (old) Rust Ownership Guide
2+
3+
This content has moved into the
4+
[the Rust Programming Language book](book/ownership.html).
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
% The (old) Rust Compiler Plugins Guide
2+
3+
This content has moved into the
4+
[the Rust Programming Language book](book/plugins.html).
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
% The (old) Rust Pointer Guide
2+
3+
This content has moved into the
4+
[the Rust Programming Language book](book/pointers.html).
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
% The (old) Guide to Rust Strings
2+
3+
This content has moved into the
4+
[the Rust Programming Language book](book/strings.html).

branches/auto/src/doc/guide-tasks.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
% The (old) Rust Threads and Communication Guide
2+
3+
This content has moved into the
4+
[the Rust Programming Language book](book/tasks.html).
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
% The (old) Rust Testing Guide
2+
3+
This content has moved into the
4+
[the Rust Programming Language book](book/testing.html).

branches/auto/src/doc/guide-unsafe.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
% Writing Safe Low-level and Unsafe Code in Rust
2+
3+
This content has moved into the
4+
[the Rust Programming Language book](book/unsafe.html).

branches/auto/src/doc/guide.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
% The (old) Rust Guide
2+
3+
This content has moved into the
4+
[the Rust Programming Language book](book/README.html).

branches/auto/src/doc/intro.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ use semver::Version;
106106
107107
fn main() {
108108
assert!(Version::parse("1.2.3") == Ok(Version {
109-
major: 1u,
110-
minor: 2u,
111-
patch: 3u,
109+
major: 1u64,
110+
minor: 2u64,
111+
patch: 3u64,
112112
pre: vec!(),
113113
build: vec!(),
114114
}));

branches/auto/src/doc/reference.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ mod b {
603603
```
604604

605605
* Paths starting with the keyword `super` begin resolution relative to the
606-
parent module. Each further identifier must resolve to an item
606+
parent module. Each further identifier must resolve to an item.
607607

608608
```rust
609609
mod a {
@@ -985,7 +985,7 @@ top of [modules](#modules) and [blocks](#blocks).
985985
986986
Use declarations support a number of convenient shortcuts:
987987

988-
* Rebinding the target name as a new local name, using the syntax `use p::q::r as x;`.
988+
* Rebinding the target name as a new local name, using the syntax `use p::q::r as x;`
989989
* Simultaneously binding a list of paths differing only in their final element,
990990
using the glob-like brace syntax `use a::b::{c,d,e,f};`
991991
* Binding all paths matching a given prefix, using the asterisk wildcard syntax
@@ -1091,7 +1091,7 @@ set of *input* [*slots*](#memory-slots) as parameters, through which the caller
10911091
passes arguments into the function, and an *output* [*slot*](#memory-slots)
10921092
through which the function passes results back to the caller.
10931093

1094-
A function may also be copied into a first class *value*, in which case the
1094+
A function may also be copied into a first-class *value*, in which case the
10951095
value has the corresponding [*function type*](#function-types), and can be used
10961096
otherwise exactly as a function item (with a minor additional cost of calling
10971097
the function indirectly).
@@ -1224,7 +1224,7 @@ the guarantee that these issues are never caused by safe code.
12241224
* A value other than `false` (0) or `true` (1) in a `bool`
12251225
* A discriminant in an `enum` not included in the type definition
12261226
* A value in a `char` which is a surrogate or above `char::MAX`
1227-
* non-UTF-8 byte sequences in a `str`
1227+
* Non-UTF-8 byte sequences in a `str`
12281228
* Unwinding into Rust from foreign code or unwinding from Rust into foreign
12291229
code. Rust's failure system is not compatible with exception handling in
12301230
other languages. Unwinding must be caught and handled at FFI boundaries.
@@ -1827,7 +1827,7 @@ accesses in two cases:
18271827

18281828
These two cases are surprisingly powerful for creating module hierarchies
18291829
exposing public APIs while hiding internal implementation details. To help
1830-
explain, here's a few use cases and what they would entail.
1830+
explain, here's a few use cases and what they would entail:
18311831

18321832
* A library developer needs to expose functionality to crates which link
18331833
against their library. As a consequence of the first case, this means that
@@ -1858,7 +1858,7 @@ import/expression is only valid if the destination is in the current visibility
18581858
scope.
18591859

18601860
Here's an example of a program which exemplifies the three cases outlined
1861-
above.
1861+
above:
18621862

18631863
```
18641864
// This module is private, meaning that no external crate can access this
@@ -2220,7 +2220,7 @@ mod m1 {
22202220
```
22212221

22222222
This example shows how one can use `allow` and `warn` to toggle a particular
2223-
check on and off.
2223+
check on and off:
22242224

22252225
```{.ignore}
22262226
#[warn(missing_docs)]
@@ -2242,7 +2242,7 @@ mod m2{
22422242
```
22432243

22442244
This example shows how one can use `forbid` to disallow uses of `allow` for
2245-
that lint check.
2245+
that lint check:
22462246

22472247
```{.ignore}
22482248
#[forbid(missing_docs)]
@@ -2325,9 +2325,9 @@ These language items are traits:
23252325
* `ord`
23262326
: Elements have a partial ordering.
23272327
* `deref`
2328-
: `*` can be applied, yielding a reference to another type
2328+
: `*` can be applied, yielding a reference to another type.
23292329
* `deref_mut`
2330-
: `*` can be applied, yielding a mutable reference to another type
2330+
: `*` can be applied, yielding a mutable reference to another type.
23312331

23322332
These are functions:
23332333

@@ -2348,7 +2348,7 @@ These are functions:
23482348
* `type_id`
23492349
: The type returned by the `type_id` intrinsic.
23502350
* `unsafe`
2351-
: A type whose contents can be mutated through an immutable reference
2351+
: A type whose contents can be mutated through an immutable reference.
23522352

23532353
#### Marker types
23542354

@@ -2357,11 +2357,11 @@ These types help drive the compiler's analysis
23572357
* `begin_unwind`
23582358
: ___Needs filling in___
23592359
* `no_copy_bound`
2360-
: This type does not implement "copy", even if eligible
2360+
: This type does not implement "copy", even if eligible.
23612361
* `no_send_bound`
2362-
: This type does not implement "send", even if eligible
2362+
: This type does not implement "send", even if eligible.
23632363
* `no_sync_bound`
2364-
: This type does not implement "sync", even if eligible
2364+
: This type does not implement "sync", even if eligible.
23652365
* `eh_personality`
23662366
: ___Needs filling in___
23672367
* `exchange_free`
@@ -2383,11 +2383,11 @@ These types help drive the compiler's analysis
23832383
* `iterator`
23842384
: ___Needs filling in___
23852385
* `contravariant_lifetime`
2386-
: The lifetime parameter should be considered contravariant
2386+
: The lifetime parameter should be considered contravariant.
23872387
* `covariant_lifetime`
2388-
: The lifetime parameter should be considered covariant
2388+
: The lifetime parameter should be considered covariant.
23892389
* `invariant_lifetime`
2390-
: The lifetime parameter should be considered invariant
2390+
: The lifetime parameter should be considered invariant.
23912391
* `malloc`
23922392
: Allocate memory on the managed heap.
23932393
* `owned_box`
@@ -2397,11 +2397,11 @@ These types help drive the compiler's analysis
23972397
* `start`
23982398
: ___Needs filling in___
23992399
* `contravariant_type`
2400-
: The type parameter should be considered contravariant
2400+
: The type parameter should be considered contravariant.
24012401
* `covariant_type`
2402-
: The type parameter should be considered covariant
2402+
: The type parameter should be considered covariant.
24032403
* `invariant_type`
2404-
: The type parameter should be considered invariant
2404+
: The type parameter should be considered invariant.
24052405
* `ty_desc`
24062406
: ___Needs filling in___
24072407

@@ -2928,13 +2928,13 @@ automatically dereferenced to make the field access possible.
29282928
```{.ebnf .gram}
29292929
array_expr : '[' "mut" ? vec_elems? ']' ;
29302930
2931-
array_elems : [expr [',' expr]*] | [expr ',' ".." expr] ;
2931+
array_elems : [expr [',' expr]*] | [expr ';' expr] ;
29322932
```
29332933

29342934
An [array](#array,-and-slice-types) _expression_ is written by enclosing zero
29352935
or more comma-separated expressions of uniform type in square brackets.
29362936

2937-
In the `[expr ',' ".." expr]` form, the expression after the `".."` must be a
2937+
In the `[expr ';' expr]` form, the expression after the `';'` must be a
29382938
constant expression that can be evaluated at compile time, such as a
29392939
[literal](#literals) or a [static item](#static-items).
29402940

@@ -3226,11 +3226,11 @@ the simplest and least-expensive form (analogous to a ```|| { }``` expression),
32263226
the lambda expression captures its environment by reference, effectively
32273227
borrowing pointers to all outer variables mentioned inside the function.
32283228
Alternately, the compiler may infer that a lambda expression should copy or
3229-
move values (depending on their type.) from the environment into the lambda
3229+
move values (depending on their type) from the environment into the lambda
32303230
expression's captured environment.
32313231

32323232
In this example, we define a function `ten_times` that takes a higher-order
3233-
function argument, and call it with a lambda expression as an argument.
3233+
function argument, and call it with a lambda expression as an argument:
32343234

32353235
```
32363236
fn ten_times<F>(f: F) where F: Fn(int) {
@@ -3668,14 +3668,14 @@ within an object along with one byte past the end.
36683668
The types `char` and `str` hold textual data.
36693669

36703670
A value of type `char` is a [Unicode scalar value](
3671-
http://www.unicode.org/glossary/#unicode_scalar_value) (ie. a code point that
3671+
http://www.unicode.org/glossary/#unicode_scalar_value) (i.e. a code point that
36723672
is not a surrogate), represented as a 32-bit unsigned word in the 0x0000 to
36733673
0xD7FF or 0xE000 to 0x10FFFF range. A `[char]` array is effectively an UCS-4 /
36743674
UTF-32 string.
36753675

36763676
A value of type `str` is a Unicode string, represented as an array of 8-bit
36773677
unsigned bytes holding a sequence of UTF-8 codepoints. Since `str` is of
3678-
unknown size, it is not a _first class_ type, but can only be instantiated
3678+
unknown size, it is not a _first-class_ type, but can only be instantiated
36793679
through a pointer type, such as `&str` or `String`.
36803680

36813681
### Tuple types
@@ -3705,7 +3705,7 @@ assert!(b != "world");
37053705

37063706
Rust has two different types for a list of items:
37073707

3708-
* `[T ..N]`, an 'array'
3708+
* `[T; N]`, an 'array'.
37093709
* `&[T]`, a 'slice'.
37103710

37113711
An array has a fixed size, and can be allocated on either the stack or the
@@ -3717,9 +3717,9 @@ to, it borrows it.
37173717
An example of each kind:
37183718

37193719
```{rust}
3720-
let vec: Vec<int> = vec![1, 2, 3];
3721-
let arr: [int; 3] = [1, 2, 3];
3722-
let s: &[int] = vec.as_slice();
3720+
let vec: Vec<i32> = vec![1, 2, 3];
3721+
let arr: [i32; 3] = [1, 2, 3];
3722+
let s: &[i32] = vec.as_slice();
37233723
```
37243724

37253725
As you can see, the `vec!` macro allows you to create a `Vec<T>` easily. The
@@ -3805,7 +3805,7 @@ enum List<T> {
38053805
Cons(T, Box<List<T>>)
38063806
}
38073807
3808-
let a: List<int> = List::Cons(7, Box::new(List::Cons(13, Box::new(List::Nil))));
3808+
let a: List<i32> = List::Cons(7, Box::new(List::Cons(13, Box::new(List::Nil))));
38093809
```
38103810

38113811
### Pointer types

0 commit comments

Comments
 (0)