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:
commit
16c27bf713
@ -31,7 +31,7 @@
|
|||||||
/// `Borrow` is very similar to, but different than, `AsRef`. See
|
/// `Borrow` is very similar to, but different than, `AsRef`. See
|
||||||
/// [the book][book] for more.
|
/// [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")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
pub trait Borrow<Borrowed: ?Sized> {
|
pub trait Borrow<Borrowed: ?Sized> {
|
||||||
/// Immutably borrows from an owned value.
|
/// Immutably borrows from an owned value.
|
||||||
|
@ -71,7 +71,7 @@
|
|||||||
///
|
///
|
||||||
/// See [the book][book] for a more detailed comparison.
|
/// 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
|
/// [`Borrow`]: ../../std/borrow/trait.Borrow.html
|
||||||
///
|
///
|
||||||
/// **Note: this trait must not fail**. If the conversion can fail, use a
|
/// **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
|
/// [`String`]: ../../std/string/struct.String.html
|
||||||
/// [`Into<U>`]: trait.Into.html
|
/// [`Into<U>`]: trait.Into.html
|
||||||
/// [`from`]: trait.From.html#tymethod.from
|
/// [`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")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
pub trait From<T>: Sized {
|
pub trait From<T>: Sized {
|
||||||
/// Performs the conversion.
|
/// Performs the conversion.
|
||||||
|
@ -54,7 +54,7 @@ macro_rules! panic {
|
|||||||
///
|
///
|
||||||
/// [`panic!`]: macro.panic.html
|
/// [`panic!`]: macro.panic.html
|
||||||
/// [`debug_assert!`]: macro.debug_assert.html
|
/// [`debug_assert!`]: macro.debug_assert.html
|
||||||
/// [testing]: ../book/testing.html
|
/// [testing]: ../book/first-edition/testing.html
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
|
@ -85,7 +85,7 @@ impl<T: ?Sized> !Send for *mut T { }
|
|||||||
/// // be made into an object
|
/// // 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")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[lang = "sized"]
|
#[lang = "sized"]
|
||||||
#[rustc_on_unimplemented = "`{Self}` does not have a constant size known at compile-time"]
|
#[rustc_on_unimplemented = "`{Self}` does not have a constant size known at compile-time"]
|
||||||
@ -493,7 +493,7 @@ fn default() -> $t<T> {
|
|||||||
/// types. We track the Rust type using a phantom type parameter on
|
/// types. We track the Rust type using a phantom type parameter on
|
||||||
/// the struct `ExternalResource` which wraps a handle.
|
/// the struct `ExternalResource` which wraps a handle.
|
||||||
///
|
///
|
||||||
/// [FFI]: ../../book/ffi.html
|
/// [FFI]: ../../book/first-edition/ffi.html
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// # #![allow(dead_code)]
|
/// # #![allow(dead_code)]
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
///
|
///
|
||||||
/// `Deref` also enables ['`Deref` coercions'][coercions].
|
/// `Deref` also enables ['`Deref` coercions'][coercions].
|
||||||
///
|
///
|
||||||
/// [coercions]: ../../book/deref-coercions.html
|
/// [coercions]: ../../book/first-edition/deref-coercions.html
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
@ -71,7 +71,7 @@ fn deref(&self) -> &T { *self }
|
|||||||
///
|
///
|
||||||
/// `DerefMut` also enables ['`Deref` coercions'][coercions].
|
/// `DerefMut` also enables ['`Deref` coercions'][coercions].
|
||||||
///
|
///
|
||||||
/// [coercions]: ../../book/deref-coercions.html
|
/// [coercions]: ../../book/first-edition/deref-coercions.html
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
//! This functionality is intended to be expanded over time as more surface
|
//! This functionality is intended to be expanded over time as more surface
|
||||||
//! area for macro authors is stabilized.
|
//! 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"]
|
#![crate_name = "proc_macro"]
|
||||||
#![stable(feature = "proc_macro_lib", since = "1.15.0")]
|
#![stable(feature = "proc_macro_lib", since = "1.15.0")]
|
||||||
|
@ -405,7 +405,7 @@ impl Quux for Foo { }
|
|||||||
Lifetime elision in implementation headers was part of the lifetime elision
|
Lifetime elision in implementation headers was part of the lifetime elision
|
||||||
RFC. It is, however, [currently unimplemented][iss15872].
|
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
|
[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
|
// This shouldn't really ever trigger since the repeated value error comes first
|
||||||
@ -666,7 +666,7 @@ fn foo<T: MyTransmutableType>(x: Vec<T>) {
|
|||||||
#![no_std]
|
#![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##"
|
E0261: r##"
|
||||||
@ -1779,7 +1779,7 @@ fn main() {
|
|||||||
```
|
```
|
||||||
|
|
||||||
To understand better how closures work in Rust, read:
|
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##"
|
E0580: r##"
|
||||||
|
@ -144,7 +144,7 @@ fn main() {
|
|||||||
If you wish to learn more about ownership in Rust, start with the chapter in the
|
If you wish to learn more about ownership in Rust, start with the chapter in the
|
||||||
Book:
|
Book:
|
||||||
|
|
||||||
https://doc.rust-lang.org/book/ownership.html
|
https://doc.rust-lang.org/book/first-edition/ownership.html
|
||||||
"##,
|
"##,
|
||||||
|
|
||||||
E0383: r##"
|
E0383: r##"
|
||||||
@ -366,8 +366,8 @@ fn main() {
|
|||||||
|
|
||||||
Please note that in rust, you can either have many immutable references, or one
|
Please note that in rust, you can either have many immutable references, or one
|
||||||
mutable reference. Take a look at
|
mutable reference. Take a look at
|
||||||
https://doc.rust-lang.org/stable/book/references-and-borrowing.html for more
|
https://doc.rust-lang.org/book/first-edition/references-and-borrowing.html
|
||||||
information. Example:
|
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
|
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##"
|
E0503: r##"
|
||||||
@ -589,7 +589,7 @@ fn main() {
|
|||||||
```
|
```
|
||||||
|
|
||||||
You can find more information about borrowing in the rust-book:
|
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##"
|
E0504: r##"
|
||||||
@ -773,7 +773,7 @@ fn main() {
|
|||||||
```
|
```
|
||||||
|
|
||||||
You can find more information about borrowing in the rust-book:
|
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##"
|
E0506: r##"
|
||||||
@ -972,7 +972,7 @@ fn main() {
|
|||||||
```
|
```
|
||||||
|
|
||||||
You can find more information about borrowing in the rust-book:
|
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##"
|
E0508: r##"
|
||||||
|
@ -44,7 +44,8 @@
|
|||||||
extern {}
|
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##"
|
E0458: r##"
|
||||||
|
@ -47,8 +47,8 @@
|
|||||||
//! #![plugin(myplugin)]
|
//! #![plugin(myplugin)]
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! See the [Plugins Chapter](../../book/compiler-plugins.html) of the book
|
//! See the [`plugin` feature](../../unstable-book/language-features/plugin.html) of
|
||||||
//! for more examples.
|
//! the Unstable Book for more examples.
|
||||||
|
|
||||||
#![crate_name = "rustc_plugin"]
|
#![crate_name = "rustc_plugin"]
|
||||||
#![crate_type = "dylib"]
|
#![crate_type = "dylib"]
|
||||||
|
@ -1642,7 +1642,7 @@ fn f<T>() {}
|
|||||||
|
|
||||||
It is not possible to declare type parameters on a function that has the `start`
|
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
|
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
|
```ignore
|
||||||
fn(isize, *const *const u8) -> isize;
|
fn(isize, *const *const u8) -> isize;
|
||||||
@ -3186,7 +3186,7 @@ impl Baz for Bar { } // Note: This is OK
|
|||||||
E0374: r##"
|
E0374: r##"
|
||||||
A struct without a field containing an unsized type cannot implement
|
A struct without a field containing an unsized type cannot implement
|
||||||
`CoerceUnsized`. An
|
`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
|
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.
|
compile time. Any struct containing an unsized type is also unsized.
|
||||||
|
|
||||||
@ -3245,9 +3245,9 @@ impl<T, U> CoerceUnsized<Bar<U>> for Bar<T>
|
|||||||
`CoerceUnsized`. This only occurs when you are trying to coerce one of the
|
`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
|
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
|
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)
|
takes. An [unsized type] is any type that the compiler doesn't know the length
|
||||||
is any type that the compiler doesn't know the length or alignment of at
|
or alignment of at compile time. Any struct containing an unsized type is also
|
||||||
compile time. Any struct containing an unsized type is also unsized.
|
unsized.
|
||||||
|
|
||||||
Example of erroneous code:
|
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##"
|
E0376: r##"
|
||||||
@ -3300,7 +3301,7 @@ fn coerce_foo<T: CoerceUnsized<U>, U>(t: T) -> Foo<U> {
|
|||||||
already able to be coerced without an implementation of `CoerceUnsized`
|
already able to be coerced without an implementation of `CoerceUnsized`
|
||||||
whereas a struct containing an unsized type needs to know the unsized type
|
whereas a struct containing an unsized type needs to know the unsized type
|
||||||
field it's containing is able to be coerced. An
|
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
|
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.
|
compile time. Any struct containing an unsized type is also unsized.
|
||||||
|
|
||||||
|
@ -263,7 +263,7 @@
|
|||||||
//! [`println!`]: ../macro.println.html
|
//! [`println!`]: ../macro.println.html
|
||||||
//! [`Lines`]: struct.Lines.html
|
//! [`Lines`]: struct.Lines.html
|
||||||
//! [`io::Result`]: type.Result.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
|
//! [`Read::read`]: trait.Read.html#tymethod.read
|
||||||
|
|
||||||
#![stable(feature = "rust1", since = "1.0.0")]
|
#![stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
@ -486,7 +486,7 @@ macro_rules! module_path { () => ({ /* compiler built-in */ }) }
|
|||||||
/// leads to less duplicated code.
|
/// leads to less duplicated code.
|
||||||
///
|
///
|
||||||
/// The syntax given to this macro is the same syntax as [the `cfg`
|
/// 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
|
/// # Examples
|
||||||
///
|
///
|
||||||
|
@ -136,10 +136,10 @@
|
|||||||
//! [`std::string`]: ../string/index.html
|
//! [`std::string`]: ../string/index.html
|
||||||
//! [`std::vec`]: ../vec/index.html
|
//! [`std::vec`]: ../vec/index.html
|
||||||
//! [`to_owned`]: ../borrow/trait.ToOwned.html#tymethod.to_owned
|
//! [`to_owned`]: ../borrow/trait.ToOwned.html#tymethod.to_owned
|
||||||
//! [book-closures]: ../../book/closures.html
|
//! [book-closures]: ../../book/first-edition/closures.html
|
||||||
//! [book-dtor]: ../../book/drop.html
|
//! [book-dtor]: ../../book/first-edition/drop.html
|
||||||
//! [book-enums]: ../../book/enums.html
|
//! [book-enums]: ../../book/first-edition/enums.html
|
||||||
//! [book-iter]: ../../book/iterators.html
|
//! [book-iter]: ../../book/first-edition/iterators.html
|
||||||
|
|
||||||
#![stable(feature = "rust1", since = "1.0.0")]
|
#![stable(feature = "rust1", since = "1.0.0")]
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
//! benchmarks themselves) should be done via the `#[test]` and
|
//! benchmarks themselves) should be done via the `#[test]` and
|
||||||
//! `#[bench]` attributes.
|
//! `#[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
|
// Currently, not much of this is meant for users. It is intended to
|
||||||
// support the simplest interface possible for representing and
|
// support the simplest interface possible for representing and
|
||||||
|
Loading…
Reference in New Issue
Block a user