2020-12-30 04:16:16 +00:00
|
|
|
#![deny(rustdoc::broken_intra_doc_links)]
|
2019-11-23 17:45:55 +00:00
|
|
|
|
|
|
|
// A few tests on anchors.
|
|
|
|
|
|
|
|
/// Hello people.
|
|
|
|
///
|
|
|
|
/// You can anchors? Here's one!
|
|
|
|
///
|
|
|
|
/// # hola
|
|
|
|
///
|
|
|
|
/// Isn't it amazing?
|
|
|
|
pub struct Foo {
|
|
|
|
pub f: u8,
|
|
|
|
}
|
|
|
|
|
|
|
|
pub enum Enum {
|
|
|
|
A,
|
|
|
|
B,
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Have you heard about stuff?
|
|
|
|
///
|
|
|
|
/// Like [Foo#hola].
|
|
|
|
///
|
|
|
|
/// Or maybe [Foo::f#hola].
|
2020-07-19 17:03:35 +00:00
|
|
|
//~^ ERROR `Foo::f#hola` contains an anchor
|
2019-11-23 17:45:55 +00:00
|
|
|
pub fn foo() {}
|
|
|
|
|
|
|
|
/// Empty.
|
|
|
|
///
|
|
|
|
/// Another anchor error: [hello#people#!].
|
2020-07-19 17:03:35 +00:00
|
|
|
//~^ ERROR `hello#people#!` contains multiple anchors
|
2019-11-23 17:45:55 +00:00
|
|
|
pub fn bar() {}
|
|
|
|
|
|
|
|
/// Empty?
|
|
|
|
///
|
|
|
|
/// Damn enum's variants: [Enum::A#whatever].
|
2020-07-19 17:03:35 +00:00
|
|
|
//~^ ERROR `Enum::A#whatever` contains an anchor
|
2019-11-23 17:45:55 +00:00
|
|
|
pub fn enum_link() {}
|