Skip to content

Commit e7f8e63

Browse files
committed
Convert old doc links to current edition
Use footnote style to bypass the tidy check
1 parent 6bba352 commit e7f8e63

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
@@ -113,9 +113,6 @@ pub const fn identity<T>(x: T) -> T { x }
113113
/// - Use `Borrow` when the goal is related to writing code that is agnostic to
114114
/// the type of borrow and whether it is a reference or value
115115
///
116-
/// See [the book][book] for a more detailed comparison.
117-
///
118-
/// [book]: ../../book/first-edition/borrow-and-asref.html
119116
/// [`Borrow`]: ../../std/borrow/trait.Borrow.html
120117
///
121118
/// **Note: this trait must not fail**. If the conversion can fail, use a
@@ -348,7 +345,7 @@ pub trait Into<T>: Sized {
348345
/// [`String`]: ../../std/string/struct.String.html
349346
/// [`Into<U>`]: trait.Into.html
350347
/// [`from`]: trait.From.html#tymethod.from
351-
/// [book]: ../../book/first-edition/error-handling.html
348+
/// [book]: ../../book/ch09-00-error-handling.html
352349
#[stable(feature = "rust1", since = "1.0.0")]
353350
pub trait From<T>: Sized {
354351
/// 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
@@ -298,7 +298,7 @@ pub const fn size_of<T>() -> usize {
298298
/// then `size_of_val` can be used to get the dynamically-known size.
299299
///
300300
/// [slice]: ../../std/primitive.slice.html
301-
/// [trait object]: ../../book/first-edition/trait-objects.html
301+
/// [trait object]: ../../book/ch17-02-trait-objects.html
302302
///
303303
/// # Examples
304304
///

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.
@@ -406,7 +407,7 @@ fn baz<'a>(x: &'a str, y: &str) -> &str { }
406407
Lifetime elision in implementation headers was part of the lifetime elision
407408
RFC. It is, however, [currently unimplemented][iss15872].
408409
409-
[book-le]: https://doc.rust-lang.org/nightly/book/first-edition/lifetimes.html#lifetime-elision
410+
[book-le]: https://doc.rust-lang.org/book/ch10-03-lifetime-syntax.html#lifetime-elision
410411
[iss15872]: https://github.com/rust-lang/rust/issues/15872
411412
"##,
412413

@@ -642,7 +643,9 @@ attributes:
642643
#![no_std]
643644
```
644645
645-
See also https://doc.rust-lang.org/book/first-edition/no-stdlib.html
646+
See also the [unstable book][1].
647+
648+
[1]: https://doc.rust-lang.org/unstable-book/language-features/lang-items.html#writing-an-executable-without-stdlib
646649
"##,
647650

648651
E0214: r##"
@@ -1680,7 +1683,7 @@ fn main() {
16801683
```
16811684
16821685
To understand better how closures work in Rust, read:
1683-
https://doc.rust-lang.org/book/first-edition/closures.html
1686+
https://doc.rust-lang.org/book/ch13-01-closures.html
16841687
"##,
16851688

16861689
E0580: r##"

src/librustc_metadata/diagnostics.rs

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

4141
E0458: r##"

0 commit comments

Comments
 (0)