Skip to content

Commit

Permalink
Auto merge of #42623 - VBChunguk:fix-older-urls, r=steveklabnik
Browse files Browse the repository at this point in the history
Update older URLs pointing to the first edition of the Book

Fixes #42589.
  • Loading branch information
bors committed Jun 15, 2017
2 parents 119066f + 3cb7825 commit 16c27bf
Show file tree
Hide file tree
Showing 15 changed files with 38 additions and 36 deletions.
2 changes: 1 addition & 1 deletion src/libcore/borrow.rs
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/libcore/convert.rs
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/macros.rs
Expand Up @@ -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
///
Expand Down
4 changes: 2 additions & 2 deletions src/libcore/marker.rs
Expand Up @@ -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"]
Expand Down Expand Up @@ -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)]
Expand Down
4 changes: 2 additions & 2 deletions src/libcore/ops/deref.rs
Expand Up @@ -13,7 +13,7 @@
///
/// `Deref` also enables ['`Deref` coercions'][coercions].
///
/// [coercions]: ../../book/deref-coercions.html
/// [coercions]: ../../book/first-edition/deref-coercions.html
///
/// # Examples
///
Expand Down Expand Up @@ -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
///
Expand Down
2 changes: 1 addition & 1 deletion src/libproc_macro/lib.rs
Expand Up @@ -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")]
Expand Down
8 changes: 4 additions & 4 deletions src/librustc/diagnostics.rs
Expand Up @@ -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
"##,

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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##"
Expand Down Expand Up @@ -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##"
Expand Down
14 changes: 7 additions & 7 deletions src/librustc_borrowck/diagnostics.rs
Expand Up @@ -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##"
Expand Down Expand Up @@ -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:
```
Expand Down Expand Up @@ -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##"
Expand Down Expand Up @@ -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##"
Expand Down Expand Up @@ -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##"
Expand Down Expand Up @@ -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##"
Expand Down
3 changes: 2 additions & 1 deletion src/librustc_metadata/diagnostics.rs
Expand Up @@ -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##"
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_plugin/lib.rs
Expand Up @@ -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"]
Expand Down
13 changes: 7 additions & 6 deletions src/librustc_typeck/diagnostics.rs
Expand Up @@ -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;
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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##"
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/io/mod.rs
Expand Up @@ -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")]
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/macros.rs
Expand Up @@ -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
///
Expand Down
8 changes: 4 additions & 4 deletions src/libstd/prelude/mod.rs
Expand Up @@ -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")]

Expand Down
2 changes: 1 addition & 1 deletion src/libtest/lib.rs
Expand Up @@ -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
Expand Down

0 comments on commit 16c27bf

Please sign in to comment.