2019-07-03 06:30:28 +09:00
|
|
|
// build-pass (FIXME(62277): could be check-pass?)
|
2018-04-01 21:06:35 +02:00
|
|
|
|
2018-06-06 00:30:25 -07:00
|
|
|
//! Test with [Foo::baz], [Bar::foo], ...
|
2018-06-06 09:14:09 -07:00
|
|
|
//! , [Uniooon::X] and [Qux::Z].
|
|
|
|
//!
|
|
|
|
//! , [Uniooon::X] and [Qux::Z].
|
2018-04-01 21:06:35 +02:00
|
|
|
|
2018-06-06 00:30:25 -07:00
|
|
|
/// [Qux:Y]
|
2018-04-01 21:06:35 +02:00
|
|
|
pub struct Foo {
|
|
|
|
pub bar: usize,
|
|
|
|
}
|
2018-06-06 09:14:09 -07:00
|
|
|
|
|
|
|
/// Foo
|
|
|
|
/// bar [BarA] bar
|
|
|
|
/// baz
|
|
|
|
pub fn a() {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Foo
|
|
|
|
* bar [BarB] bar
|
|
|
|
* baz
|
|
|
|
*/
|
|
|
|
pub fn b() {}
|
|
|
|
|
|
|
|
/** Foo
|
|
|
|
|
|
|
|
bar [BarC] bar
|
|
|
|
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() {}
|
|
|
|
|
|
|
|
#[doc = "Foo\nbar [BarD] bar\nbaz"]
|
|
|
|
pub fn d() {}
|
|
|
|
|
|
|
|
macro_rules! f {
|
|
|
|
($f:expr) => {
|
|
|
|
#[doc = $f]
|
|
|
|
pub fn f() {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
f!("Foo\nbar [BarF] bar\nbaz");
|
2018-12-10 12:24:39 -05:00
|
|
|
|
|
|
|
/** # for example,
|
|
|
|
*
|
|
|
|
* time to introduce a link [error]*/
|
|
|
|
pub struct A;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* # for example,
|
|
|
|
*
|
|
|
|
* time to introduce a link [error]
|
|
|
|
*/
|
|
|
|
pub struct B;
|
|
|
|
|
|
|
|
#[doc = "single line [error]"]
|
|
|
|
pub struct C;
|
|
|
|
|
|
|
|
#[doc = "single line with \"escaping\" [error]"]
|
|
|
|
pub struct D;
|
|
|
|
|
|
|
|
/// Item docs.
|
|
|
|
#[doc="Hello there!"]
|
|
|
|
/// [error]
|
|
|
|
pub struct E;
|
|
|
|
|
|
|
|
///
|
|
|
|
/// docs [error1]
|
|
|
|
|
|
|
|
/// docs [error2]
|
|
|
|
///
|
|
|
|
pub struct F;
|