From edd83c5d7e88384ddcbb466374b70f3e79bc4087 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sat, 19 Jun 2021 13:02:30 +0900 Subject: [PATCH] Fix linkcheck failures --- book.toml | 38 ++++++++++++++++++------------------- src/arc-mutex/arc-base.md | 2 +- src/arc-mutex/arc-clone.md | 2 +- src/arc-mutex/arc-layout.md | 2 +- src/arc-mutex/arc.md | 2 +- src/vec/vec-alloc.md | 12 ++++++------ src/vec/vec-drain.md | 2 +- src/vec/vec-layout.md | 4 ++-- 8 files changed, 32 insertions(+), 32 deletions(-) diff --git a/book.toml b/book.toml index c46f4e8..e05acfb 100644 --- a/book.toml +++ b/book.toml @@ -8,27 +8,27 @@ git-repository-url = "https://github.com/rust-lang/nomicon" [output.html.redirect] # Vec-related chapters. -"/vec-alloc.html" = "/vec/vec-alloc.html" -"/vec-dealloc.html" = "/vec/vec-dealloc.html" -"/vec-deref.html" = "/vec/vec-deref.html" -"/vec-drain.html" = "/vec/vec-drain.html" -"/vec-final.html" = "/vec/vec-final.html" -"/vec-insert-remove.html" = "/vec/vec-insert-remove.html" -"/vec-into-iter.html" = "/vec/vec-into-iter.html" -"/vec-layout.html" = "/vec/vec-layout.html" -"/vec-push-pop.html" = "/vec/vec-push-pop.html" -"/vec-raw.html" = "/vec/vec-raw.html" -"/vec-zsts.html" = "/vec/vec-zsts.html" -"/vec.html" = "/vec/vec.html" +"./vec-alloc.html" = "./vec/vec-alloc.html" +"./vec-dealloc.html" = "./vec/vec-dealloc.html" +"./vec-deref.html" = "./vec/vec-deref.html" +"./vec-drain.html" = "./vec/vec-drain.html" +"./vec-final.html" = "./vec/vec-final.html" +"./vec-insert-remove.html" = "./vec/vec-insert-remove.html" +"./vec-into-iter.html" = "./vec/vec-into-iter.html" +"./vec-layout.html" = "./vec/vec-layout.html" +"./vec-push-pop.html" = "./vec/vec-push-pop.html" +"./vec-raw.html" = "./vec/vec-raw.html" +"./vec-zsts.html" = "./vec/vec-zsts.html" +"./vec.html" = "./vec/vec.html" # Arc and Mutex related chapters. -"/arc-and-mutex.html" = "/arc-mutex/arc-and-mutex.html" -"/arc-base.html" = "/arc-mutex/arc-base.html" -"/arc-clone.html" = "/arc-mutex/arc-clone.html" -"/arc-drop.html" = "/arc-mutex/arc-drop.html" -"/arc-final.html" = "/arc-mutex/arc-final.html" -"/arc-layout.html" = "/arc-mutex/arc-layout.html" -"/arc.html" = "/arc-mutex/arc.html" +"./arc-and-mutex.html" = "./arc-mutex/arc-and-mutex.html" +"./arc-base.html" = "./arc-mutex/arc-base.html" +"./arc-clone.html" = "./arc-mutex/arc-clone.html" +"./arc-drop.html" = "./arc-mutex/arc-drop.html" +"./arc-final.html" = "./arc-mutex/arc-final.html" +"./arc-layout.html" = "./arc-mutex/arc-layout.html" +"./arc.html" = "./arc-mutex/arc.html" [rust] edition = "2018" diff --git a/src/arc-mutex/arc-base.md b/src/arc-mutex/arc-base.md index 7dd6bae..4af9884 100644 --- a/src/arc-mutex/arc-base.md +++ b/src/arc-mutex/arc-base.md @@ -34,7 +34,7 @@ impl Arc { Since we're building a concurrency primitive, we'll need to be able to send it across threads. Thus, we can implement the `Send` and `Sync` marker traits. For more information on these, see [the section on `Send` and -`Sync`](send-and-sync.md). +`Sync`](../send-and-sync.md). This is okay because: * You can only get a mutable reference to the value inside an `Arc` if and only diff --git a/src/arc-mutex/arc-clone.md b/src/arc-mutex/arc-clone.md index 96b8bd6..960cd16 100644 --- a/src/arc-mutex/arc-clone.md +++ b/src/arc-mutex/arc-clone.md @@ -26,7 +26,7 @@ happens-before relationship but is atomic. When `Drop`ping the Arc, however, we'll need to atomically synchronize when decrementing the reference count. This is described more in [the section on the `Drop` implementation for `Arc`](arc-drop.md). For more information on atomic relationships and Relaxed -ordering, see [the section on atomics](atomics.md). +ordering, see [the section on atomics](../atomics.md). Thus, the code becomes this: diff --git a/src/arc-mutex/arc-layout.md b/src/arc-mutex/arc-layout.md index cbe0ad3..abab016 100644 --- a/src/arc-mutex/arc-layout.md +++ b/src/arc-mutex/arc-layout.md @@ -41,7 +41,7 @@ be used where an `Arc<&'a str>` was expected. More importantly, it will give incorrect ownership information to the drop checker, as it will assume we don't own any values of type `T`. As this is a structure providing shared ownership of a value, at some point there will be an instance of this structure that entirely -owns its data. See [the chapter on ownership and lifetimes](ownership.md) for +owns its data. See [the chapter on ownership and lifetimes](../ownership.md) for all the details on variance and drop check. To fix the first problem, we can use `NonNull`. Note that `NonNull` is a diff --git a/src/arc-mutex/arc.md b/src/arc-mutex/arc.md index 580e662..fd7800f 100644 --- a/src/arc-mutex/arc.md +++ b/src/arc-mutex/arc.md @@ -1,7 +1,7 @@ # Implementing Arc In this section, we'll be implementing a simpler version of `std::sync::Arc`. -Similarly to [the implementation of `Vec` we made earlier](vec.md), we won't be +Similarly to [the implementation of `Vec` we made earlier](../vec/vec.md), we won't be taking advantage of as many optimizations, intrinsics, or unstable code as the standard library may. diff --git a/src/vec/vec-alloc.md b/src/vec/vec-alloc.md index cf3844b..b18f10e 100644 --- a/src/vec/vec-alloc.md +++ b/src/vec/vec-alloc.md @@ -202,9 +202,9 @@ impl Vec { # fn main() {} ``` -[Global]: ../std/alloc/struct.Global.html -[handle_alloc_error]: ../alloc/alloc/fn.handle_alloc_error.html -[alloc]: ../alloc/alloc/fn.alloc.html -[realloc]: ../alloc/alloc/fn.realloc.html -[dealloc]: ../alloc/alloc/fn.dealloc.html -[std_alloc]: ../alloc/alloc/index.html +[Global]: ../../std/alloc/struct.Global.html +[handle_alloc_error]: ../../alloc/alloc/fn.handle_alloc_error.html +[alloc]: ../../alloc/alloc/fn.alloc.html +[realloc]: ../../alloc/alloc/fn.realloc.html +[dealloc]: ../../alloc/alloc/fn.dealloc.html +[std_alloc]: ../../alloc/alloc/index.html diff --git a/src/vec/vec-drain.md b/src/vec/vec-drain.md index 9b38dff..1f4cb85 100644 --- a/src/vec/vec-drain.md +++ b/src/vec/vec-drain.md @@ -149,4 +149,4 @@ impl Vec { For more details on the `mem::forget` problem, see the [section on leaks][leaks]. -[leaks]: leaking.html +[leaks]: ../leaking.html diff --git a/src/vec/vec-layout.md b/src/vec/vec-layout.md index 20e2306..dd97ae1 100644 --- a/src/vec/vec-layout.md +++ b/src/vec/vec-layout.md @@ -56,5 +56,5 @@ unsafe impl Sync for Vec {} # fn main() {} ``` -[ownership]: ownership.html -[NonNull]: ../std/ptr/struct.NonNull.html +[ownership]: ../ownership.html +[NonNull]: ../../std/ptr/struct.NonNull.html