Skip to content

Commit b77b18a

Browse files
Add regression test for #131618
1 parent b5b353b commit b77b18a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/rustdoc/const-display.rs

+6
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,18 @@
77

88
//@ has 'foo/fn.foo.html' '//pre' 'pub fn foo() -> u32'
99
//@ has - '//span[@class="since"]' '1.0.0 (const: unstable)'
10+
//@ has - '//span[@class="item-info"]//span' 'The const version is a \
11+
// nightly-only experimental API. (foo)'
1012
#[stable(feature = "rust1", since = "1.0.0")]
1113
#[rustc_const_unstable(feature="foo", issue = "none")]
1214
pub const fn foo() -> u32 { 42 }
1315

1416
//@ has 'foo/fn.foo_unsafe.html' '//pre' 'pub unsafe fn foo_unsafe() -> u32'
1517
//@ has - '//span[@class="since"]' '1.0.0 (const: unstable)'
18+
//@ has - '//span[@class="item-info"]//span' 'The const version is a \
19+
// nightly-only experimental API. (foo #111)'
20+
//@ has - '//span[@class="item-info"]//a[@href="https://github.com/rust-lang/rust/issues/111"]' \
21+
// '#111'
1622
#[stable(feature = "rust1", since = "1.0.0")]
1723
#[rustc_const_unstable(feature="foo", issue = "111")]
1824
pub const unsafe fn foo_unsafe() -> u32 { 42 }

0 commit comments

Comments
 (0)