]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/sort-modules-by-appearance.rs
Rollup merge of #106716 - c410-f3r:rfc-2397-1, r=davidtwco
[rust.git] / tests / rustdoc / sort-modules-by-appearance.rs
1 // Tests the rustdoc --sort-modules-by-appearance option, that allows module declarations to appear
2 // in the order they are declared in the source code, rather than only alphabetically.
3
4 // compile-flags: -Z unstable-options --sort-modules-by-appearance
5
6 pub mod module_b {}
7
8 pub mod module_c {}
9
10 pub mod module_a {}
11
12 // @matchesraw 'sort_modules_by_appearance/index.html' '(?s)module_b.*module_c.*module_a'
13 // @matchesraw 'sort_modules_by_appearance/sidebar-items.js' '"module_b".*"module_c".*"module_a"'