Skip to content

Commit

Permalink
Rollup merge of rust-lang#22132 - steveklabnik:gh16645, r=alexcrichton
Browse files Browse the repository at this point in the history
Fixes rust-lang#16645

Fixing this in any deeper way will require an RFC, so let's just document the current behavior.
  • Loading branch information
steveklabnik committed Feb 15, 2015
2 parents b63cee4 + ce22f30 commit 36ff7b9
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion src/doc/trpl/documentation.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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;
```

0 comments on commit 36ff7b9

Please sign in to comment.