Closed
Description
Instead it should use the order that pub mod foo
appear in the crate file. Even better, it should allow adding section headers (with a description) between them. Hypothetically:
/// Modules for foo-ing.
pub mod foo;
/// Modules for ba-ing. Ba-ing has several variants, all distinct from foo-ing.
pub mod bar;
pub mod baz;
And get something like this:
Modules
Modules for foo-ing
foo - Description of foo.
Modules for ba-ing
Ba-ing is distinct from foo-ing.
bar - Description for bar.
baz - Description for baz.
This would make both the source code and the documentation more accessible as the modules would be presented in a comprehensible order, with some description of each related group of modules.
Edit: Rename issue to reflect that this isn't an either-or. Alphabetical order is useful, but so is programmer-specified order (to make the code accessible for newcomers) and Rustdoc should support both - see the thread below.