Reexport -> re-export in documentation section headings
This commit is contained in:
parent
79a521bb9a
commit
c698496f84
2 changed files with 6 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
||||||
# The `#[doc]` attribute
|
# The `#[doc]` attribute
|
||||||
|
|
||||||
The `#[doc]` attribute lets you control various aspects of how `rustdoc` does
|
The `#[doc]` attribute lets you control various aspects of how `rustdoc` does
|
||||||
its job.
|
its job.
|
||||||
|
|
||||||
The most basic function of `#[doc]` is to handle the actual documentation
|
The most basic function of `#[doc]` is to handle the actual documentation
|
||||||
text. That is, `///` is syntax sugar for `#[doc]`. This means that these two
|
text. That is, `///` is syntax sugar for `#[doc]`. This means that these two
|
||||||
|
@ -143,7 +143,7 @@ pub mod bar {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The documentation will generate a "Reexports" section, and say `pub use bar::Bar;`, where
|
The documentation will generate a "Re-exports" section, and say `pub use bar::Bar;`, where
|
||||||
`Bar` is a link to its page.
|
`Bar` is a link to its page.
|
||||||
|
|
||||||
If we change the `use` line like this:
|
If we change the `use` line like this:
|
||||||
|
@ -184,7 +184,7 @@ mod bar {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Now we'll have a `Reexports` line, and `Bar` will not link to anywhere.
|
Now we'll have a `Re-exports` line, and `Bar` will not link to anywhere.
|
||||||
|
|
||||||
## `#[doc(hidden)]`
|
## `#[doc(hidden)]`
|
||||||
|
|
||||||
|
|
|
@ -2059,7 +2059,7 @@ fn item_module(w: &mut fmt::Formatter, cx: &Context,
|
||||||
curty = myty;
|
curty = myty;
|
||||||
let (short, name) = match myty.unwrap() {
|
let (short, name) = match myty.unwrap() {
|
||||||
ItemType::ExternCrate |
|
ItemType::ExternCrate |
|
||||||
ItemType::Import => ("reexports", "Reexports"),
|
ItemType::Import => ("reexports", "Re-exports"),
|
||||||
ItemType::Module => ("modules", "Modules"),
|
ItemType::Module => ("modules", "Modules"),
|
||||||
ItemType::Struct => ("structs", "Structs"),
|
ItemType::Struct => ("structs", "Structs"),
|
||||||
ItemType::Union => ("unions", "Unions"),
|
ItemType::Union => ("unions", "Unions"),
|
||||||
|
@ -3959,7 +3959,7 @@ fn sidebar_module(fmt: &mut fmt::Formatter, _it: &clean::Item,
|
||||||
it.type_() == ItemType::Import) {
|
it.type_() == ItemType::Import) {
|
||||||
sidebar.push_str(&format!("<li><a href=\"#{id}\">{name}</a></li>",
|
sidebar.push_str(&format!("<li><a href=\"#{id}\">{name}</a></li>",
|
||||||
id = "reexports",
|
id = "reexports",
|
||||||
name = "Reexports"));
|
name = "Re-exports"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ordering taken from item_module, reorder, where it prioritized elements in a certain order
|
// ordering taken from item_module, reorder, where it prioritized elements in a certain order
|
||||||
|
@ -3972,7 +3972,7 @@ fn sidebar_module(fmt: &mut fmt::Formatter, _it: &clean::Item,
|
||||||
if items.iter().any(|it| !it.is_stripped() && it.type_() == myty) {
|
if items.iter().any(|it| !it.is_stripped() && it.type_() == myty) {
|
||||||
let (short, name) = match myty {
|
let (short, name) = match myty {
|
||||||
ItemType::ExternCrate |
|
ItemType::ExternCrate |
|
||||||
ItemType::Import => ("reexports", "Reexports"),
|
ItemType::Import => ("reexports", "Re-exports"),
|
||||||
ItemType::Module => ("modules", "Modules"),
|
ItemType::Module => ("modules", "Modules"),
|
||||||
ItemType::Struct => ("structs", "Structs"),
|
ItemType::Struct => ("structs", "Structs"),
|
||||||
ItemType::Union => ("unions", "Unions"),
|
ItemType::Union => ("unions", "Unions"),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue