2020-04-19 23:40:53 +00:00
|
|
|
// check-pass
|
2018-04-01 19:06:35 +00:00
|
|
|
|
2018-06-06 07:30:25 +00:00
|
|
|
//! Test with [Foo::baz], [Bar::foo], ...
|
2019-11-08 00:00:00 +00:00
|
|
|
//~^ WARNING `[Foo::baz]` cannot be resolved
|
|
|
|
//~| WARNING `[Bar::foo]` cannot be resolved
|
2018-06-06 16:14:09 +00:00
|
|
|
//! , [Uniooon::X] and [Qux::Z].
|
2019-11-08 00:00:00 +00:00
|
|
|
//~^ WARNING `[Uniooon::X]` cannot be resolved
|
|
|
|
//~| WARNING `[Qux::Z]` cannot be resolved
|
2018-06-06 16:14:09 +00:00
|
|
|
//!
|
|
|
|
//! , [Uniooon::X] and [Qux::Z].
|
2019-11-08 00:00:00 +00:00
|
|
|
//~^ WARNING `[Uniooon::X]` cannot be resolved
|
|
|
|
//~| WARNING `[Qux::Z]` cannot be resolved
|
2018-04-01 19:06:35 +00:00
|
|
|
|
2018-06-06 07:30:25 +00:00
|
|
|
/// [Qux:Y]
|
2019-11-08 00:00:00 +00:00
|
|
|
//~^ WARNING `[Qux:Y]` cannot be resolved
|
2018-04-01 19:06:35 +00:00
|
|
|
pub struct Foo {
|
|
|
|
pub bar: usize,
|
|
|
|
}
|
2018-06-06 16:14:09 +00:00
|
|
|
|
|
|
|
/// Foo
|
2019-11-08 00:00:00 +00:00
|
|
|
/// bar [BarA] bar //~ WARNING `[BarA]` cannot be resolved
|
2018-06-06 16:14:09 +00:00
|
|
|
/// baz
|
|
|
|
pub fn a() {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Foo
|
2019-11-08 00:00:00 +00:00
|
|
|
* bar [BarB] bar //~ WARNING `[BarB]` cannot be resolved
|
2018-06-06 16:14:09 +00:00
|
|
|
* baz
|
|
|
|
*/
|
|
|
|
pub fn b() {}
|
|
|
|
|
|
|
|
/** Foo
|
|
|
|
|
2019-11-08 00:00:00 +00:00
|
|
|
bar [BarC] bar //~ WARNING `[BarC]` cannot be resolved
|
2018-06-06 16:14:09 +00: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() {}
|
|
|
|
|
2019-11-08 00:00:00 +00:00
|
|
|
#[doc = "Foo\nbar [BarD] bar\nbaz"] //~ WARNING `[BarD]` cannot be resolved
|
2018-06-06 16:14:09 +00:00
|
|
|
pub fn d() {}
|
|
|
|
|
|
|
|
macro_rules! f {
|
|
|
|
($f:expr) => {
|
2019-11-08 00:00:00 +00:00
|
|
|
#[doc = $f] //~ WARNING `[BarF]` cannot be resolved
|
2018-06-06 16:14:09 +00:00
|
|
|
pub fn f() {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
f!("Foo\nbar [BarF] bar\nbaz");
|
2018-12-10 17:24:39 +00:00
|
|
|
|
|
|
|
/** # for example,
|
|
|
|
*
|
2019-11-08 00:00:00 +00:00
|
|
|
* time to introduce a link [error]*/ //~ WARNING `[error]` cannot be resolved
|
2018-12-10 17:24:39 +00:00
|
|
|
pub struct A;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* # for example,
|
|
|
|
*
|
2019-11-08 00:00:00 +00:00
|
|
|
* time to introduce a link [error] //~ WARNING `[error]` cannot be resolved
|
2018-12-10 17:24:39 +00:00
|
|
|
*/
|
|
|
|
pub struct B;
|
|
|
|
|
2019-11-08 00:00:00 +00:00
|
|
|
#[doc = "single line [error]"] //~ WARNING `[error]` cannot be resolved
|
2018-12-10 17:24:39 +00:00
|
|
|
pub struct C;
|
|
|
|
|
2019-11-08 00:00:00 +00:00
|
|
|
#[doc = "single line with \"escaping\" [error]"] //~ WARNING `[error]` cannot be resolved
|
2018-12-10 17:24:39 +00:00
|
|
|
pub struct D;
|
|
|
|
|
2019-11-08 00:00:00 +00:00
|
|
|
/// Item docs. //~ WARNING `[error]` cannot be resolved
|
2018-12-10 17:24:39 +00:00
|
|
|
#[doc="Hello there!"]
|
|
|
|
/// [error]
|
|
|
|
pub struct E;
|
|
|
|
|
|
|
|
///
|
2019-11-08 00:00:00 +00:00
|
|
|
/// docs [error1] //~ WARNING `[error1]` cannot be resolved
|
2018-12-10 17:24:39 +00:00
|
|
|
|
2019-11-08 00:00:00 +00:00
|
|
|
/// docs [error2] //~ WARNING `[error2]` cannot be resolved
|
2018-12-10 17:24:39 +00:00
|
|
|
///
|
|
|
|
pub struct F;
|