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.
This commit is contained in:
Oliver Middleton 2016-06-01 13:32:58 +01:00
parent 433d70cda2
commit 658253d30c
6 changed files with 11 additions and 10 deletions

View File

@ -232,7 +232,7 @@ indicator (one word in size) along with the data.
At runtime each borrow causes a modification/check of the refcount.
[cell-mod]: ../std/cell/
[cell-mod]: ../std/cell/index.html
[cell]: ../std/cell/struct.Cell.html
[refcell]: ../std/cell/struct.RefCell.html

View File

@ -76,7 +76,7 @@ This [unfortunate error](https://github.com/rust-lang/rust/issues/22547) is
correct; documentation comments apply to the thing after them, and there's
nothing after that last comment.
[rc-new]: https://doc.rust-lang.org/nightly/std/rc/struct.Rc.html#method.new
[rc-new]: ../std/rc/struct.Rc.html#method.new
### Writing documentation comments

View File

@ -2205,7 +2205,7 @@ heuristics!
[3]: ../std/option/enum.Option.html#method.unwrap_or
[4]: ../std/option/enum.Option.html#method.unwrap_or_else
[5]: ../std/option/enum.Option.html
[6]: ../std/result/
[6]: ../std/result/index.html
[7]: ../std/result/enum.Result.html#method.unwrap
[8]: ../std/fmt/trait.Debug.html
[9]: ../std/primitive.str.html#method.parse

View File

@ -22,11 +22,12 @@ fn plus_one(x: i32) -> i32 {
```
Much of the functionality thats exposed in the standard library is also
available via the [`core` crate](../core/). When were using the standard
library, Rust automatically brings `std` into scope, allowing you to use
its features without an explicit import. By the same token, when using
available via the [`core` crate](../core/index.html). When were using the
standard library, Rust automatically brings `std` into scope, allowing you to
use its features without an explicit import. By the same token, when using
`#![no_std]`, Rust will bring `core` into scope for you, as well as [its
prelude](../core/prelude/v1/). This means that a lot of code will Just Work:
prelude](../core/prelude/v1/index.html). This means that a lot of code will Just
Work:
```rust
#![no_std]

View File

@ -152,5 +152,5 @@ API documentation][vec].
[box]: ../std/boxed/index.html
[generic]: generics.html
[panic]: concurrency.html#panics
[get]: http://doc.rust-lang.org/std/vec/struct.Vec.html#method.get
[get_mut]: http://doc.rust-lang.org/std/vec/struct.Vec.html#method.get_mut
[get]: ../std/vec/struct.Vec.html#method.get
[get_mut]: ../std/vec/struct.Vec.html#method.get_mut

View File

@ -35,4 +35,4 @@ exception-safety, pointer aliasing, memory models, and even some type-theory.
We will also be spending a lot of time talking about the different kinds
of safety and guarantees.
[trpl]: ../book/
[trpl]: ../book/index.html