2022-12-16 07:52:25 -06:00
|
|
|
// Regression test for https://github.com/rust-lang/rust/issues/105677.
|
|
|
|
// This test ensures that the "Read more" link is only generated when
|
|
|
|
// there is actually more documentation to read after the short summary.
|
|
|
|
|
|
|
|
#![crate_name = "foo"]
|
|
|
|
|
|
|
|
pub trait MyFrom {
|
|
|
|
/// # Hello
|
|
|
|
/// ## Yolo
|
|
|
|
/// more!
|
|
|
|
fn try_from1();
|
|
|
|
/// a
|
|
|
|
/// b
|
|
|
|
/// c
|
|
|
|
fn try_from2();
|
|
|
|
/// a
|
|
|
|
///
|
|
|
|
/// b
|
|
|
|
///
|
|
|
|
/// c
|
|
|
|
fn try_from3();
|
|
|
|
}
|
|
|
|
|
|
|
|
pub struct NonZero;
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has 'foo/struct.NonZero.html'
|
2022-12-16 07:52:25 -06:00
|
|
|
impl MyFrom for NonZero {
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ matches - '//*[@class="docblock"]' '^Hello Read more$'
|
2022-12-16 07:52:25 -06:00
|
|
|
fn try_from1() {}
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ matches - '//*[@class="docblock"]' '^a\sb\sc$'
|
2022-12-16 07:52:25 -06:00
|
|
|
fn try_from2() {}
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ matches - '//*[@class="docblock"]' '^a Read more$'
|
2022-12-16 07:52:25 -06:00
|
|
|
fn try_from3() {}
|
|
|
|
}
|