2016-08-27 16:00:36 +00:00
|
|
|
#![crate_name = "foo"]
|
2021-11-26 23:03:16 +00:00
|
|
|
#![feature(rustdoc_internals)]
|
|
|
|
|
2016-08-27 16:00:36 +00:00
|
|
|
// @matches 'foo/index.html' '//h1' 'Crate foo'
|
Simplify and unify rustdoc sidebar styles
This switches to just use size, weight, and spacing to distinguish
headings in the sidebar. We no longer use boxes, horizontal bars, or
centering to distinguish headings. This makes it much easier to
understand the hierarchy of headings, and reduces visual noise.
I also refactored how the mobile topbar works. Previously, we tried to
shift around elements from the sidebar to make the topbar. Now, the
topbar gets its own elements, which can be styled on their own. This
makes styling and reasoning about those elements simpler.
Because the heading font sizes are bigger, increase the sidebar width
slightly.
As a very minor change, removed version from the "All types" page. It's
now only on the crate page.
2022-01-07 00:48:24 +00:00
|
|
|
// @matches 'foo/index.html' '//h2[@class="location"]' 'Crate foo'
|
2016-08-27 16:00:36 +00:00
|
|
|
|
|
|
|
// @matches 'foo/foo_mod/index.html' '//h1' 'Module foo::foo_mod'
|
Simplify and unify rustdoc sidebar styles
This switches to just use size, weight, and spacing to distinguish
headings in the sidebar. We no longer use boxes, horizontal bars, or
centering to distinguish headings. This makes it much easier to
understand the hierarchy of headings, and reduces visual noise.
I also refactored how the mobile topbar works. Previously, we tried to
shift around elements from the sidebar to make the topbar. Now, the
topbar gets its own elements, which can be styled on their own. This
makes styling and reasoning about those elements simpler.
Because the heading font sizes are bigger, increase the sidebar width
slightly.
As a very minor change, removed version from the "All types" page. It's
now only on the crate page.
2022-01-07 00:48:24 +00:00
|
|
|
// @matches 'foo/foo_mod/index.html' '//h2[@class="location"]' 'Module foo_mod'
|
2016-08-27 16:00:36 +00:00
|
|
|
pub mod foo_mod {
|
|
|
|
pub struct __Thing {}
|
|
|
|
}
|
|
|
|
|
2020-09-01 21:12:52 +00:00
|
|
|
extern "C" {
|
2016-08-27 16:00:36 +00:00
|
|
|
// @matches 'foo/fn.foo_ffn.html' '//h1' 'Function foo::foo_ffn'
|
|
|
|
pub fn foo_ffn();
|
|
|
|
}
|
|
|
|
|
|
|
|
// @matches 'foo/fn.foo_fn.html' '//h1' 'Function foo::foo_fn'
|
|
|
|
pub fn foo_fn() {}
|
|
|
|
|
|
|
|
// @matches 'foo/trait.FooTrait.html' '//h1' 'Trait foo::FooTrait'
|
Simplify and unify rustdoc sidebar styles
This switches to just use size, weight, and spacing to distinguish
headings in the sidebar. We no longer use boxes, horizontal bars, or
centering to distinguish headings. This makes it much easier to
understand the hierarchy of headings, and reduces visual noise.
I also refactored how the mobile topbar works. Previously, we tried to
shift around elements from the sidebar to make the topbar. Now, the
topbar gets its own elements, which can be styled on their own. This
makes styling and reasoning about those elements simpler.
Because the heading font sizes are bigger, increase the sidebar width
slightly.
As a very minor change, removed version from the "All types" page. It's
now only on the crate page.
2022-01-07 00:48:24 +00:00
|
|
|
// @matches 'foo/trait.FooTrait.html' '//h2[@class="location"]' 'FooTrait'
|
2016-08-27 16:00:36 +00:00
|
|
|
pub trait FooTrait {}
|
|
|
|
|
|
|
|
// @matches 'foo/struct.FooStruct.html' '//h1' 'Struct foo::FooStruct'
|
Simplify and unify rustdoc sidebar styles
This switches to just use size, weight, and spacing to distinguish
headings in the sidebar. We no longer use boxes, horizontal bars, or
centering to distinguish headings. This makes it much easier to
understand the hierarchy of headings, and reduces visual noise.
I also refactored how the mobile topbar works. Previously, we tried to
shift around elements from the sidebar to make the topbar. Now, the
topbar gets its own elements, which can be styled on their own. This
makes styling and reasoning about those elements simpler.
Because the heading font sizes are bigger, increase the sidebar width
slightly.
As a very minor change, removed version from the "All types" page. It's
now only on the crate page.
2022-01-07 00:48:24 +00:00
|
|
|
// @matches 'foo/struct.FooStruct.html' '//h2[@class="location"]' 'FooStruct'
|
2016-08-27 16:00:36 +00:00
|
|
|
pub struct FooStruct;
|
|
|
|
|
|
|
|
// @matches 'foo/enum.FooEnum.html' '//h1' 'Enum foo::FooEnum'
|
Simplify and unify rustdoc sidebar styles
This switches to just use size, weight, and spacing to distinguish
headings in the sidebar. We no longer use boxes, horizontal bars, or
centering to distinguish headings. This makes it much easier to
understand the hierarchy of headings, and reduces visual noise.
I also refactored how the mobile topbar works. Previously, we tried to
shift around elements from the sidebar to make the topbar. Now, the
topbar gets its own elements, which can be styled on their own. This
makes styling and reasoning about those elements simpler.
Because the heading font sizes are bigger, increase the sidebar width
slightly.
As a very minor change, removed version from the "All types" page. It's
now only on the crate page.
2022-01-07 00:48:24 +00:00
|
|
|
// @matches 'foo/enum.FooEnum.html' '//h2[@class="location"]' 'FooEnum'
|
2016-08-27 16:00:36 +00:00
|
|
|
pub enum FooEnum {}
|
|
|
|
|
|
|
|
// @matches 'foo/type.FooType.html' '//h1' 'Type Definition foo::FooType'
|
Simplify and unify rustdoc sidebar styles
This switches to just use size, weight, and spacing to distinguish
headings in the sidebar. We no longer use boxes, horizontal bars, or
centering to distinguish headings. This makes it much easier to
understand the hierarchy of headings, and reduces visual noise.
I also refactored how the mobile topbar works. Previously, we tried to
shift around elements from the sidebar to make the topbar. Now, the
topbar gets its own elements, which can be styled on their own. This
makes styling and reasoning about those elements simpler.
Because the heading font sizes are bigger, increase the sidebar width
slightly.
As a very minor change, removed version from the "All types" page. It's
now only on the crate page.
2022-01-07 00:48:24 +00:00
|
|
|
// @matches 'foo/type.FooType.html' '//h2[@class="location"]' 'FooType'
|
2016-08-27 16:00:36 +00:00
|
|
|
pub type FooType = FooStruct;
|
|
|
|
|
|
|
|
// @matches 'foo/macro.foo_macro.html' '//h1' 'Macro foo::foo_macro'
|
|
|
|
#[macro_export]
|
|
|
|
macro_rules! foo_macro {
|
2020-09-01 21:12:52 +00:00
|
|
|
() => {};
|
2016-08-27 16:00:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// @matches 'foo/primitive.bool.html' '//h1' 'Primitive Type bool'
|
|
|
|
#[doc(primitive = "bool")]
|
|
|
|
mod bool {}
|
|
|
|
|
|
|
|
// @matches 'foo/static.FOO_STATIC.html' '//h1' 'Static foo::FOO_STATIC'
|
|
|
|
pub static FOO_STATIC: FooStruct = FooStruct;
|
|
|
|
|
2020-09-01 21:12:52 +00:00
|
|
|
extern "C" {
|
2016-08-27 16:00:36 +00:00
|
|
|
// @matches 'foo/static.FOO_FSTATIC.html' '//h1' 'Static foo::FOO_FSTATIC'
|
|
|
|
pub static FOO_FSTATIC: FooStruct;
|
|
|
|
}
|
|
|
|
|
|
|
|
// @matches 'foo/constant.FOO_CONSTANT.html' '//h1' 'Constant foo::FOO_CONSTANT'
|
|
|
|
pub const FOO_CONSTANT: FooStruct = FooStruct;
|