Skip to content

Commit 910ec6d

Browse files
committed
Auto merge of rust-lang#56118 - steveklabnik:update-books, r=alexcrichton
Update books for Rust 2018 This PR: 1. updates all of the books * I don't know if @gankro has further plans for the nomicon or not 2. updates the build process because TRPL is only distributing one edition now 3. fixes up the stdlib links I think that this passes but it's 3:20 am and so I'm sending it in and will fix up anything i missed in the morning. /cc @alexcrichton for the big beta backport
2 parents ee7bb94 + d7b3f5c commit 910ec6d

File tree

17 files changed

+49
-62
lines changed

17 files changed

+49
-62
lines changed

src/bootstrap/doc.rs

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -260,22 +260,31 @@ impl Step for TheBook {
260260
let compiler = self.compiler;
261261
let target = self.target;
262262
let name = self.name;
263-
// build book first edition
263+
264+
// build book
264265
builder.ensure(Rustbook {
265266
target,
266-
name: INTERNER.intern_string(format!("{}/first-edition", name)),
267+
name: INTERNER.intern_string(name.to_string()),
267268
});
268269

269-
// build book second edition
270+
// building older edition redirects
271+
272+
let source_name = format!("{}/first-edition", name);
270273
builder.ensure(Rustbook {
271274
target,
272-
name: INTERNER.intern_string(format!("{}/second-edition", name)),
275+
name: INTERNER.intern_string(source_name),
273276
});
274277

275-
// build book 2018 edition
278+
let source_name = format!("{}/second-edition", name);
276279
builder.ensure(Rustbook {
277280
target,
278-
name: INTERNER.intern_string(format!("{}/2018-edition", name)),
281+
name: INTERNER.intern_string(source_name),
282+
});
283+
284+
let source_name = format!("{}/2018-edition", name);
285+
builder.ensure(Rustbook {
286+
target,
287+
name: INTERNER.intern_string(source_name),
279288
});
280289

281290
// build the version info page and CSS
@@ -284,11 +293,6 @@ impl Step for TheBook {
284293
target,
285294
});
286295

