From f51e64f7e9aa7c7a6827e3843feb0ed39e145a74 Mon Sep 17 00:00:00 2001 From: Ruud van Asseldonk Date: Thu, 3 Aug 2017 19:09:04 +0200 Subject: [PATCH 1/3] Point "deref coercions" links to new book Currently the link on doc.rust-lang.org is semi-broken; it links to a page that links to the exact page in the first edition in the book, or to the index of the second edition of the book. If the second editions is the recommended one now, we should point the links at that one. It seems that in the mean time, the links have been updated to point directly to the first edition of the book, but that hasn't made it onto the stable channel yet. By the time this commit makes it onto the stable channel, the second edition of the book should be complete enough. At least the part about deref coercions is. --- src/libstd/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 880caa2ade5d8..36a3550ececf0 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -203,7 +203,7 @@ //! [`use`]: ../book/first-edition/crates-and-modules.html#importing-modules-with-use //! [crate root]: ../book/first-edition/crates-and-modules.html#basic-terminology-crates-and-modules //! [crates.io]: https://crates.io -//! [deref coercions]: ../book/first-edition/deref-coercions.html +//! [deref coercions]: ../book/second-edition/ch15-02-deref.html#implicit-deref-coercions-with-functions-and-methods //! [files]: fs/struct.File.html //! [multithreading]: thread/index.html //! [other]: #what-is-in-the-standard-library-documentation From 01000fb5c65cf6f8ed8a845bf85dff5f2fe2949f Mon Sep 17 00:00:00 2001 From: Ruud van Asseldonk Date: Thu, 3 Aug 2017 21:17:31 +0200 Subject: [PATCH 2/3] Replace space in Markdown link label With the space, the tidy check does not recognize it as a link label. See also the comment above in line_is_url() in src/tools/tidy/src/style.rs. --- src/libstd/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 36a3550ececf0..86bdf606980a9 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -80,8 +80,8 @@ //! //! Note the documentation for the primitives [`str`] and [`[T]`][slice] (also //! called 'slice'). Many method calls on [`String`] and [`Vec`] are actually -//! calls to methods on [`str`] and [`[T]`][slice] respectively, via [deref -//! coercions]. +//! calls to methods on [`str`] and [`[T]`][slice] respectively, via +//! [deref-coercions]. //! //! Third, the standard library defines [The Rust Prelude], a small collection //! of items - mostly traits - that are imported into every module of every @@ -203,7 +203,7 @@ //! [`use`]: ../book/first-edition/crates-and-modules.html#importing-modules-with-use //! [crate root]: ../book/first-edition/crates-and-modules.html#basic-terminology-crates-and-modules //! [crates.io]: https://crates.io -//! [deref coercions]: ../book/second-edition/ch15-02-deref.html#implicit-deref-coercions-with-functions-and-methods +//! [deref-coercions]: ../book/second-edition/ch15-02-deref.html#implicit-deref-coercions-with-functions-and-methods //! [files]: fs/struct.File.html //! [multithreading]: thread/index.html //! [other]: #what-is-in-the-standard-library-documentation From e63d979e22d6c0b82812a944151db3d3f54ff2e4 Mon Sep 17 00:00:00 2001 From: Ruud van Asseldonk Date: Fri, 4 Aug 2017 13:03:58 +0200 Subject: [PATCH 3/3] Docs: restore link text after renaming anchor The text does not need the hyphen, but the anchor name does. --- src/libstd/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 86bdf606980a9..30495f297453d 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -80,8 +80,8 @@ //! //! Note the documentation for the primitives [`str`] and [`[T]`][slice] (also //! called 'slice'). Many method calls on [`String`] and [`Vec`] are actually -//! calls to methods on [`str`] and [`[T]`][slice] respectively, via -//! [deref-coercions]. +//! calls to methods on [`str`] and [`[T]`][slice] respectively, via [deref +//! coercions][deref-coercions]. //! //! Third, the standard library defines [The Rust Prelude], a small collection //! of items - mostly traits - that are imported into every module of every