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