2021-02-20 18:38:41 -06:00
|
|
|
#![crate_name = "foo"]
|
|
|
|
//! # Description test crate
|
|
|
|
//!
|
2021-02-20 18:50:01 -06:00
|
|
|
//! This is the contents of the test crate docstring.
|
|
|
|
//! It should not show up in the description.
|
2021-02-20 18:38:41 -06:00
|
|
|
|
2021-02-20 18:51:41 -06:00
|
|
|
// @has 'foo/index.html' '//meta[@name="description"]/@content' \
|
2021-02-20 18:50:01 -06:00
|
|
|
// 'Description test crate'
|
2021-02-21 10:31:39 -06:00
|
|
|
// @!has - '//meta[@name="description"]/@content' 'should not show up'
|
2021-02-20 18:38:41 -06:00
|
|
|
|
2021-02-20 18:51:41 -06:00
|
|
|
// @has 'foo/foo_mod/index.html' '//meta[@name="description"]/@content' \
|
2021-02-20 18:50:01 -06:00
|
|
|
// 'First paragraph description.'
|
2021-02-21 10:31:23 -06:00
|
|
|
// @!has - '//meta[@name="description"]/@content' 'Second paragraph'
|
2021-02-20 18:38:41 -06:00
|
|
|
/// First paragraph description.
|
|
|
|
///
|
|
|
|
/// Second paragraph should not show up.
|
|
|
|
pub mod foo_mod {
|
|
|
|
pub struct __Thing {}
|
|
|
|
}
|
|
|
|
|
2021-02-20 18:51:41 -06:00
|
|
|
// @has 'foo/fn.foo_fn.html' '//meta[@name="description"]/@content' \
|
2021-02-20 18:50:01 -06:00
|
|
|
// 'Only paragraph.'
|
2021-02-20 18:38:41 -06:00
|
|
|
/// Only paragraph.
|
|
|
|
pub fn foo_fn() {}
|
2023-02-11 13:36:55 -06:00
|
|
|
|
|
|
|
// @has 'foo/fn.bar_fn.html' '//meta[@name="description"]/@content' \
|
|
|
|
// 'Description with intra-doc link to foo_fn and [nonexistent_item] and foo_fn.'
|
|
|
|
#[allow(rustdoc::broken_intra_doc_links)]
|
|
|
|
/// Description with intra-doc link to [foo_fn] and [nonexistent_item] and [foo_fn](self::foo_fn).
|
|
|
|
pub fn bar_fn() {}
|