rust/tests/rustdoc/intra-doc/anchors.rs
2023-01-11 09:32:08 +00:00

25 lines
506 B
Rust

/// I want...
///
/// # Anchor!
pub struct Something;
// @has anchors/struct.SomeOtherType.html
// @has - '//a/@href' 'struct.Something.html#Anchor!'
/// I want...
///
/// To link to [Something#Anchor!]
pub struct SomeOtherType;
/// Primitives?
///
/// [u32#hello]
// @has anchors/fn.x.html
// @has - '//a/@href' '{{channel}}/std/primitive.u32.html#hello'
pub fn x() {}
/// [prim@usize#x]
// @has anchors/usize/index.html
// @has - '//a/@href' '{{channel}}/std/primitive.usize.html#x'
pub mod usize {}