This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +34
-2
lines changed Expand file tree Collapse file tree 2 files changed +34
-2
lines changed Original file line number Diff line number Diff line change 1+ // Regression test for https://github.com/rust-lang/rust/issues/105677.
2+ // This test ensures that the "Read more" link is only generated when
3+ // there is actually more documentation to read after the short summary.
4+
5+ #![ crate_name = "foo" ]
6+
7+ pub trait MyFrom {
8+ /// # Hello
9+ /// ## Yolo
10+ /// more!
11+ fn try_from1 ( ) ;
12+ /// a
13+ /// b
14+ /// c
15+ fn try_from2 ( ) ;
16+ /// a
17+ ///
18+ /// b
19+ ///
20+ /// c
21+ fn try_from3 ( ) ;
22+ }
23+
24+ pub struct NonZero ;
25+
26+ // @has 'foo/struct.NonZero.html'
27+ impl MyFrom for NonZero {
28+ // @matches - '//*[@class="docblock"]' '^Hello Read more$'
29+ fn try_from1 ( ) { }
30+ // @matches - '//*[@class="docblock"]' '^a\sb\sc$'
31+ fn try_from2 ( ) { }
32+ // @matches - '//*[@class="docblock"]' '^a Read more$'
33+ fn try_from3 ( ) { }
34+ }
Original file line number Diff line number Diff line change @@ -30,8 +30,6 @@ impl Trait for Struct {
3030 // @has - '//*[@id="method.b"]/../../div[@class="docblock"]' 'These docs contain'
3131 // @has - '//*[@id="method.b"]/../../div[@class="docblock"]/a' 'reference link'
3232 // @has - '//*[@id="method.b"]/../../div[@class="docblock"]/a/@href' 'https://example.com'
33- // @has - '//*[@id="method.b"]/../../div[@class="docblock"]/a' 'Read more'
34- // @has - '//*[@id="method.b"]/../../div[@class="docblock"]/a/@href' 'trait.Trait.html#tymethod.b'
3533 fn b ( ) { }
3634
3735 // @!has - '//*[@id="method.c"]/../../div[@class="docblock"]' 'code block'
You can’t perform that action at this time.
0 commit comments