File tree 1 file changed +24
-1
lines changed 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change 1
- % Rust Documentation
1
+ % Documentation
2
2
3
3
` rustdoc ` is the built-in tool for generating documentation. It integrates
4
4
with the compiler to provide accurate hyperlinking between usage of types and
@@ -294,3 +294,26 @@ Documentation` on the first line).
294
294
Like with a Rust crate, the ` --test ` argument will run the code
295
295
examples to check they compile, and obeys any ` --test-args ` flags. The
296
296
tests are named after the last ` # ` heading.
297
+
298
+ # Re-exports
299
+
300
+ Rustdoc will show the documentation for a publc re-export in both places:
301
+
302
+ ``` {rust,ignore}
303
+ extern crate foo;
304
+
305
+ pub use foo::bar;
306
+ ```
307
+
308
+ This will create documentation for ` bar ` both inside the documentation for
309
+ the crate ` foo ` , as well as the documentation for your crate. It will use
310
+ the same documentation in both places.
311
+
312
+ This behavior can be supressed with ` no_inline ` :
313
+
314
+ ``` {rust,ignore}
315
+ extern crate foo;
316
+
317
+ #[doc(no_inline)]
318
+ pub use foo::bar;
319
+ ```
You can’t perform that action at this time.
0 commit comments