]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/short-docblock.rs
Auto merge of #107778 - weihanglo:update-cargo, r=weihanglo
[rust.git] / tests / rustdoc / short-docblock.rs
1 #![crate_name = "foo"]
2
3 // @has foo/index.html '//*[@class="item-right docblock-short"]' 'fooo'
4 // @!has foo/index.html '//*[@class="item-right docblock-short"]/h1' 'fooo'
5 // @has foo/fn.foo.html '//h2[@id="fooo"]/a[@href="#fooo"]' 'fooo'
6
7 /// # fooo
8 ///
9 /// foo
10 pub fn foo() {}
11
12 // @has foo/index.html '//*[@class="item-right docblock-short"]' 'mooood'
13 // @!has foo/index.html '//*[@class="item-right docblock-short"]/h2' 'mooood'
14 // @has foo/foo/index.html '//h3[@id="mooood"]/a[@href="#mooood"]' 'mooood'
15
16 /// ## mooood
17 ///
18 /// foo mod
19 pub mod foo {}
20
21 // @has foo/index.html '//*[@class="item-right docblock-short"]/a[@href=\
22 //                      "https://nougat.world"]/code' 'nougat'
23
24 /// [`nougat`](https://nougat.world)
25 pub struct Bar;