]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/tab_title.rs
Rollup merge of #107580 - lenko-d:default_value_for_a_lifetime_generic_parameter_prod...
[rust.git] / tests / rustdoc / tab_title.rs
1 #![crate_name = "foo"]
2 #![feature(rustdoc_internals)]
3
4 // tests for the html <title> element
5
6 // @has foo/index.html '//head/title' 'foo - Rust'
7
8 // @has foo/fn.widget_count.html '//head/title' 'widget_count in foo - Rust'
9 /// blah
10 pub fn widget_count() {}
11
12 // @has foo/struct.Widget.html '//head/title' 'Widget in foo - Rust'
13 pub struct Widget;
14
15 // @has foo/constant.ANSWER.html '//head/title' 'ANSWER in foo - Rust'
16 pub const ANSWER: u8 = 42;
17
18 // @has foo/blah/index.html '//head/title' 'foo::blah - Rust'
19 pub mod blah {
20     // @has foo/blah/struct.Widget.html '//head/title' 'Widget in foo::blah - Rust'
21     pub struct Widget;
22
23     // @has foo/blah/trait.Awesome.html '//head/title' 'Awesome in foo::blah - Rust'
24     pub trait Awesome {}
25
26     // @has foo/blah/fn.make_widget.html '//head/title' 'make_widget in foo::blah - Rust'
27     pub fn make_widget() {}
28
29     // @has foo/macro.cool_macro.html '//head/title' 'cool_macro in foo - Rust'
30     #[macro_export]
31     macro_rules! cool_macro {
32         ($t:tt) => { $t }
33     }
34 }
35
36 // @has foo/keyword.continue.html '//head/title' 'continue - Rust'
37 #[doc(keyword = "continue")]
38 mod continue_keyword {}
39
40 // @has foo/primitive.u8.html '//head/title' 'u8 - Rust'
41 // @!has - '//head/title' 'foo'
42 #[doc(primitive = "u8")]
43 /// `u8` docs
44 mod u8 {}