2020-06-27 16:44:42 -04:00
|
|
|
pub trait Trait {
|
|
|
|
/// Some long docs here.
|
|
|
|
///
|
|
|
|
/// These docs are long enough that a link will be added to the end.
|
|
|
|
fn a();
|
|
|
|
|
|
|
|
/// These docs contain a [reference link].
|
|
|
|
///
|
|
|
|
/// [reference link]: https://example.com
|
|
|
|
fn b();
|
|
|
|
|
|
|
|
/// ```
|
|
|
|
/// This code block should not be in the output, but a Read more link should be generated
|
|
|
|
/// ```
|
|
|
|
fn c();
|
|
|
|
|
|
|
|
/// Escaped formatting a\*b\*c\* works
|
|
|
|
fn d();
|
|
|
|
}
|
|
|
|
|
|
|
|
pub struct Struct;
|
|
|
|
|
|
|
|
impl Trait for Struct {
|
2021-04-30 15:29:24 +02:00
|
|
|
// @has trait_impl/struct.Struct.html '//*[@id="method.a"]/../../div[@class="docblock"]/p' 'Some long docs'
|
|
|
|
// @!has - '//*[@id="method.a"]/../../div[@class="docblock"]/p' 'link will be added'
|
|
|
|
// @has - '//*[@id="method.a"]/../../div[@class="docblock"]/p/a' 'Read more'
|
|
|
|
// @has - '//*[@id="method.a"]/../../div[@class="docblock"]/p/a/@href' 'trait.Trait.html#tymethod.a'
|
2020-06-27 16:44:42 -04:00
|
|
|
fn a() {}
|
|
|
|
|
2021-04-30 15:29:24 +02:00
|
|
|
// @has - '//*[@id="method.b"]/../../div[@class="docblock"]/p' 'These docs contain'
|
|
|
|
// @has - '//*[@id="method.b"]/../../div[@class="docblock"]/p/a' 'reference link'
|
|
|
|
// @has - '//*[@id="method.b"]/../../div[@class="docblock"]/p/a/@href' 'https://example.com'
|
|
|
|
// @has - '//*[@id="method.b"]/../../div[@class="docblock"]/p/a' 'Read more'
|
|
|
|
// @has - '//*[@id="method.b"]/../../div[@class="docblock"]/p/a/@href' 'trait.Trait.html#tymethod.b'
|
2020-06-27 16:44:42 -04:00
|
|
|
fn b() {}
|
|
|
|
|
2021-04-30 15:29:24 +02:00
|
|
|
// @!has - '//*[@id="method.c"]/../../div[@class="docblock"]/p' 'code block'
|
|
|
|
// @has - '//*[@id="method.c"]/../../div[@class="docblock"]/a' 'Read more'
|
|
|
|
// @has - '//*[@id="method.c"]/../../div[@class="docblock"]/a/@href' 'trait.Trait.html#tymethod.c'
|
2020-06-27 16:44:42 -04:00
|
|
|
fn c() {}
|
|
|
|
|
2021-04-30 15:29:24 +02:00
|
|
|
// @has - '//*[@id="method.d"]/../../div[@class="docblock"]/p' 'Escaped formatting a*b*c* works'
|
|
|
|
// @!has - '//*[@id="method.d"]/../../div[@class="docblock"]/p/em'
|
2020-06-27 16:44:42 -04:00
|
|
|
fn d() {}
|
2021-04-30 15:29:24 +02:00
|
|
|
|
2021-07-25 21:41:57 +00:00
|
|
|
// @has - '//*[@id="impl-Trait"]/h3//a/@href' 'trait.Trait.html'
|
2020-06-27 16:44:42 -04:00
|
|
|
}
|