Skip to content

Commit

Permalink
Add regression tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Oct 12, 2023
1 parent 19149d1 commit 20363f4
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/rustdoc/const-fn-effects.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#![crate_name = "foo"]
#![feature(effects)]

// @has foo/fn.bar.html
// @has - '//pre[@class="rust item-decl"]' 'pub const fn bar<const host: bool = true>() -> '
/// foo
pub const fn bar() -> usize {
2
}

// @has foo/struct.Foo.html
// @has - '//*[@class="method"]' 'const fn new<const host: bool = true>()'
pub struct Foo(usize);

impl Foo {
pub const fn new() -> Foo {
Foo(0)
}
}

0 comments on commit 20363f4

Please sign in to comment.