diff --git a/src/libcore/borrow.rs b/src/libcore/borrow.rs index 3d223465c88..61558034e63 100644 --- a/src/libcore/borrow.rs +++ b/src/libcore/borrow.rs @@ -31,7 +31,7 @@ /// `Borrow` is very similar to, but different than, `AsRef`. See /// [the book][book] for more. /// -/// [book]: ../../book/borrow-and-asref.html +/// [book]: ../../book/first-edition/borrow-and-asref.html #[stable(feature = "rust1", since = "1.0.0")] pub trait Borrow { /// Immutably borrows from an owned value. diff --git a/src/libcore/convert.rs b/src/libcore/convert.rs index 11a360ff900..6f3c3863fae 100644 --- a/src/libcore/convert.rs +++ b/src/libcore/convert.rs @@ -71,7 +71,7 @@ use str::FromStr; /// /// See [the book][book] for a more detailed comparison. /// -/// [book]: ../../book/borrow-and-asref.html +/// [book]: ../../book/first-edition/borrow-and-asref.html /// [`Borrow`]: ../../std/borrow/trait.Borrow.html /// /// **Note: this trait must not fail**. If the conversion can fail, use a @@ -305,7 +305,7 @@ pub trait Into: Sized { /// [`String`]: ../../std/string/struct.String.html /// [`Into`]: trait.Into.html /// [`from`]: trait.From.html#tymethod.from -/// [book]: ../../book/error-handling.html +/// [book]: ../../book/first-edition/error-handling.html #[stable(feature = "rust1", since = "1.0.0")] pub trait From: Sized { /// Performs the conversion. diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs index d68fad4972c..91ee064aaba 100644 --- a/src/libcore/macros.rs +++ b/src/libcore/macros.rs @@ -54,7 +54,7 @@ macro_rules! panic { /// /// [`panic!`]: macro.panic.html /// [`debug_assert!`]: macro.debug_assert.html -/// [testing]: ../book/testing.html +/// [testing]: ../book/first-edition/testing.html /// /// # Examples /// diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs index 05df84708e0..3bed425943f 100644 --- a/src/libcore/marker.rs +++ b/src/libcore/marker.rs @@ -85,7 +85,7 @@ impl !Send for *mut T { } /// // be made into an object /// ``` /// -/// [trait object]: ../../book/trait-objects.html +/// [trait object]: ../../book/first-edition/trait-objects.html #[stable(feature = "rust1", since = "1.0.0")] #[lang = "sized"] #[rustc_on_unimplemented = "`{Self}` does not have a constant size known at compile-time"] @@ -493,7 +493,7 @@ macro_rules! impls{ /// types. We track the Rust type using a phantom type parameter on /// the struct `ExternalResource` which wraps a handle. /// -/// [FFI]: ../../book/ffi.html +/// [FFI]: ../../book/first-edition/ffi.html /// /// ``` /// # #![allow(dead_code)] diff --git a/src/libcore/ops/deref.rs b/src/libcore/ops/deref.rs index 3f4dabbbc0c..18cf20ac411 100644 --- a/src/libcore/ops/deref.rs +++ b/src/libcore/ops/deref.rs @@ -13,7 +13,7 @@ /// /// `Deref` also enables ['`Deref` coercions'][coercions]. /// -/// [coercions]: ../../book/deref-coercions.html +/// [coercions]: ../../book/first-edition/deref-coercions.html /// /// # Examples /// @@ -71,7 +71,7 @@ impl<'a, T: ?Sized> Deref for &'a mut T { /// /// `DerefMut` also enables ['`Deref` coercions'][coercions]. /// -/// [coercions]: ../../book/deref-coercions.html +/// [coercions]: ../../book/first-edition/deref-coercions.html /// /// # Examples /// diff --git a/src/libproc_macro/lib.rs b/src/libproc_macro/lib.rs index 0ab0550469b..f3d0521a2af 100644 --- a/src/libproc_macro/lib.rs +++ b/src/libproc_macro/lib.rs @@ -21,7 +21,7 @@ //! This functionality is intended to be expanded over time as more surface //! area for macro authors is stabilized. //! -//! See [the book](../book/procedural-macros.html) for more. +//! See [the book](../book/first-edition/procedural-macros.html) for more. #![crate_name = "proc_macro"] #![stable(feature = "proc_macro_lib", since = "1.15.0")] diff --git a/src/librustc/diagnostics.rs b/src/librustc/diagnostics.rs index 800e678405a..28fb96aa203 100644 --- a/src/librustc/diagnostics.rs +++ b/src/librustc/diagnostics.rs @@ -405,7 +405,7 @@ impl Quux for Foo { } Lifetime elision in implementation headers was part of the lifetime elision RFC. It is, however, [currently unimplemented][iss15872]. -[book-le]: https://doc.rust-lang.org/nightly/book/lifetimes.html#lifetime-elision +[book-le]: https://doc.rust-lang.org/nightly/book/first-edition/lifetimes.html#lifetime-elision [iss15872]: https://github.com/rust-lang/rust/issues/15872 "##, @@ -501,7 +501,7 @@ fn main() { } ``` -See also https://doc.rust-lang.org/book/unsafe.html +See also https://doc.rust-lang.org/book/first-edition/unsafe.html "##, // This shouldn't really ever trigger since the repeated value error comes first @@ -666,7 +666,7 @@ attributes: #![no_std] ``` -See also https://doc.rust-lang.org/book/no-stdlib.html +See also https://doc.rust-lang.org/book/first-edition/no-stdlib.html "##, E0261: r##" @@ -1779,7 +1779,7 @@ fn main() { ``` To understand better how closures work in Rust, read: -https://doc.rust-lang.org/book/closures.html +https://doc.rust-lang.org/book/first-edition/closures.html "##, E0580: r##" diff --git a/src/librustc_borrowck/diagnostics.rs b/src/librustc_borrowck/diagnostics.rs index 2a38dcfd26e..c114c66559f 100644 --- a/src/librustc_borrowck/diagnostics.rs +++ b/src/librustc_borrowck/diagnostics.rs @@ -144,7 +144,7 @@ that at most one writer or multiple readers can access the data at any one time. If you wish to learn more about ownership in Rust, start with the chapter in the Book: -https://doc.rust-lang.org/book/ownership.html +https://doc.rust-lang.org/book/first-edition/ownership.html "##, E0383: r##" @@ -366,8 +366,8 @@ let mut a = &mut i; Please note that in rust, you can either have many immutable references, or one mutable reference. Take a look at -https://doc.rust-lang.org/stable/book/references-and-borrowing.html for more -information. Example: +https://doc.rust-lang.org/book/first-edition/references-and-borrowing.html +for more information. Example: ``` @@ -533,7 +533,7 @@ fn foo(a: &mut i32) { ``` For more information on the rust ownership system, take a look at -https://doc.rust-lang.org/stable/book/references-and-borrowing.html. +https://doc.rust-lang.org/book/first-edition/references-and-borrowing.html. "##, E0503: r##" @@ -589,7 +589,7 @@ fn main() { ``` You can find more information about borrowing in the rust-book: -http://doc.rust-lang.org/stable/book/references-and-borrowing.html +http://doc.rust-lang.org/book/first-edition/references-and-borrowing.html "##, E0504: r##" @@ -773,7 +773,7 @@ fn main() { ``` You can find more information about borrowing in the rust-book: -http://doc.rust-lang.org/stable/book/references-and-borrowing.html +http://doc.rust-lang.org/book/first-edition/references-and-borrowing.html "##, E0506: r##" @@ -972,7 +972,7 @@ fn main() { ``` You can find more information about borrowing in the rust-book: -http://doc.rust-lang.org/stable/book/references-and-borrowing.html +http://doc.rust-lang.org/book/first-edition/references-and-borrowing.html "##, E0508: r##" diff --git a/src/librustc_metadata/diagnostics.rs b/src/librustc_metadata/diagnostics.rs index fbdc4695cf8..9a174e05eab 100644 --- a/src/librustc_metadata/diagnostics.rs +++ b/src/librustc_metadata/diagnostics.rs @@ -44,7 +44,8 @@ To solve this error you can use conditional compilation: extern {} ``` -See more: https://doc.rust-lang.org/book/conditional-compilation.html +See more: +https://doc.rust-lang.org/book/first-edition/conditional-compilation.html "##, E0458: r##" diff --git a/src/librustc_plugin/lib.rs b/src/librustc_plugin/lib.rs index 16ab593e47a..0df82be3adc 100644 --- a/src/librustc_plugin/lib.rs +++ b/src/librustc_plugin/lib.rs @@ -47,8 +47,8 @@ //! #![plugin(myplugin)] //! ``` //! -//! See the [Plugins Chapter](../../book/compiler-plugins.html) of the book -//! for more examples. +//! See the [`plugin` feature](../../unstable-book/language-features/plugin.html) of +//! the Unstable Book for more examples. #![crate_name = "rustc_plugin"] #![crate_type = "dylib"] diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs index 76c664d7997..9cdde0797a0 100644 --- a/src/librustc_typeck/diagnostics.rs +++ b/src/librustc_typeck/diagnostics.rs @@ -1642,7 +1642,7 @@ fn f() {} It is not possible to declare type parameters on a function that has the `start` attribute. Such a function must have the following type signature (for more -information: http://doc.rust-lang.org/stable/book/no-stdlib.html): +information: http://doc.rust-lang.org/stable/book/first-edition/no-stdlib.html): ```ignore fn(isize, *const *const u8) -> isize; @@ -3186,7 +3186,7 @@ impl Baz for Bar { } // Note: This is OK E0374: r##" A struct without a field containing an unsized type cannot implement `CoerceUnsized`. An -[unsized type](https://doc.rust-lang.org/book/unsized-types.html) +[unsized type](https://doc.rust-lang.org/book/first-edition/unsized-types.html) is any type that the compiler doesn't know the length or alignment of at compile time. Any struct containing an unsized type is also unsized. @@ -3245,9 +3245,9 @@ A struct with more than one field containing an unsized type cannot implement `CoerceUnsized`. This only occurs when you are trying to coerce one of the types in your struct to another type in the struct. In this case we try to impl `CoerceUnsized` from `T` to `U` which are both types that the struct -takes. An [unsized type](https://doc.rust-lang.org/book/unsized-types.html) -is any type that the compiler doesn't know the length or alignment of at -compile time. Any struct containing an unsized type is also unsized. +takes. An [unsized type] is any type that the compiler doesn't know the length +or alignment of at compile time. Any struct containing an unsized type is also +unsized. Example of erroneous code: @@ -3292,6 +3292,7 @@ fn coerce_foo, U>(t: T) -> Foo { } ``` +[unsized type]: https://doc.rust-lang.org/book/first-edition/unsized-types.html "##, E0376: r##" @@ -3300,7 +3301,7 @@ The type you are trying to impl `CoerceUnsized` for is not a struct. already able to be coerced without an implementation of `CoerceUnsized` whereas a struct containing an unsized type needs to know the unsized type field it's containing is able to be coerced. An -[unsized type](https://doc.rust-lang.org/book/unsized-types.html) +[unsized type](https://doc.rust-lang.org/book/first-edition/unsized-types.html) is any type that the compiler doesn't know the length or alignment of at compile time. Any struct containing an unsized type is also unsized. diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index c872a8e5261..061e807dace 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -263,7 +263,7 @@ //! [`println!`]: ../macro.println.html //! [`Lines`]: struct.Lines.html //! [`io::Result`]: type.Result.html -//! [`?` operator]: ../../book/syntax-index.html +//! [`?` operator]: ../../book/first-edition/syntax-index.html //! [`Read::read`]: trait.Read.html#tymethod.read #![stable(feature = "rust1", since = "1.0.0")] diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index df3fce0da76..496c014f70e 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -486,7 +486,7 @@ pub mod builtin { /// leads to less duplicated code. /// /// The syntax given to this macro is the same syntax as [the `cfg` - /// attribute](../book/conditional-compilation.html). + /// attribute](../book/first-edition/conditional-compilation.html). /// /// # Examples /// diff --git a/src/libstd/prelude/mod.rs b/src/libstd/prelude/mod.rs index 86e661d7948..195662637f0 100644 --- a/src/libstd/prelude/mod.rs +++ b/src/libstd/prelude/mod.rs @@ -136,10 +136,10 @@ //! [`std::string`]: ../string/index.html //! [`std::vec`]: ../vec/index.html //! [`to_owned`]: ../borrow/trait.ToOwned.html#tymethod.to_owned -//! [book-closures]: ../../book/closures.html -//! [book-dtor]: ../../book/drop.html -//! [book-enums]: ../../book/enums.html -//! [book-iter]: ../../book/iterators.html +//! [book-closures]: ../../book/first-edition/closures.html +//! [book-dtor]: ../../book/first-edition/drop.html +//! [book-enums]: ../../book/first-edition/enums.html +//! [book-iter]: ../../book/first-edition/iterators.html #![stable(feature = "rust1", since = "1.0.0")] diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index ef048ac8ca3..74212625eea 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -16,7 +16,7 @@ //! benchmarks themselves) should be done via the `#[test]` and //! `#[bench]` attributes. //! -//! See the [Testing Chapter](../book/testing.html) of the book for more details. +//! See the [Testing Chapter](../book/first-edition/testing.html) of the book for more details. // Currently, not much of this is meant for users. It is intended to // support the simplest interface possible for representing and