about summary refs log tree commit diff
path: root/src/doc/rustdoc
diff options
context:
space:
mode:
authorQuietMisdreavus <grey@quietmisdreavus.net>2018-06-05 20:17:06 -0500
committerQuietMisdreavus <grey@quietmisdreavus.net>2018-06-12 15:19:21 -0500
commitdb113f5319bd98165a7d3a7e67e8d71dfe029c72 (patch)
treeab0e073f9cdd06ee20a3e769466d651590eb5fd1 /src/doc/rustdoc
parent4122885e0f99b3f28e65c122cde48de5bfc8231a (diff)
downloadrust-db113f5319bd98165a7d3a7e67e8d71dfe029c72.tar.gz
rust-db113f5319bd98165a7d3a7e67e8d71dfe029c72.zip
rustdoc: add --extern-html-root-url flag
Diffstat (limited to 'src/doc/rustdoc')
-rw-r--r--src/doc/rustdoc/src/unstable-features.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/doc/rustdoc/src/unstable-features.md b/src/doc/rustdoc/src/unstable-features.md
index 7f110d6a3d2..ff00299aeba 100644
--- a/src/doc/rustdoc/src/unstable-features.md
+++ b/src/doc/rustdoc/src/unstable-features.md
@@ -361,6 +361,21 @@ This flag allows rustdoc to treat your rust code as the given edition. It will c
 the given edition as well. As with `rustc`, the default edition that `rustdoc` will use is `2015`
 (the first edition).
 
+### `--extern-html-root-url`: control how rustdoc links to non-local crates
+
+Using this flag looks like this:
+
+```bash
+$ rustdoc src/lib.rs -Z unstable-options --extern-html-root-url some-crate=https://example.com/some-crate/1.0.1
+```
+
+Ordinarily, when rustdoc wants to link to a type from a different crate, it looks in two places:
+docs that already exist in the output directory, or the `#![doc(doc_html_root)]` set in the other
+crate. However, if you want to link to docs that exist in neither of those places, you can use these
+flags to control that behavior. When the `--extern-html-root-url` flag is given with a name matching
+one of your dependencies, rustdoc use that URL for those docs. Keep in mind that if those docs exist
+in the output directory, those local docs will still override this flag.
+
 ### `-Z force-unstable-if-unmarked`
 
 Using this flag looks like this: