Skip to content

Commit 20363f4

Browse files
committed
Add regression tests
1 parent 19149d1 commit 20363f4

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/rustdoc/const-fn-effects.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#![crate_name = "foo"]
2+
#![feature(effects)]
3+
4+
// @has foo/fn.bar.html
5+
// @has - '//pre[@class="rust item-decl"]' 'pub const fn bar<const host: bool = true>() -> '
6+
/// foo
7+
pub const fn bar() -> usize {
8+
2
9+
}
10+
11+
// @has foo/struct.Foo.html
12+
// @has - '//*[@class="method"]' 'const fn new<const host: bool = true>()'
13+
pub struct Foo(usize);
14+
15+
impl Foo {
16+
pub const fn new() -> Foo {
17+
Foo(0)
18+
}
19+
}

0 commit comments

Comments
 (0)