Auto merge of #42623 - VBChunguk:fix-older-urls, r=steveklabnik

Update older URLs pointing to the first edition of the Book

Fixes #42589.
This commit is contained in:
bors 2017-06-15 09:52:11 +00:00
commit 16c27bf713
15 changed files with 38 additions and 36 deletions

View File

@ -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<Borrowed: ?Sized> {
/// Immutably borrows from an owned value.

View File

@ -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<T>: Sized {
/// [`String`]: ../../std/string/struct.String.html
/// [`Into<U>`]: 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<T>: Sized {
/// Performs the conversion.

View File

@ -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
///

View File

@ -85,7 +85,7 @@ impl<T: ?Sized> !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)]

View File

@ -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
///

View File

@ -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")]

View File

@ -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##"

View File

@ -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##"

View File

@ -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##"

View File

@ -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"]

View File

@ -1642,7 +1642,7 @@ fn f<T>() {}
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<T: CoerceUnsized<U>, U>(t: T) -> Foo<U> {
}
```
[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.

View File

@ -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")]

View File

@ -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
///

View File

@ -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")]

View File

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