Skip to content

Commit 16c27bf

Browse files
committed
Auto merge of #42623 - VBChunguk:fix-older-urls, r=steveklabnik
Update older URLs pointing to the first edition of the Book Fixes #42589.
2 parents 119066f + 3cb7825 commit 16c27bf

File tree

15 files changed

+38
-36
lines changed

15 files changed

+38
-36
lines changed

src/libcore/borrow.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
/// `Borrow` is very similar to, but different than, `AsRef`. See
3232
/// [the book][book] for more.
3333
///
34-
/// [book]: ../../book/borrow-and-asref.html
34+
/// [book]: ../../book/first-edition/borrow-and-asref.html
3535
#[stable(feature = "rust1", since = "1.0.0")]
3636
pub trait Borrow<Borrowed: ?Sized> {
3737
/// Immutably borrows from an owned value.

src/libcore/convert.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ use str::FromStr;
7171
///
7272
/// See [the book][book] for a more detailed comparison.
7373
///
74-
/// [book]: ../../book/borrow-and-asref.html
74+
/// [book]: ../../book/first-edition/borrow-and-asref.html
7575
/// [`Borrow`]: ../../std/borrow/trait.Borrow.html
7676
///
7777
/// **Note: this trait must not fail**. If the conversion can fail, use a
@@ -305,7 +305,7 @@ pub trait Into<T>: Sized {
305305
/// [`String`]: ../../std/string/struct.String.html
306306
/// [`Into<U>`]: trait.Into.html
307307
/// [`from`]: trait.From.html#tymethod.from
308-
/// [book]: ../../book/error-handling.html
308+
/// [book]: ../../book/first-edition/error-handling.html
309309
#[stable(feature = "rust1", since = "1.0.0")]
310310
pub trait From<T>: Sized {
311311
/// Performs the conversion.

src/libcore/macros.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ macro_rules! panic {
5454
///
5555
/// [`panic!`]: macro.panic.html
5656
/// [`debug_assert!`]: macro.debug_assert.html
57-
/// [testing]: ../book/testing.html
57+
/// [testing]: ../book/first-edition/testing.html
5858
///
5959
/// # Examples
6060
///

src/libcore/marker.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ impl<T: ?Sized> !Send for *mut T { }
8585
/// // be made into an object
8686
/// ```
8787
///
88-
/// [trait object]: ../../book/trait-objects.html
88+
/// [trait object]: ../../book/first-edition/trait-objects.html
8989
#[stable(feature = "rust1", since = "1.0.0")]
9090
#[lang = "sized"]
9191
#[rustc_on_unimplemented = "`{Self}` does not have a constant size known at compile-time"]
@@ -493,7 +493,7 @@ macro_rules! impls{
493493
/// types. We track the Rust type using a phantom type parameter on
494494
/// the struct `ExternalResource` which wraps a handle.
495495
///
496-
/// [FFI]: ../../book/ffi.html
496+
/// [FFI]: ../../book/first-edition/ffi.html
497497
///
498498
/// ```
499499
/// # #![allow(dead_code)]

src/libcore/ops/deref.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
///
1414
/// `Deref` also enables ['`Deref` coercions'][coercions].
1515
///
16-
/// [coercions]: ../../book/deref-coercions.html
16+
/// [coercions]: ../../book/first-edition/deref-coercions.html
1717
///
1818
/// # Examples
1919
///
@@ -71,7 +71,7 @@ impl<'a, T: ?Sized> Deref for &'a mut T {
7171
///
7272
/// `DerefMut` also enables ['`Deref` coercions'][coercions].
7373
///
74-
/// [coercions]: ../../book/deref-coercions.html
74+
/// [coercions]: ../../book/first-edition/deref-coercions.html
7575
///
7676
/// # Examples
7777
///

src/libproc_macro/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
//! This functionality is intended to be expanded over time as more surface
2222
//! area for macro authors is stabilized.
2323
//!
24-
//! See [the book](../book/procedural-macros.html) for more.
24+
//! See [the book](../book/first-edition/procedural-macros.html) for more.
2525
2626
#![crate_name = "proc_macro"]
2727
#![stable(feature = "proc_macro_lib", since = "1.15.0")]

src/librustc/diagnostics.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ impl Quux for Foo { }
405405
Lifetime elision in implementation headers was part of the lifetime elision
406406
RFC. It is, however, [currently unimplemented][iss15872].
407407
408-
[book-le]: https://doc.rust-lang.org/nightly/book/lifetimes.html#lifetime-elision
408+
[book-le]: https://doc.rust-lang.org/nightly/book/first-edition/lifetimes.html#lifetime-elision
409409
[iss15872]: https://github.com/rust-lang/rust/issues/15872
410410
"##,
411411

@@ -501,7 +501,7 @@ fn main() {
501501
}
502502
```
503503
504-
See also https://doc.rust-lang.org/book/unsafe.html
504+
See also https://doc.rust-lang.org/book/first-edition/unsafe.html
505505
"##,
506506

507507
// This shouldn't really ever trigger since the repeated value error comes first
@@ -666,7 +666,7 @@ attributes:
666666
#![no_std]
667667
```
668668
669-
See also https://doc.rust-lang.org/book/no-stdlib.html
669+
See also https://doc.rust-lang.org/book/first-edition/no-stdlib.html
670670
"##,
671671

672672
E0261: r##"
@@ -1779,7 +1779,7 @@ fn main() {
17791779
```
17801780
17811781
To understand better how closures work in Rust, read:
1782-
https://doc.rust-lang.org/book/closures.html
1782+
https://doc.rust-lang.org/book/first-edition/closures.html
17831783
"##,
17841784

17851785
E0580: r##"

src/librustc_borrowck/diagnostics.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ that at most one writer or multiple readers can access the data at any one time.
144144
If you wish to learn more about ownership in Rust, start with the chapter in the
145145
Book:
146146
147-
https://doc.rust-lang.org/book/ownership.html
147+
https://doc.rust-lang.org/book/first-edition/ownership.html
148148
"##,
149149

150150
E0383: r##"
@@ -366,8 +366,8 @@ let mut a = &mut i;
366366
367367
Please note that in rust, you can either have many immutable references, or one
368368
mutable reference. Take a look at
369-
https://doc.rust-lang.org/stable/book/references-and-borrowing.html for more
370-
information. Example:
369+
https://doc.rust-lang.org/book/first-edition/references-and-borrowing.html
370+
for more information. Example:
371371
372372
373373
```
@@ -533,7 +533,7 @@ fn foo(a: &mut i32) {
533533
```
534534
535535
For more information on the rust ownership system, take a look at
536-
https://doc.rust-lang.org/stable/book/references-and-borrowing.html.
536+
https://doc.rust-lang.org/book/first-edition/references-and-borrowing.html.
537537
"##,
538538

539539
E0503: r##"
@@ -589,7 +589,7 @@ fn main() {
589589
```
590590
591591
You can find more information about borrowing in the rust-book:
592-
http://doc.rust-lang.org/stable/book/references-and-borrowing.html
592+
http://doc.rust-lang.org/book/first-edition/references-and-borrowing.html
593593
"##,
594594

595595
E0504: r##"
@@ -773,7 +773,7 @@ fn main() {
773773
```
774774
775775
You can find more information about borrowing in the rust-book:
776-
http://doc.rust-lang.org/stable/book/references-and-borrowing.html
776+
http://doc.rust-lang.org/book/first-edition/references-and-borrowing.html
777777
"##,
778778

779779
E0506: r##"
@@ -972,7 +972,7 @@ fn main() {
972972
```
973973
974974
You can find more information about borrowing in the rust-book:
975-
http://doc.rust-lang.org/stable/book/references-and-borrowing.html
975+
http://doc.rust-lang.org/book/first-edition/references-and-borrowing.html
976976
"##,
977977

978978
E0508: r##"

src/librustc_metadata/diagnostics.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ To solve this error you can use conditional compilation:
4444
extern {}
4545
```
4646
47-
See more: https://doc.rust-lang.org/book/conditional-compilation.html
47+
See more:
48+
https://doc.rust-lang.org/book/first-edition/conditional-compilation.html
4849
"##,
4950

5051
E0458: r##"

src/librustc_plugin/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
//! #![plugin(myplugin)]
4848
//! ```
4949
//!
50-
//! See the [Plugins Chapter](../../book/compiler-plugins.html) of the book
51-
//! for more examples.
50+
//! See the [`plugin` feature](../../unstable-book/language-features/plugin.html) of
51+
//! the Unstable Book for more examples.
5252
5353
#![crate_name = "rustc_plugin"]
5454
#![crate_type = "dylib"]

src/librustc_typeck/diagnostics.rs

+7-6
Original file line numberDiff line numberDiff line change
@@ -1642,7 +1642,7 @@ fn f<T>() {}
16421642
16431643
It is not possible to declare type parameters on a function that has the `start`
16441644
attribute. Such a function must have the following type signature (for more
1645-
information: http://doc.rust-lang.org/stable/book/no-stdlib.html):
1645+
information: http://doc.rust-lang.org/stable/book/first-edition/no-stdlib.html):
16461646
16471647
```ignore
16481648
fn(isize, *const *const u8) -> isize;
@@ -3186,7 +3186,7 @@ impl Baz for Bar { } // Note: This is OK
31863186
E0374: r##"
31873187
A struct without a field containing an unsized type cannot implement
31883188
`CoerceUnsized`. An
3189-
[unsized type](https://doc.rust-lang.org/book/unsized-types.html)
3189+
[unsized type](https://doc.rust-lang.org/book/first-edition/unsized-types.html)
31903190
is any type that the compiler doesn't know the length or alignment of at
31913191
compile time. Any struct containing an unsized type is also unsized.
31923192
@@ -3245,9 +3245,9 @@ A struct with more than one field containing an unsized type cannot implement
32453245
`CoerceUnsized`. This only occurs when you are trying to coerce one of the
32463246
types in your struct to another type in the struct. In this case we try to
32473247
impl `CoerceUnsized` from `T` to `U` which are both types that the struct
3248-
takes. An [unsized type](https://doc.rust-lang.org/book/unsized-types.html)
3249-
is any type that the compiler doesn't know the length or alignment of at
3250-
compile time. Any struct containing an unsized type is also unsized.
3248+
takes. An [unsized type] is any type that the compiler doesn't know the length
3249+
or alignment of at compile time. Any struct containing an unsized type is also
3250+
unsized.
32513251
32523252
Example of erroneous code:
32533253
@@ -3292,6 +3292,7 @@ fn coerce_foo<T: CoerceUnsized<U>, U>(t: T) -> Foo<U> {
32923292
}
32933293
```
32943294
3295+
[unsized type]: https://doc.rust-lang.org/book/first-edition/unsized-types.html
32953296
"##,
32963297

32973298
E0376: r##"
@@ -3300,7 +3301,7 @@ The type you are trying to impl `CoerceUnsized` for is not a struct.
33003301
already able to be coerced without an implementation of `CoerceUnsized`
33013302
whereas a struct containing an unsized type needs to know the unsized type
33023303
field it's containing is able to be coerced. An
3303-
[unsized type](https://doc.rust-lang.org/book/unsized-types.html)
3304+
[unsized type](https://doc.rust-lang.org/book/first-edition/unsized-types.html)
33043305
is any type that the compiler doesn't know the length or alignment of at
33053306
compile time. Any struct containing an unsized type is also unsized.
33063307

src/libstd/io/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@
263263
//! [`println!`]: ../macro.println.html
264264
//! [`Lines`]: struct.Lines.html
265265
//! [`io::Result`]: type.Result.html
266-
//! [`?` operator]: ../../book/syntax-index.html
266+
//! [`?` operator]: ../../book/first-edition/syntax-index.html
267267
//! [`Read::read`]: trait.Read.html#tymethod.read
268268
269269
#![stable(feature = "rust1", since = "1.0.0")]

src/libstd/macros.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ pub mod builtin {
486486
/// leads to less duplicated code.
487487
///
488488
/// The syntax given to this macro is the same syntax as [the `cfg`
489-
/// attribute](../book/conditional-compilation.html).
489+
/// attribute](../book/first-edition/conditional-compilation.html).
490490
///
491491
/// # Examples
492492
///

src/libstd/prelude/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,10 @@
136136
//! [`std::string`]: ../string/index.html
137137
//! [`std::vec`]: ../vec/index.html
138138
//! [`to_owned`]: ../borrow/trait.ToOwned.html#tymethod.to_owned
139-
//! [book-closures]: ../../book/closures.html
140-
//! [book-dtor]: ../../book/drop.html
141-
//! [book-enums]: ../../book/enums.html
142-
//! [book-iter]: ../../book/iterators.html
139+
//! [book-closures]: ../../book/first-edition/closures.html
140+
//! [book-dtor]: ../../book/first-edition/drop.html
141+
//! [book-enums]: ../../book/first-edition/enums.html
142+
//! [book-iter]: ../../book/first-edition/iterators.html
143143
144144
#![stable(feature = "rust1", since = "1.0.0")]
145145

src/libtest/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
//! benchmarks themselves) should be done via the `#[test]` and
1717
//! `#[bench]` attributes.
1818
//!
19-
//! See the [Testing Chapter](../book/testing.html) of the book for more details.
19+
//! See the [Testing Chapter](../book/first-edition/testing.html) of the book for more details.
2020
2121
// Currently, not much of this is meant for users. It is intended to
2222
// support the simplest interface possible for representing and

0 commit comments

Comments
 (0)