Skip to content

Commit 51ef55b

Browse files
committed
Rollup merge of rust-lang#56053 - petrochenkov:absedihyg, r=nikomatsakis,alexcrichton
2 parents 37e0345 + 581b683 commit 51ef55b

File tree

82 files changed

+991
-661
lines changed

Some content is hidden

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

82 files changed

+991
-661
lines changed

RELEASES.md

+8
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,14 @@ Cargo
7474
[cargo-rename-reference]: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#renaming-dependencies-in-cargotoml
7575
[const-reference]: https://doc.rust-lang.org/reference/items/functions.html#const-functions
7676

77+
Version 1.30.1 (2018-11-08)
78+
===========================
79+
80+
- [Fixed overflow ICE in rustdoc][54199]
81+
- [Cap Cargo progress bar width at 60 in MSYS terminals][cargo/6122]
82+
83+
[54199]: https://github.com/rust-lang/rust/pull/54199
84+
[cargo/6122]: https://github.com/rust-lang/cargo/pull/6122
7785

7886
Version 1.30.0 (2018-10-25)
7987
==========================

src/bootstrap/doc.rs

+15-11
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/bootstrap/tool.rs

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ use util::{exe, add_lib_path};
2222
use compile;
2323
use native;
2424
use channel::GitInfo;
25+
use channel;
2526
use cache::Interned;
2627
use toolstate::ToolState;
2728

@@ -240,6 +241,7 @@ pub fn prepare_tool_cargo(
240241

241242
cargo.env("CFG_RELEASE_CHANNEL", &builder.config.channel);
242243
cargo.env("CFG_VERSION", builder.rust_version());
244+
cargo.env("CFG_RELEASE_NUM", channel::CFG_RELEASE_NUM);
243245

244246
let info = GitInfo::new(&builder.config, &dir);
245247
if let Some(sha) = info.sha() {

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

+2-2
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

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

+2-3
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

+2-3
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

+2-4
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
///

src/libcore/iter/iterator.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ pub trait Iterator {
532532
/// If you're doing some sort of looping for a side effect, it's considered
533533
/// more idiomatic to use [`for`] than `map()`.
534534
///
535-
/// [`for`]: ../../book/first-edition/loops.html#for
535+
/// [`for`]: ../../book/ch03-05-control-flow.html#looping-through-a-collection-with-for
536536
///
537537
/// # Examples
538538
///
@@ -580,7 +580,7 @@ pub trait Iterator {
580580
/// cases `for_each` may also be faster than a loop, because it will use
581581
/// internal iteration on adaptors like `Chain`.
582582
///
583-
/// [`for`]: ../../book/first-edition/loops.html#for
583+
/// [`for`]: ../../book/ch03-05-control-flow.html#looping-through-a-collection-with-for
584584
///
585585
/// # Examples
586586
///
@@ -1669,7 +1669,7 @@ pub trait Iterator {
16691669
/// use a `for` loop with a list of things to build up a result. Those
16701670
/// can be turned into `fold()`s:
16711671
///
1672-
/// [`for`]: ../../book/first-edition/loops.html#for
1672+
/// [`for`]: ../../book/ch03-05-control-flow.html#looping-through-a-collection-with-for
16731673
///
16741674
/// ```
16751675
/// let numbers = [1, 2, 3, 4, 5];

src/libcore/mem.rs

+5-10
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ pub use intrinsics::transmute;
132132
/// [uninit]: fn.uninitialized.html
133133
/// [clone]: ../clone/trait.Clone.html
134134
/// [swap]: fn.swap.html
135-
/// [FFI]: ../../book/first-edition/ffi.html
136135
/// [box]: ../../std/boxed/struct.Box.html
137136
/// [leak]: ../../std/boxed/struct.Box.html#method.leak
138137
/// [into_raw]: ../../std/boxed/struct.Box.html#method.into_raw
@@ -475,7 +474,7 @@ pub fn needs_drop<T>() -> bool {
475474
///
476475
/// This has the same effect as allocating space with
477476
/// [`mem::uninitialized`][uninit] and then zeroing it out. It is useful for
478-
/// [FFI] sometimes, but should generally be avoided.
477+
/// FFI sometimes, but should generally be avoided.
479478
///
480479
/// There is no guarantee that an all-zero byte-pattern represents a valid value of
481480
/// some type `T`. If `T` has a destructor and the value is destroyed (due to
@@ -486,7 +485,6 @@ pub fn needs_drop<T>() -> bool {
486485
/// many of the same caveats.
487486
///
488487
/// [uninit]: fn.uninitialized.html
489-
/// [FFI]: ../../book/first-edition/ffi.html
490488
/// [ub]: ../../reference/behavior-considered-undefined.html
491489
///
492490
/// # Examples
@@ -510,11 +508,9 @@ pub unsafe fn zeroed<T>() -> T {
510508
/// **This is incredibly dangerous and should not be done lightly. Deeply
511509
/// consider initializing your memory with a default value instead.**
512510
///
513-
/// This is useful for [FFI] functions and initializing arrays sometimes,
511+
/// This is useful for FFI functions and initializing arrays sometimes,
514512
/// but should generally be avoided.
515513
///
516-
/// [FFI]: ../../book/first-edition/ffi.html
517-
///
518514
/// # Undefined behavior
519515
///
520516
/// It is [undefined behavior][ub] to read uninitialized memory, even just an
@@ -685,10 +681,9 @@ pub fn replace<T>(dest: &mut T, mut src: T) -> T {
685681
/// While this does call the argument's implementation of [`Drop`][drop],
686682
/// it will not release any borrows, as borrows are based on lexical scope.
687683
///
688-
/// This effectively does nothing for
689-
/// [types which implement `Copy`](../../book/first-edition/ownership.html#copy-types),
690-
/// e.g. integers. Such values are copied and _then_ moved into the function,
691-
/// so the value persists after this function call.
684+
/// This effectively does nothing for types which implement `Copy`, e.g.
685+
/// integers. Such values are copied and _then_ moved into the function, so the
686+
/// value persists after this function call.
692687
///
693688
/// This function is not magic; it is literally defined as
694689
///

src/libcore/ptr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
//! [`NonNull::dangling`] in such cases.
5959
//!
6060
//! [aliasing]: ../../nomicon/aliasing.html
61-
//! [book]: ../../book/second-edition/ch19-01-unsafe-rust.html#dereferencing-a-raw-pointer
61+
//! [book]: ../../book/ch19-01-unsafe-rust.html#dereferencing-a-raw-pointer
6262
//! [ub]: ../../reference/behavior-considered-undefined.html
6363
//! [null]: ./fn.null.html
6464
//! [zst]: ../../nomicon/exotic-sizes.html#zero-sized-types-zsts

src/libcore/raw.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,7 @@
2121
/// The representation of a trait object like `&SomeTrait`.
2222
///
2323
/// This struct has the same layout as types like `&SomeTrait` and
24-
/// `Box<AnotherTrait>`. The [Trait Objects chapter of the
25-
/// Book][moreinfo] contains more details about the precise nature of
26-
/// these internals.
27-
///
28-
/// [moreinfo]: ../../book/first-edition/trait-objects.html#representation
24+
/// `Box<AnotherTrait>`.
2925
///
3026
/// `TraitObject` is guaranteed to match layouts, but it is not the
3127
/// type of trait objects (e.g. the fields are not directly accessible

0 commit comments

Comments
 (0)