2020-04-19 18:40:53 -05:00
|
|
|
//@ check-pass
|
2018-04-01 14:06:35 -05:00
|
|
|
|
2018-06-06 02:30:25 -05:00
|
|
|
//! Test with [Foo::baz], [Bar::foo], ...
|
2020-07-19 12:03:35 -05:00
|
|
|
//~^ WARNING `Foo::baz`
|
|
|
|
//~| WARNING `Bar::foo`
|
2018-06-06 11:14:09 -05:00
|
|
|
//! , [Uniooon::X] and [Qux::Z].
|
2020-07-19 12:03:35 -05:00
|
|
|
//~^ WARNING `Uniooon::X`
|
|
|
|
//~| WARNING `Qux::Z`
|
2018-06-06 11:14:09 -05:00
|
|
|
//!
|
|
|
|
//! , [Uniooon::X] and [Qux::Z].
|
2020-07-19 12:03:35 -05:00
|
|
|
//~^ WARNING `Uniooon::X`
|
|
|
|
//~| WARNING `Qux::Z`
|
2018-04-01 14:06:35 -05:00
|
|
|
|
2018-06-06 02:30:25 -05:00
|
|
|
/// [Qux:Y]
|
2020-07-19 12:03:35 -05:00
|
|
|
//~^ WARNING `Qux:Y`
|
2018-04-01 14:06:35 -05:00
|
|
|
pub struct Foo {
|
|
|
|
pub bar: usize,
|
|
|
|
}
|
2018-06-06 11:14:09 -05:00
|
|
|
|
|
|
|
/// Foo
|
2020-07-19 12:03:35 -05:00
|
|
|
/// bar [BarA] bar //~ WARNING `BarA`
|
2018-06-06 11:14:09 -05:00
|
|
|
/// baz
|
|
|
|
pub fn a() {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Foo
|
2020-07-19 12:03:35 -05:00
|
|
|
* bar [BarB] bar //~ WARNING `BarB`
|
2018-06-06 11:14:09 -05:00
|
|
|
* baz
|
|
|
|
*/
|
|
|
|
pub fn b() {}
|
|
|
|
|
|
|
|
/** Foo
|
|
|
|
|
2020-07-19 12:03:35 -05:00
|
|
|
bar [BarC] bar //~ WARNING `BarC`
|
2018-06-06 11:14:09 -05:00
|
|
|
baz
|
|
|
|
|
|
|
|
let bar_c_1 = 0;
|
|
|
|
let bar_c_2 = 0;
|
|
|
|
let g = [bar_c_1];
|
|
|
|
let h = g[bar_c_2];
|
|
|
|
|
|
|
|
*/
|
|
|
|
pub fn c() {}
|
|
|
|
|
2020-07-19 12:03:35 -05:00
|
|
|
#[doc = "Foo\nbar [BarD] bar\nbaz"] //~ WARNING `BarD`
|
2018-06-06 11:14:09 -05:00
|
|
|
pub fn d() {}
|
|
|
|
|
|
|
|
macro_rules! f {
|
|
|
|
($f:expr) => {
|
2024-03-29 14:31:34 -05:00
|
|
|
#[doc = $f]
|
2018-06-06 11:14:09 -05:00
|
|
|
pub fn f() {}
|
|
|
|
}
|
|
|
|
}
|
2024-03-29 14:31:34 -05:00
|
|
|
f!("Foo\nbar [BarF] bar\nbaz"); //~ WARNING `BarF`
|
2018-12-10 11:24:39 -06:00
|
|
|
|
|
|
|
/** # for example,
|
|
|
|
*
|
2020-07-19 12:03:35 -05:00
|
|
|
* time to introduce a link [error]*/ //~ WARNING `error`
|
2018-12-10 11:24:39 -06:00
|
|
|
pub struct A;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* # for example,
|
|
|
|
*
|
2020-07-19 12:03:35 -05:00
|
|
|
* time to introduce a link [error] //~ WARNING `error`
|
2018-12-10 11:24:39 -06:00
|
|
|
*/
|
|
|
|
pub struct B;
|
|
|
|
|
2020-07-19 12:03:35 -05:00
|
|
|
#[doc = "single line [error]"] //~ WARNING `error`
|
2018-12-10 11:24:39 -06:00
|
|
|
pub struct C;
|
|
|
|
|
2020-07-19 12:03:35 -05:00
|
|
|
#[doc = "single line with \"escaping\" [error]"] //~ WARNING `error`
|
2018-12-10 11:24:39 -06:00
|
|
|
pub struct D;
|
|
|
|
|
2020-07-19 12:03:35 -05:00
|
|
|
/// Item docs. //~ WARNING `error`
|
2018-12-10 11:24:39 -06:00
|
|
|
#[doc="Hello there!"]
|
|
|
|
/// [error]
|
|
|
|
pub struct E;
|
|
|
|
|
|
|
|
///
|
2020-07-19 12:03:35 -05:00
|
|
|
/// docs [error1] //~ WARNING `error1`
|
2018-12-10 11:24:39 -06:00
|
|
|
|
2020-07-19 12:03:35 -05:00
|
|
|
/// docs [error2] //~ WARNING `error2`
|
2018-12-10 11:24:39 -06:00
|
|
|
///
|
|
|
|
pub struct F;
|