]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/description.rs
Rollup merge of #107819 - clubby789:x-py-root, r=jyn514
[rust.git] / tests / rustdoc / description.rs
1 #![crate_name = "foo"]
2 //! # Description test crate
3 //!
4 //! This is the contents of the test crate docstring.
5 //! It should not show up in the description.
6
7 // @has 'foo/index.html' '//meta[@name="description"]/@content' \
8 //   'Description test crate'
9 // @!has - '//meta[@name="description"]/@content' 'should not show up'
10
11 // @has 'foo/foo_mod/index.html' '//meta[@name="description"]/@content' \
12 //   'First paragraph description.'
13 // @!has - '//meta[@name="description"]/@content' 'Second paragraph'
14 /// First paragraph description.
15 ///
16 /// Second paragraph should not show up.
17 pub mod foo_mod {
18     pub struct __Thing {}
19 }
20
21 // @has 'foo/fn.foo_fn.html' '//meta[@name="description"]/@content' \
22 //   'Only paragraph.'
23 /// Only paragraph.
24 pub fn foo_fn() {}