Skip to content

Commit 52dbe7c

Browse files
Add documentation for --source-code-external-url option
1 parent 0a079f0 commit 52dbe7c

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/doc/rustdoc/src/unstable-features.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ override `ignore`.
453453

454454
### `--runtool`, `--runtool-arg`: program to run tests with; args to pass to it
455455

456-
Using thses options looks like this:
456+
Using these options looks like this:
457457

458458
```bash
459459
$ rustdoc src/lib.rs -Z unstable-options --runtool runner --runtool-arg --do-thing --runtool-arg --do-other-thing
@@ -467,3 +467,20 @@ $ rustdoc src/lib.rs -Z unstable-options --runtool valgrind
467467
```
468468

469469
Another use case would be to run a test inside an emulator, or through a Virtual Machine.
470+
471+
### `--source-code-external-url`: using external source code
472+
473+
In case you don't want to generate the source code files and instead use existing ones (available
474+
through an HTTP URL!), you can use this option:
475+
476+
```bash
477+
$ rustdoc src/lib.rs -Z unstable-options --source-code-external-url 'https://somewhere.com'
478+
```
479+
480+
Note that generated source URLs will look like this:
481+
482+
```text
483+
https://somewhere.com/[crate name]
484+
```
485+
486+
It is equivalent to the local `src/[crate name]` folder.

0 commit comments

Comments
 (0)