Skip to content

Commit aa896f3

Browse files
authored
Rollup merge of #57856 - lzutao:fix-old-first-edition, r=steveklabnik
Convert old first edition links to current edition one r? @steveklabnik
2 parents 93ecae6 + e7f8e63 commit aa896f3

File tree

15 files changed

+65
-50
lines changed

15 files changed

+65
-50
lines changed

src/doc/guide-error-handling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
% Error Handling in Rust
22

33
This content has moved into
4-
[the Rust Programming Language book](book/error-handling.html).
4+
[the Rust Programming Language book](book/ch09-00-error-handling.html).

src/doc/guide-ownership.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
% The (old) Rust Ownership Guide
22

33
This content has moved into
4-
[the Rust Programming Language book](book/ownership.html).
4+
[the Rust Programming Language book](book/ch04-00-understanding-ownership.html).

src/doc/guide-pointers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
This content has been removed, with no direct replacement. Rust only
44
has two built-in pointer types now,
5-
[references](book/references-and-borrowing.html) and [raw
5+
[references](book/ch04-02-references-and-borrowing.html) and [raw
66
pointers](book/raw-pointers.html). Older Rusts had many more pointer
77
types, they’re gone now.

src/doc/guide-testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
% The (old) Rust Testing Guide
22

33
This content has moved into
4-
[the Rust Programming Language book](book/testing.html).
4+
[the Rust Programming Language book](book/ch11-00-testing.html).

src/libcore/convert.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,6 @@ pub const fn identity<T>(x: T) -> T { x }
116116
/// - Use `Borrow` when the goal is related to writing code that is agnostic to
117117
/// the type of borrow and whether it is a reference or value
118118
///
119-
/// See [the book][book] for a more detailed comparison.
120-
///
121-
/// [book]: ../../book/first-edition/borrow-and-asref.html
122119
/// [`Borrow`]: ../../std/borrow/trait.Borrow.html
123120
///
124121
/// **Note: this trait must not fail**. If the conversion can fail, use a
@@ -351,7 +348,7 @@ pub trait Into<T>: Sized {
351348
/// [`String`]: ../../std/string/struct.String.html
352349
/// [`Into<U>`]: trait.Into.html
353350
/// [`from`]: trait.From.html#tymethod.from
354-
/// [book]: ../../book/first-edition/error-handling.html
351+
/// [book]: ../../book/ch09-00-error-handling.html
355352
#[stable(feature = "rust1", since = "1.0.0")]
356353
pub trait From<T>: Sized {
357354
/// Performs the conversion.

src/libcore/marker.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ impl<T: ?Sized> !Send for *mut T { }
7878
/// // be made into an object
7979
/// ```
8080
///
81-
/// [trait object]: ../../book/first-edition/trait-objects.html
81+
/// [trait object]: ../../book/ch17-02-trait-objects.html
8282
#[stable(feature = "rust1", since = "1.0.0")]
8383
#[lang = "sized"]
8484
#[rustc_on_unimplemented(
@@ -518,7 +518,7 @@ macro_rules! impls{
518518
/// types. We track the Rust type using a phantom type parameter on
519519
/// the struct `ExternalResource` which wraps a handle.
520520
///
521-
/// [FFI]: ../../book/first-edition/ffi.html
521+
/// [FFI]: ../../book/ch19-01-unsafe-rust.html#using-extern-functions-to-call-external-code
522522
///
523523
/// ```
524524
/// # #![allow(dead_code)]

src/libcore/mem.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ pub const fn size_of<T>() -> usize {
299299
/// then `size_of_val` can be used to get the dynamically-known size.
300300
///
301301
/// [slice]: ../../std/primitive.slice.html
302-
/// [trait object]: ../../book/first-edition/trait-objects.html
302+
/// [trait object]: ../../book/ch17-02-trait-objects.html
303303
///
304304
/// # Examples
305305
///

src/libproc_macro/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
//! function-like macros `#[proc_macro]`, macro attributes `#[proc_macro_attribute]` and
66
//! custom derive attributes`#[proc_macro_derive]`.
77
//!
8-
//! See [the book](../book/first-edition/procedural-macros.html) for more.
8+
//! See [the book] for more.
9+
//!
10+
//! [the book]: ../book/ch19-06-macros.html#procedural-macros-for-generating-code-from-attributes
911
1012
#![stable(feature = "proc_macro_lib", since = "1.15.0")]
1113
#![deny(missing_docs)]

src/librustc/diagnostics.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// ignore-tidy-linelength
12
#![allow(non_snake_case)]
23

34
// Error messages for EXXXX errors.
@@ -410,7 +411,7 @@ fn baz<'a>(x: &'a str, y: &str) -> &str { }
410411
Lifetime elision in implementation headers was part of the lifetime elision
411412
RFC. It is, however, [currently unimplemented][iss15872].
412413
413-
[book-le]: https://doc.rust-lang.org/nightly/book/first-edition/lifetimes.html#lifetime-elision
414+
[book-le]: https://doc.rust-lang.org/book/ch10-03-lifetime-syntax.html#lifetime-elision
414415
[iss15872]: https://github.com/rust-lang/rust/issues/15872
415416
"##,
416417

@@ -646,7 +647,9 @@ attributes:
646647
#![no_std]
647648
```
648649
649-
See also https://doc.rust-lang.org/book/first-edition/no-stdlib.html
650+
See also the [unstable book][1].
651+
652+
[1]: https://doc.rust-lang.org/unstable-book/language-features/lang-items.html#writing-an-executable-without-stdlib
650653
"##,
651654

652655
E0214: r##"
@@ -1713,7 +1716,7 @@ fn main() {
17131716
```
17141717
17151718
To understand better how closures work in Rust, read:
1716-
https://doc.rust-lang.org/book/first-edition/closures.html
1719+
https://doc.rust-lang.org/book/ch13-01-closures.html
17171720
"##,
17181721

17191722
E0580: r##"

src/librustc_metadata/diagnostics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ extern {}
3737
```
3838
3939
See more:
40-
https://doc.rust-lang.org/book/first-edition/conditional-compilation.html
40+
https://doc.rust-lang.org/reference/attributes.html#conditional-compilation
4141
"##,
4242

4343
E0458: r##"

0 commit comments

Comments
 (0)