2021-02-21 00:38:41 +00:00
|
|
|
#![crate_name = "foo"]
|
|
|
|
//! # Description test crate
|
|
|
|
//!
|
2021-02-21 00:50:01 +00:00
|
|
|
//! This is the contents of the test crate docstring.
|
|
|
|
//! It should not show up in the description.
|
2021-02-21 00:38:41 +00:00
|
|
|
|
2021-02-21 00:51:41 +00:00
|
|
|
// @has 'foo/index.html' '//meta[@name="description"]/@content' \
|
2021-02-21 00:50:01 +00:00
|
|
|
// 'Description test crate'
|
2021-02-21 16:31:39 +00:00
|
|
|
// @!has - '//meta[@name="description"]/@content' 'should not show up'
|
2021-02-21 00:38:41 +00:00
|
|
|
|
2021-02-21 00:51:41 +00:00
|
|
|
// @has 'foo/foo_mod/index.html' '//meta[@name="description"]/@content' \
|
2021-02-21 00:50:01 +00:00
|
|
|
// 'First paragraph description.'
|
2021-02-21 16:31:23 +00:00
|
|
|
// @!has - '//meta[@name="description"]/@content' 'Second paragraph'
|
2021-02-21 00:38:41 +00:00
|
|
|
/// First paragraph description.
|
|
|
|
///
|
|
|
|
/// Second paragraph should not show up.
|
|
|
|
pub mod foo_mod {
|
|
|
|
pub struct __Thing {}
|
|
|
|
}
|
|
|
|
|
2021-02-21 00:51:41 +00:00
|
|
|
// @has 'foo/fn.foo_fn.html' '//meta[@name="description"]/@content' \
|
2021-02-21 00:50:01 +00:00
|
|
|
// 'Only paragraph.'
|
2021-02-21 00:38:41 +00:00
|
|
|
/// Only paragraph.
|
|
|
|
pub fn foo_fn() {}
|
2023-02-11 19:36:55 +00: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() {}
|