Skip to content

Commit bb8a583

Browse files
committed
Auto merge of #6897 - ehuss:doc-links-rel, r=Eh2406
Update some doc links. This updates some links to their new locations. This also switches to relative-style cross-book links. This allows the links to work better when viewing local documentation (such as through rustup), keeps links to the same toolchain (not just stable), and allows the rust-repo linkchecker to validate the links. The downside is that when working on the documentation in the cargo repo, the links won't work.
2 parents 7eb9e6c + b54748e commit bb8a583

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

src/doc/src/appendix/glossary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ manifest is located.
176176
[Directory Sources]: reference/source-replacement.html#directory-sources
177177
[Local Registry Sources]: reference/source-replacement.html#local-registry-sources
178178
[Source Replacement]: reference/source-replacement.html
179-
[cargo-unstable]: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html
179+
[cargo-unstable]: reference/unstable.html
180180
[config option]: reference/config.html
181181
[directory layout]: reference/manifest.html#the-project-layout
182182
[edition guide]: ../edition-guide/index.html

src/doc/src/guide/tests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ examples you’ve included and will also test the examples in your
3636
documentation. Please see the [testing guide][testing] in the Rust
3737
documentation for more details.
3838

39-
[testing]: https://doc.rust-lang.org/book/testing.html
39+
[testing]: ../book/ch11-00-testing.html

src/doc/src/reference/environment-variables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ let out_dir = env::var("OUT_DIR").unwrap();
131131
information.
132132

133133
[links]: reference/build-scripts.html#the-links-manifest-key
134-
[configuration]: https://doc.rust-lang.org/reference/attributes.html#conditional-compilation
134+
[configuration]: ../reference/conditional-compilation.html
135135
[jobserver]: https://www.gnu.org/software/make/manual/html_node/Job-Slots.html
136136
[cargo-config]: reference/config.html
137137
[Target Triple]: appendix/glossary.html#target

src/doc/src/reference/manifest.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ a keyword. [crates.io][cratesio] imposes even more restrictions, such as
2727
enforcing only ASCII characters, not a reserved name, not a special Windows
2828
name such as "nul", is not too long, etc.
2929

30-
[alphanumeric]: https://doc.rust-lang.org/std/primitive.char.html#method.is_alphanumeric
30+
[alphanumeric]: ../std/primitive.char.html#method.is_alphanumeric
3131

3232
#### The `version` field
3333

@@ -682,7 +682,8 @@ may be composed of single files or directories with a `main.rs` file.
682682

683683
To structure your code after you've created the files and folders for your
684684
package, you should remember to use Rust's module system, which you can read
685-
about in [the book](https://doc.rust-lang.org/book/crates-and-modules.html).
685+
about in [the
686+
book](../book/ch07-00-managing-growing-projects-with-packages-crates-and-modules.html).
686687

687688
### Examples
688689

@@ -698,7 +699,7 @@ You can run individual executable examples with the command `cargo run --example
698699

699700
Specify `crate-type` to make an example be compiled as a library (additional
700701
information about crate types is available in
701-
[The Rust Reference](https://doc.rust-lang.org/reference/linkage.html)):
702+
[The Rust Reference](../reference/linkage.html)):
702703

703704
```toml
704705
[[example]]
@@ -840,7 +841,7 @@ The available options are `dylib`, `rlib`, `staticlib`, `cdylib`, and
840841
`proc-macro`.
841842

842843
You can read more about the different crate types in the
843-
[Rust Reference Manual](https://doc.rust-lang.org/reference/linkage.html)
844+
[Rust Reference Manual](../reference/linkage.html)
844845

845846
### The `[patch]` Section
846847

src/doc/src/reference/registries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ browser to log in and retrieve an API token.
584584
[`cargo login`]: commands/cargo-login.html
585585
[`cargo package`]: commands/cargo-package.html
586586
[`cargo publish`]: commands/cargo-publish.html
587-
[alphanumeric]: https://doc.rust-lang.org/std/primitive.char.html#method.is_alphanumeric
587+
[alphanumeric]: ../std/primitive.char.html#method.is_alphanumeric
588588
[config]: reference/config.html
589589
[crates.io]: https://crates.io/
590590
[publishing documentation]: reference/publishing.html#cargo-owner

0 commit comments

Comments
 (0)