]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/titles.rs
Merge commit '533f0fc81ab9ba097779fcd27c8f9ea12261fef5' into psimd
[rust.git] / src / test / rustdoc / titles.rs
1 #![crate_name = "foo"]
2
3 #![feature(rustdoc_internals)]
4
5 // @matches 'foo/index.html' '//h1' 'Crate foo'
6
7 // @matches 'foo/foo_mod/index.html' '//h1' 'Module foo::foo_mod'
8 pub mod foo_mod {
9     pub struct __Thing {}
10 }
11
12 extern "C" {
13     // @matches 'foo/fn.foo_ffn.html' '//h1' 'Function foo::foo_ffn'
14     pub fn foo_ffn();
15 }
16
17 // @matches 'foo/fn.foo_fn.html' '//h1' 'Function foo::foo_fn'
18 pub fn foo_fn() {}
19
20 // @matches 'foo/trait.FooTrait.html' '//h1' 'Trait foo::FooTrait'
21 pub trait FooTrait {}
22
23 // @matches 'foo/struct.FooStruct.html' '//h1' 'Struct foo::FooStruct'
24 pub struct FooStruct;
25
26 // @matches 'foo/enum.FooEnum.html' '//h1' 'Enum foo::FooEnum'
27 pub enum FooEnum {}
28
29 // @matches 'foo/type.FooType.html' '//h1' 'Type Definition foo::FooType'
30 pub type FooType = FooStruct;
31
32 // @matches 'foo/macro.foo_macro.html' '//h1' 'Macro foo::foo_macro'
33 #[macro_export]
34 macro_rules! foo_macro {
35     () => {};
36 }
37
38 // @matches 'foo/primitive.bool.html' '//h1' 'Primitive Type bool'
39 #[doc(primitive = "bool")]
40 mod bool {}
41
42 // @matches 'foo/static.FOO_STATIC.html' '//h1' 'Static foo::FOO_STATIC'
43 pub static FOO_STATIC: FooStruct = FooStruct;
44
45 extern "C" {
46     // @matches 'foo/static.FOO_FSTATIC.html' '//h1' 'Static foo::FOO_FSTATIC'
47     pub static FOO_FSTATIC: FooStruct;
48 }
49
50 // @matches 'foo/constant.FOO_CONSTANT.html' '//h1' 'Constant foo::FOO_CONSTANT'
51 pub const FOO_CONSTANT: FooStruct = FooStruct;