forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#102054 - GuillaumeGomez:sidebar-all-page, r…
…=notriddle Unify "all items" page's sidebar with other pages Currently, the "all types" page's sidebar doesn't list the different categories of type available. This PR fixes it. Before: ![Screenshot from 2022-09-20 17-11-15](https://user-images.githubusercontent.com/3050060/191296348-95d8771d-a887-432e-96bd-d5284d87d743.png) After: ![Screenshot from 2022-09-20 17-11-09](https://user-images.githubusercontent.com/3050060/191296344-8e7318a3-eb51-4037-ae94-7ae2115363ce.png) r? `@notriddle`
- Loading branch information
Showing
3 changed files
with
139 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#![crate_name = "foo"] | ||
|
||
#![feature(rustdoc_internals)] | ||
|
||
// @has 'foo/all.html' | ||
// @has - '//*[@class="sidebar-elems"]//li' 'Structs' | ||
// @has - '//*[@class="sidebar-elems"]//li' 'Enums' | ||
// @has - '//*[@class="sidebar-elems"]//li' 'Unions' | ||
// @has - '//*[@class="sidebar-elems"]//li' 'Functions' | ||
// @has - '//*[@class="sidebar-elems"]//li' 'Traits' | ||
// @has - '//*[@class="sidebar-elems"]//li' 'Macros' | ||
// @has - '//*[@class="sidebar-elems"]//li' 'Type Definitions' | ||
// @has - '//*[@class="sidebar-elems"]//li' 'Constants' | ||
// @has - '//*[@class="sidebar-elems"]//li' 'Statics' | ||
// @has - '//*[@class="sidebar-elems"]//li' 'Primitive Types' | ||
|
||
pub struct Foo; | ||
pub enum Enum { | ||
A, | ||
} | ||
pub union Bar { | ||
a: u8, | ||
b: u16, | ||
} | ||
pub fn foo() {} | ||
pub trait Trait {} | ||
#[macro_export] | ||
macro_rules! foo { | ||
() => {} | ||
} | ||
pub type Type = u8; | ||
pub const FOO: u8 = 0; | ||
pub static BAR: u8 = 0; | ||
#[doc(primitive = "u8")] | ||
mod u8 {} |