Skip to content

Commit 2c1da5b

Browse files
Rollup merge of #34021 - ollie27:book_links_offline, r=steveklabnik
Fix a few links in the book Links to directories and direct links to doc.rust-lang.org don't work properly when viewing the docs offline so fix them. r? @steveklabnik
2 parents 083e013 + 658253d commit 2c1da5b

6 files changed

+11
-10
lines changed

src/doc/book/choosing-your-guarantees.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ indicator (one word in size) along with the data.
232232

233233
At runtime each borrow causes a modification/check of the refcount.
234234

235-
[cell-mod]: ../std/cell/
235+
[cell-mod]: ../std/cell/index.html
236236
[cell]: ../std/cell/struct.Cell.html
237237
[refcell]: ../std/cell/struct.RefCell.html
238238

src/doc/book/documentation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ This [unfortunate error](https://github.com/rust-lang/rust/issues/22547) is
7676
correct; documentation comments apply to the thing after them, and there's
7777
nothing after that last comment.
7878

79-
[rc-new]: https://doc.rust-lang.org/nightly/std/rc/struct.Rc.html#method.new
79+
[rc-new]: ../std/rc/struct.Rc.html#method.new
8080

8181
### Writing documentation comments
8282

src/doc/book/error-handling.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2205,7 +2205,7 @@ heuristics!
22052205
[3]: ../std/option/enum.Option.html#method.unwrap_or
22062206
[4]: ../std/option/enum.Option.html#method.unwrap_or_else
22072207
[5]: ../std/option/enum.Option.html
2208-
[6]: ../std/result/
2208+
[6]: ../std/result/index.html
22092209
[7]: ../std/result/enum.Result.html#method.unwrap
22102210
[8]: ../std/fmt/trait.Debug.html
22112211
[9]: ../std/primitive.str.html#method.parse

src/doc/book/using-rust-without-the-standard-library.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ fn plus_one(x: i32) -> i32 {
2222
```
2323

2424
Much of the functionality that’s exposed in the standard library is also
25-
available via the [`core` crate](../core/). When we’re using the standard
26-
library, Rust automatically brings `std` into scope, allowing you to use
27-
its features without an explicit import. By the same token, when using
25+
available via the [`core` crate](../core/index.html). When we’re using the
26+
standard library, Rust automatically brings `std` into scope, allowing you to
27+
use its features without an explicit import. By the same token, when using
2828
`#![no_std]`, Rust will bring `core` into scope for you, as well as [its
29-
prelude](../core/prelude/v1/). This means that a lot of code will Just Work:
29+
prelude](../core/prelude/v1/index.html). This means that a lot of code will Just
30+
Work:
3031

3132
```rust
3233
#![no_std]

src/doc/book/vectors.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -152,5 +152,5 @@ API documentation][vec].
152152
[box]: ../std/boxed/index.html
153153
[generic]: generics.html
154154
[panic]: concurrency.html#panics
155-
[get]: http://doc.rust-lang.org/std/vec/struct.Vec.html#method.get
156-
[get_mut]: http://doc.rust-lang.org/std/vec/struct.Vec.html#method.get_mut
155+
[get]: ../std/vec/struct.Vec.html#method.get
156+
[get_mut]: ../std/vec/struct.Vec.html#method.get_mut

src/doc/nomicon/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ exception-safety, pointer aliasing, memory models, and even some type-theory.
3535
We will also be spending a lot of time talking about the different kinds
3636
of safety and guarantees.
3737

38-
[trpl]: ../book/
38+
[trpl]: ../book/index.html

0 commit comments

Comments
 (0)