Skip to content

Commit

Permalink
Auto merge of #6897 - ehuss:doc-links-rel, r=Eh2406
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bors committed May 2, 2019
2 parents 7eb9e6c + b54748e commit bb8a583
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/doc/src/appendix/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ manifest is located.
[Directory Sources]: reference/source-replacement.html#directory-sources
[Local Registry Sources]: reference/source-replacement.html#local-registry-sources
[Source Replacement]: reference/source-replacement.html
[cargo-unstable]: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html
[cargo-unstable]: reference/unstable.html
[config option]: reference/config.html
[directory layout]: reference/manifest.html#the-project-layout
[edition guide]: ../edition-guide/index.html
Expand Down
2 changes: 1 addition & 1 deletion src/doc/src/guide/tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ examples you’ve included and will also test the examples in your
documentation. Please see the [testing guide][testing] in the Rust
documentation for more details.

[testing]: https://doc.rust-lang.org/book/testing.html
[testing]: ../book/ch11-00-testing.html
2 changes: 1 addition & 1 deletion src/doc/src/reference/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ let out_dir = env::var("OUT_DIR").unwrap();
information.

[links]: reference/build-scripts.html#the-links-manifest-key
[configuration]: https://doc.rust-lang.org/reference/attributes.html#conditional-compilation
[configuration]: ../reference/conditional-compilation.html
[jobserver]: https://www.gnu.org/software/make/manual/html_node/Job-Slots.html
[cargo-config]: reference/config.html
[Target Triple]: appendix/glossary.html#target
Expand Down
9 changes: 5 additions & 4 deletions src/doc/src/reference/manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ a keyword. [crates.io][cratesio] imposes even more restrictions, such as
enforcing only ASCII characters, not a reserved name, not a special Windows
name such as "nul", is not too long, etc.

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

#### The `version` field

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

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

### Examples

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

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

```toml
[[example]]
Expand Down Expand Up @@ -840,7 +841,7 @@ The available options are `dylib`, `rlib`, `staticlib`, `cdylib`, and
`proc-macro`.

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

### The `[patch]` Section

Expand Down
2 changes: 1 addition & 1 deletion src/doc/src/reference/registries.md
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ browser to log in and retrieve an API token.
[`cargo login`]: commands/cargo-login.html
[`cargo package`]: commands/cargo-package.html
[`cargo publish`]: commands/cargo-publish.html
[alphanumeric]: https://doc.rust-lang.org/std/primitive.char.html#method.is_alphanumeric
[alphanumeric]: ../std/primitive.char.html#method.is_alphanumeric
[config]: reference/config.html
[crates.io]: https://crates.io/
[publishing documentation]: reference/publishing.html#cargo-owner

0 comments on commit bb8a583

Please sign in to comment.