287-
// build the index page
288-
let index = format!("{}/index.md", name);
289-
builder.info(&format!("Documenting book index ({})", target));
290-
invoke_rustdoc(builder, compiler, target, &index);
291-
292296
// build the redirect pages
293297
builder.info(&format!("Documenting book redirect pages ({})", target));
294298
for file in t!(fs::read_dir(builder.src.join("src/doc/book/redirects"))) {

src/doc/book

Submodule book updated 438 files

src/doc/nomicon

src/doc/reference

src/doc/unstable-book/src/language-features/macro-literal-matcher.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ The tracking issue for this feature is: [#35625]
44

55
The RFC is: [rfc#1576].
66

7-
With this feature gate enabled, the [list of fragment specifiers][frags] gains one more entry:
7+
With this feature gate enabled, the [list of designators] gains one more entry:
88

99
* `literal`: a literal. Examples: 2, "string", 'c'
1010

1111
A `literal` may be followed by anything, similarly to the `ident` specifier.
1212

1313
[rfc#1576]: http://rust-lang.github.io/rfcs/1576-macros-literal-matcher.html
1414
[#35625]: https://github.com/rust-lang/rust/issues/35625
15-
[frags]: ../book/first-edition/macros.html#syntactic-requirements
15+
[list of designators]: ../reference/macros-by-example.html
1616

1717
------------------------

src/doc/unstable-book/src/language-features/plugin.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,6 @@ of extensions. See `Registry::register_syntax_extension` and the
137137

138138
## Tips and tricks
139139

140-
Some of the [macro debugging tips](../book/first-edition/macros.html#debugging-macro-code) are applicable.
141-
142140
You can use `syntax::parse` to turn token trees into
143141
higher-level syntax elements like expressions:
144142

src/liballoc/rc.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
//!
4444
//! `Rc<T>` automatically dereferences to `T` (via the [`Deref`] trait),
4545
//! so you can call `T`'s methods on a value of type [`Rc<T>`][`Rc`]. To avoid name
46-
//! clashes with `T`'s methods, the methods of [`Rc<T>`][`Rc`] itself are [associated
47-
//! functions][assoc], called using function-like syntax:
46+
//! clashes with `T`'s methods, the methods of [`Rc<T>`][`Rc`] itself are associated
47+
//! functions, called using function-like syntax:
4848
//!
4949
//! ```
5050
//! use std::rc::Rc;
@@ -234,7 +234,6 @@
234234
//! [downgrade]: struct.Rc.html#method.downgrade
235235
//! [upgrade]: struct.Weak.html#method.upgrade
236236
//! [`None`]: ../../std/option/enum.Option.html#variant.None
237-
//! [assoc]: ../../book/first-edition/method-syntax.html#associated-functions
238237
//! [mutability]: ../../std/cell/index.html#introducing-mutability-inside-of-something-immutable
239238
240239
#![stable(feature = "rust1", since = "1.0.0")]

src/liballoc/sync.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ const MAX_REFCOUNT: usize = (isize::MAX) as usize;
120120
///
121121
/// `Arc<T>` automatically dereferences to `T` (via the [`Deref`][deref] trait),
122122
/// so you can call `T`'s methods on a value of type `Arc<T>`. To avoid name
123-
/// clashes with `T`'s methods, the methods of `Arc<T>` itself are [associated
124-
/// functions][assoc], called using function-like syntax:
123+
/// clashes with `T`'s methods, the methods of `Arc<T>` itself are associated
124+
/// functions, called using function-like syntax:
125125
///
126126
/// ```
127127
/// use std::sync::Arc;
@@ -146,7 +146,6 @@ const MAX_REFCOUNT: usize = (isize::MAX) as usize;
146146
/// [downgrade]: struct.Arc.html#method.downgrade
147147
/// [upgrade]: struct.Weak.html#method.upgrade
148148
/// [`None`]: ../../std/option/enum.Option.html#variant.None
149-
/// [assoc]: ../../book/first-edition/method-syntax.html#associated-functions
150149
/// [`RefCell<T>`]: ../../std/cell/struct.RefCell.html
151150
/// [`std::sync`]: ../../std/sync/index.html
152151
/// [`Arc::clone(&from)`]: #method.clone

src/libcore/char/convert.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use super::MAX;
1919
/// Converts a `u32` to a `char`.
2020
///
2121
/// Note that all [`char`]s are valid [`u32`]s, and can be cast to one with
22-
/// [`as`]:
22+
/// `as`:
2323
///
2424
/// ```
2525
/// let c = '💯';
@@ -34,7 +34,6 @@ use super::MAX;
3434
///
3535
/// [`char`]: ../../std/primitive.char.html
3636
/// [`u32`]: ../../std/primitive.u32.html
37-
/// [`as`]: ../../book/first-edition/casting-between-types.html#as
3837
///
3938
/// For an unsafe version of this function which ignores these checks, see
4039
/// [`from_u32_unchecked`].
@@ -71,7 +70,7 @@ pub fn from_u32(i: u32) -> Option<char> {
7170
/// Converts a `u32` to a `char`, ignoring validity.
7271
///
7372
/// Note that all [`char`]s are valid [`u32`]s, and can be cast to one with
74-
/// [`as`]:
73+
/// `as`:
7574
///
7675
/// ```
7776
/// let c = '💯';
@@ -86,7 +85,6 @@ pub fn from_u32(i: u32) -> Option<char> {
8685
///
8786
/// [`char`]: ../../std/primitive.char.html
8887
/// [`u32`]: ../../std/primitive.u32.html
89-
/// [`as`]: ../../book/first-edition/casting-between-types.html#as
9088
///
9189
/// # Safety
9290
///

0 commit comments

Comments
 (0)