Skip to content

Commit 066fcb6

Browse files
Add test when there is no source code link after version
1 parent d442a37 commit 066fcb6

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#![doc(html_no_source)]
2+
#![feature(staged_api)]
3+
#![stable(feature = "bar", since = "1.0")]
4+
#![crate_name = "foo"]
5+
6+
// @has foo/fn.foo.html
7+
// @has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0 · '
8+
// @!has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0 · source · '
9+
#[stable(feature = "bar", since = "1.0")]
10+
pub fn foo() {}
11+
12+
// @has foo/struct.Bar.html
13+
// @has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0 · '
14+
// @!has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0 · source · '
15+
#[stable(feature = "bar", since = "1.0")]
16+
pub struct Bar;
17+
18+
impl Bar {
19+
// @has - '//div[@id="method.bar"]/*[@class="rightside"]' '2.0'
20+
// @!has - '//div[@id="method.bar"]/*[@class="rightside"]' '2.0 ·'
21+
#[stable(feature = "foobar", since = "2.0")]
22+
pub fn bar() {}
23+
}

0 commit comments

Comments
 (0)