Skip to content

Commit

Permalink
talk about --sort-modules-by-appearance
Browse files Browse the repository at this point in the history
  • Loading branch information
QuietMisdreavus committed Mar 16, 2018
1 parent 33ed787 commit cc4f97e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/doc/rustdoc/src/unstable-features.md
Expand Up @@ -279,3 +279,16 @@ $ rustdoc --test README.md -Z unstable-options --linker foo
When `rustdoc` runs your documentation tests, it needs to compile and link the tests as executables
before running them. This flag can be used to change the linker used on these executables. It's
equivalent to passing `-C linker=foo` to `rustc`.

### `--sort-modules-by-appearance`: control how items on module pages are sorted

Using this flag looks like this:

```bash
$ rustdoc src/lib.rs -Z unstable-options --sort-modules-by-appearance
```

Ordinarily, when `rustdoc` prints items in module pages, it will sort them alphabetically (taking
some consideration for their stability, and names that end in a number). Giving this flag to
`rustdoc` will disable this sorting and instead make it print the items in the order they appear in
the source.

0 comments on commit cc4f97e

Please sign in to comment.