Skip to content

Commit 384ecfe

Browse files
GuillaumeGomezpetrochenkov
authored andcommitted
Add regression test for rust-lang#107995
1 parent 19fc948 commit 384ecfe

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

tests/rustdoc/issue-107995.rs

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Regression test for <https://github.com/rust-lang/rust/issues/107995>.
2+
3+
#![crate_name = "foo"]
4+
5+
// @has 'foo/fn.foo.html'
6+
// @has - '//*[@class="docblock"]//a[@href="fn.bar.html"]' 'bar`'
7+
/// A foo, see also [ bar`]
8+
pub fn foo() {}
9+
10+
// @has 'foo/fn.bar.html'
11+
// @has - '//*[@class="docblock"]' 'line Path line'
12+
// @has - '//*[@class="docblock"]//a[@href="struct.Path.html"]' 'Path'
13+
#[doc = "line ["]
14+
#[doc = "Path"]
15+
#[doc = "] line"]
16+
pub fn bar() {}
17+
18+
// @has 'foo/fn.another.html'
19+
// @has - '//*[@class="docblock"]//a[@href="struct.Path.html"]' 'Path'
20+
/// [ `Path`]
21+
pub fn another() {}
22+
23+
// @has 'foo/fn.last.html'
24+
// @has - '//*[@class="docblock"]//a[@href="struct.Path.html"]' 'Path'
25+
/// [ Path`]
26+
pub fn last() {}
27+
28+
pub struct Path;

0 commit comments

Comments
 (0)