]> git.proxmox.com Git - rustc.git/blame - src/test/rustdoc/titles.rs
New upstream version 1.51.0+dfsg1
[rustc.git] / src / test / rustdoc / titles.rs
CommitLineData
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'
6pub mod foo_mod {
7 pub struct __Thing {}
8}
9
5869c6ff 10extern "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'
16pub fn foo_fn() {}
17
18// @matches 'foo/trait.FooTrait.html' '//h1' 'Trait foo::FooTrait'
19pub trait FooTrait {}
20
21// @matches 'foo/struct.FooStruct.html' '//h1' 'Struct foo::FooStruct'
22pub struct FooStruct;
23
24// @matches 'foo/enum.FooEnum.html' '//h1' 'Enum foo::FooEnum'
25pub enum FooEnum {}
26
27// @matches 'foo/type.FooType.html' '//h1' 'Type Definition foo::FooType'
28pub type FooType = FooStruct;
29
30// @matches 'foo/macro.foo_macro.html' '//h1' 'Macro foo::foo_macro'
31#[macro_export]
32macro_rules! foo_macro {
5869c6ff 33 () => {};
9e0c209e
SL
34}
35
36// @matches 'foo/primitive.bool.html' '//h1' 'Primitive Type bool'
37#[doc(primitive = "bool")]
38mod bool {}
39
40// @matches 'foo/static.FOO_STATIC.html' '//h1' 'Static foo::FOO_STATIC'
41pub static FOO_STATIC: FooStruct = FooStruct;
42
5869c6ff 43extern "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'
49pub const FOO_CONSTANT: FooStruct = FooStruct;