Skip to content

Commit d2c91a1

Browse files
committed
Fix broken links to second edition TRPL.
Fixes #57104.
1 parent 36500de commit d2c91a1

File tree

73 files changed

+149
-149
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+149
-149
lines changed

src/libcore/marker.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ impl<T: ?Sized> !Send for *mut T { }
8585
on(parent_trait="std::path::Path", label="borrow the `Path` instead"),
8686
message="the size for values of type `{Self}` cannot be known at compilation time",
8787
label="doesn't have a size known at compile-time",
88-
note="to learn more, visit <https://doc.rust-lang.org/book/second-edition/\
88+
note="to learn more, visit <https://doc.rust-lang.org/book/\
8989
ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>",
9090
)]
9191
#[fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable

src/libcore/ops/deref.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
/// [book] as well as the reference sections on [the dereference operator]
2828
/// [ref-deref-op], [method resolution] and [type coercions].
2929
///
30-
/// [book]: ../../book/second-edition/ch15-02-deref.html
30+
/// [book]: ../../book/ch15-02-deref.html
3131
/// [`DerefMut`]: trait.DerefMut.html
3232
/// [more]: #more-on-deref-coercion
3333
/// [ref-deref-op]: ../../reference/expressions/operator-expr.html#the-dereference-operator
@@ -117,7 +117,7 @@ impl<T: ?Sized> Deref for &mut T {
117117
/// [book] as well as the reference sections on [the dereference operator]
118118
/// [ref-deref-op], [method resolution] and [type coercions].
119119
///
120-
/// [book]: ../../book/second-edition/ch15-02-deref.html
120+
/// [book]: ../../book/ch15-02-deref.html
121121
/// [`Deref`]: trait.Deref.html
122122
/// [more]: #more-on-deref-coercion
123123
/// [ref-deref-op]: ../../reference/expressions/operator-expr.html#the-dereference-operator

src/libcore/ops/drop.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
/// Refer to [the chapter on `Drop` in *The Rust Programming Language*][book]
1212
/// for some more elaboration.
1313
///
14-
/// [book]: ../../book/second-edition/ch15-03-drop.html
14+
/// [book]: ../../book/ch15-03-drop.html
1515
///
1616
/// # Examples
1717
///

src/libcore/ops/function.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
/// `Fn(usize, bool) -> usize`). Those interested in the technical details of
2828
/// this can refer to [the relevant section in the *Rustonomicon*][nomicon].
2929
///
30-
/// [book]: ../../book/second-edition/ch13-01-closures.html
30+
/// [book]: ../../book/ch13-01-closures.html
3131
/// [`FnMut`]: trait.FnMut.html
3232
/// [`FnOnce`]: trait.FnOnce.html
3333
/// [function pointers]: ../../std/primitive.fn.html
@@ -95,7 +95,7 @@ pub trait Fn<Args> : FnMut<Args> {
9595
/// `Fn(usize, bool) -> usize`). Those interested in the technical details of
9696
/// this can refer to [the relevant section in the *Rustonomicon*][nomicon].
9797
///
98-
/// [book]: ../../book/second-edition/ch13-01-closures.html
98+
/// [book]: ../../book/ch13-01-closures.html
9999
/// [`Fn`]: trait.Fn.html
100100
/// [`FnOnce`]: trait.FnOnce.html
101101
/// [function pointers]: ../../std/primitive.fn.html
@@ -173,7 +173,7 @@ pub trait FnMut<Args> : FnOnce<Args> {
173173
/// `Fn(usize, bool) -> usize`). Those interested in the technical details of
174174
/// this can refer to [the relevant section in the *Rustonomicon*][nomicon].
175175
///
176-
/// [book]: ../../book/second-edition/ch13-01-closures.html
176+
/// [book]: ../../book/ch13-01-closures.html
177177
/// [`Fn`]: trait.Fn.html
178178
/// [`FnMut`]: trait.FnMut.html
179179
/// [function pointers]: ../../std/primitive.fn.html

src/librustc_mir/borrow_check/error_reporting.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
723723
functions can only return borrows to data passed as arguments",
724724
);
725725
err.note(
726-
"to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch04-02-\
726+
"to learn more, visit <https://doc.rust-lang.org/book/ch04-02-\
727727
references-and-borrowing.html#dangling-references>",
728728
);
729729
} else {
@@ -2132,7 +2132,7 @@ impl<'tcx> AnnotatedBorrowFnSignature<'tcx> {
21322132
"argument and return type have the same lifetime due to lifetime elision rules",
21332133
);
21342134
diag.note(
2135-
"to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch10-03-\
2135+
"to learn more, visit <https://doc.rust-lang.org/book/ch10-03-\
21362136
lifetime-syntax.html#lifetime-elision>",
21372137
);
21382138

src/libstd/keyword_docs.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ mod crate_keyword { }
169169
///
170170
/// [Algebraic Data Types]: https://en.wikipedia.org/wiki/Algebraic_data_type
171171
/// [`Option`]: option/enum.Option.html
172-
/// [Rust Book]: https://doc.rust-lang.org/book/second-edition/ch06-01-defining-an-enum.html
172+
/// [Rust Book]: https://doc.rust-lang.org/book/ch06-01-defining-an-enum.html
173173
/// [Reference]: https://doc.rust-lang.org/reference/items/enumerations.html
174174
mod enum_keyword { }
175175

@@ -211,7 +211,7 @@ mod enum_keyword { }
211211
/// For more information on FFI, check the [Rust book] or the [Reference].
212212
///
213213
/// [Rust book]:
214-
/// https://doc.rust-lang.org/book/second-edition/ch19-01-unsafe-rust.html#using-extern-functions-to-call-external-code
214+
/// https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html#using-extern-functions-to-call-external-code
215215
/// [Reference]: https://doc.rust-lang.org/reference/items/external-blocks.html
216216
mod extern_keyword { }
217217

@@ -278,7 +278,7 @@ mod extern_keyword { }
278278
///
279279
/// [`impl`]: keyword.impl.html
280280
/// [`extern`]: keyword.extern.html
281-
/// [Rust book]: https://doc.rust-lang.org/book/second-edition/ch03-03-how-functions-work.html
281+
/// [Rust book]: https://doc.rust-lang.org/book/ch03-03-how-functions-work.html
282282
/// [Reference]: https://doc.rust-lang.org/reference/items/functions.html
283283
mod fn_keyword { }
284284

@@ -705,6 +705,6 @@ mod loop_keyword { }
705705
/// [Reference][reference].
706706
///
707707
/// [`PhantomData`]: marker/struct.PhantomData.html
708-
/// [book]: https://doc.rust-lang.org/book/second-edition/ch05-01-defining-structs.html
708+
/// [book]: https://doc.rust-lang.org/book/ch05-01-defining-structs.html
709709
/// [reference]: https://doc.rust-lang.org/reference/items/structs.html
710710
mod struct_keyword { }

src/libstd/primitive_docs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ mod prim_usize { }
923923
/// For more information on how to use references, see [the book's section on "References and
924924
/// Borrowing"][book-refs].
925925
///
926-
/// [book-refs]: ../book/second-edition/ch04-02-references-and-borrowing.html
926+
/// [book-refs]: ../book/ch04-02-references-and-borrowing.html
927927
///
928928
/// # Trait implementations
929929
///

src/test/ui/associated-types/associated-types-unsized.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | let x = t.get(); //~ ERROR the size for values of type
55
| ^ doesn't have a size known at compile-time
66
|
77
= help: the trait `std::marker::Sized` is not implemented for `<T as Get>::Value`
8-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
8+
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
99
= help: consider adding a `where <T as Get>::Value: std::marker::Sized` bound
1010
= note: all local variables must have a statically known size
1111
= help: unsized locals are gated as an unstable feature

src/test/ui/bad/bad-sized.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ LL | let x: Vec<Trait + Sized> = Vec::new();
1111
| ^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
1212
|
1313
= help: the trait `std::marker::Sized` is not implemented for `dyn Trait`
14-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
14+
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
1515
= note: required by `std::vec::Vec`
1616

1717
error[E0277]: the size for values of type `dyn Trait` cannot be known at compilation time
@@ -21,7 +21,7 @@ LL | let x: Vec<Trait + Sized> = Vec::new();
2121
| ^^^^^^^^ doesn't have a size known at compile-time
2222
|
2323
= help: the trait `std::marker::Sized` is not implemented for `dyn Trait`
24-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
24+
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
2525
= note: required by `<std::vec::Vec<T>>::new`
2626

2727
error: aborting due to 3 previous errors

src/test/ui/consts/const-unsized.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | const CONST_0: Debug+Sync = *(&0 as &(Debug+Sync));
55
| ^^^^^^^^^^ doesn't have a size known at compile-time
66
|
77
= help: the trait `std::marker::Sized` is not implemented for `(dyn std::fmt::Debug + std::marker::Sync + 'static)`
8-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
8+
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
99

1010
error[E0277]: the size for values of type `str` cannot be known at compilation time
1111
--> $DIR/const-unsized.rs:6:18
@@ -14,7 +14,7 @@ LL | const CONST_FOO: str = *"foo";
1414
| ^^^ doesn't have a size known at compile-time
1515
|
1616
= help: the trait `std::marker::Sized` is not implemented for `str`
17-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
17+
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
1818

1919
error[E0277]: the size for values of type `(dyn std::fmt::Debug + std::marker::Sync + 'static)` cannot be known at compilation time
2020
--> $DIR/const-unsized.rs:9:18
@@ -23,7 +23,7 @@ LL | static STATIC_1: Debug+Sync = *(&1 as &(Debug+Sync));
2323
| ^^^^^^^^^^ doesn't have a size known at compile-time
2424
|
2525
= help: the trait `std::marker::Sized` is not implemented for `(dyn std::fmt::Debug + std::marker::Sync + 'static)`
26-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
26+
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
2727

2828
error[E0277]: the size for values of type `str` cannot be known at compilation time
2929
--> $DIR/const-unsized.rs:12:20
@@ -32,7 +32,7 @@ LL | static STATIC_BAR: str = *"bar";
3232
| ^^^ doesn't have a size known at compile-time
3333
|
3434
= help: the trait `std::marker::Sized` is not implemented for `str`
35-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
35+
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
3636

3737
error: aborting due to 4 previous errors
3838

src/test/ui/dst/dst-bad-assign-2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | f5.ptr = *z;
55
| ^^^^^^ doesn't have a size known at compile-time
66
|
77
= help: the trait `std::marker::Sized` is not implemented for `dyn ToBar`
8-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
8+
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
99
= note: the left-hand-side of an assignment must have a statically known size
1010

1111
error: aborting due to previous error

src/test/ui/dst/dst-bad-assign-3.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ LL | f5.2 = Bar1 {f: 36};
1414
| ^^^^ doesn't have a size known at compile-time
1515
|
1616
= help: the trait `std::marker::Sized` is not implemented for `dyn ToBar`
17-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
17+
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
1818
= note: the left-hand-side of an assignment must have a statically known size
1919

2020
error: aborting due to 2 previous errors

src/test/ui/dst/dst-bad-assign.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ LL | f5.ptr = Bar1 {f: 36};
1414
| ^^^^^^ doesn't have a size known at compile-time
1515
|
1616
= help: the trait `std::marker::Sized` is not implemented for `dyn ToBar`
17-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
17+
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
1818
= note: the left-hand-side of an assignment must have a statically known size
1919

2020
error: aborting due to 2 previous errors

src/test/ui/dst/dst-bad-deep-2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | let h: &(([isize],),) = &(*g,);
55
| ^^^^^ doesn't have a size known at compile-time
66
|
77
= help: within `(([isize],),)`, the trait `std::marker::Sized` is not implemented for `[isize]`
8-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
8+
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
99
= note: required because it appears within the type `([isize],)`
1010
= note: required because it appears within the type `(([isize],),)`
1111
= note: tuples must have a statically known size to be initialized

src/test/ui/dst/dst-bad-deep.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | let h: &Fat<Fat<[isize]>> = &Fat { ptr: *g };
55
| ^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
66
|
77
= help: within `Fat<Fat<[isize]>>`, the trait `std::marker::Sized` is not implemented for `[isize]`
8-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
8+
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
99
= note: required because it appears within the type `Fat<[isize]>`
1010
= note: required because it appears within the type `Fat<Fat<[isize]>>`
1111
= note: structs must have a statically known size to be initialized

src/test/ui/dst/dst-object-from-unsized-type.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | let u: &Foo = t;
55
| ^ doesn't have a size known at compile-time
66
|
77
= help: the trait `std::marker::Sized` is not implemented for `T`
8-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
8+
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
99
= help: consider adding a `where T: std::marker::Sized` bound
1010
= note: required for the cast to the object type `dyn Foo`
1111

@@ -16,7 +16,7 @@ LL | let v: &Foo = t as &Foo;
1616
| ^ doesn't have a size known at compile-time
1717
|
1818
= help: the trait `std::marker::Sized` is not implemented for `T`
19-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
19+
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
2020
= help: consider adding a `where T: std::marker::Sized` bound
2121
= note: required for the cast to the object type `dyn Foo`
2222

@@ -27,7 +27,7 @@ LL | let _: &[&Foo] = &["hi"];
2727
| ^^^^ doesn't have a size known at compile-time
2828
|
2929
= help: the trait `std::marker::Sized` is not implemented for `str`
30-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
30+
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
3131
= note: required for the cast to the object type `dyn Foo`
3232

3333
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
@@ -37,7 +37,7 @@ LL | let _: &Foo = x as &Foo;
3737
| ^ doesn't have a size known at compile-time
3838
|
3939
= help: the trait `std::marker::Sized` is not implemented for `[u8]`
40-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
40+
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
4141
= note: required for the cast to the object type `dyn Foo`
4242

4343
error: aborting due to 4 previous errors

src/test/ui/dst/dst-sized-trait-param.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | impl Foo<[isize]> for usize { }
55
| ^^^^^^^^^^^^ doesn't have a size known at compile-time
66
|
77
= help: the trait `std::marker::Sized` is not implemented for `[isize]`
8-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
8+
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
99

1010
error[E0277]: the size for values of type `[usize]` cannot be known at compilation time
1111
--> $DIR/dst-sized-trait-param.rs:10:6
@@ -14,7 +14,7 @@ LL | impl Foo<isize> for [usize] { }
1414
| ^^^^^^^^^^ doesn't have a size known at compile-time
1515
|
1616
= help: the trait `std::marker::Sized` is not implemented for `[usize]`
17-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
17+
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
1818

1919
error: aborting due to 2 previous errors
2020

src/test/ui/error-codes/E0277.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | fn f(p: Path) { }
55
| ^ borrow the `Path` instead
66
|
77
= help: within `std::path::Path`, the trait `std::marker::Sized` is not implemented for `[u8]`
8-
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
8+
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
99
= note: required because it appears within the type `std::path::Path`
1010
= note: all local variables must have a statically known size
1111
= help: unsized locals are gated as an unstable feature

0 commit comments

Comments
 (0)