diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-02-15 18:22:31 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-02-15 18:22:31 +0530 |
| commit | b13fddda20c2e2bb8ecb0bc8c781ce24f3e4422d (patch) | |
| tree | 3c2d83282ff8d735631c6e8aa76fd911babede80 /src | |
| parent | b6d91a2bdac45cd919497a24207fab843124d4ba (diff) | |
| parent | ce22f30b9e9dc95e576b73e21f0c653ff46e28c2 (diff) | |
| download | rust-b13fddda20c2e2bb8ecb0bc8c781ce24f3e4422d.tar.gz rust-b13fddda20c2e2bb8ecb0bc8c781ce24f3e4422d.zip | |
Rollup merge of #22132 - steveklabnik:gh16645, r=alexcrichton
Fixes #16645 Fixing this in any deeper way will require an RFC, so let's just document the current behavior.
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc/trpl/documentation.md | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/doc/trpl/documentation.md b/src/doc/trpl/documentation.md index 0b686eb76db..26519497479 100644 --- a/src/doc/trpl/documentation.md +++ b/src/doc/trpl/documentation.md @@ -1,4 +1,4 @@ -% Rust Documentation +% Documentation `rustdoc` is the built-in tool for generating documentation. It integrates with the compiler to provide accurate hyperlinking between usage of types and @@ -294,3 +294,26 @@ Documentation` on the first line). Like with a Rust crate, the `--test` argument will run the code examples to check they compile, and obeys any `--test-args` flags. The tests are named after the last `#` heading. + +# Re-exports + +Rustdoc will show the documentation for a publc re-export in both places: + +```{rust,ignore} +extern crate foo; + +pub use foo::bar; +``` + +This will create documentation for `bar` both inside the documentation for +the crate `foo`, as well as the documentation for your crate. It will use +the same documentation in both places. + +This behavior can be supressed with `no_inline`: + +```{rust,ignore} +extern crate foo; + +#[doc(no_inline)] +pub use foo::bar; +``` |
