diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-10-12 15:55:23 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-10-12 15:55:23 +0000 |
| commit | 20363f40a938d05df68a775bacc9ca52c7490c7c (patch) | |
| tree | 0ce205b0244197227230e3046eed967573d8185f | |
| parent | 19149d1ea92f79874420f9268d891b11a79e1eec (diff) | |
| download | rust-20363f40a938d05df68a775bacc9ca52c7490c7c.tar.gz rust-20363f40a938d05df68a775bacc9ca52c7490c7c.zip | |
Add regression tests
| -rw-r--r-- | tests/rustdoc/const-fn-effects.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/rustdoc/const-fn-effects.rs b/tests/rustdoc/const-fn-effects.rs new file mode 100644 index 00000000000..49b4cd874e6 --- /dev/null +++ b/tests/rustdoc/const-fn-effects.rs @@ -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) + } +} |
