summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc/const-fn-effects.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc/const-fn-effects.rs')
-rw-r--r--tests/rustdoc/const-fn-effects.rs19
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 000000000..7c19b4b2c
--- /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() -> '
+/// foo
+pub const fn bar() -> usize {
+ 2
+}
+
+// @has foo/struct.Foo.html
+// @has - '//*[@class="method"]' 'const fn new()'
+pub struct Foo(usize);
+
+impl Foo {
+ pub const fn new() -> Foo {
+ Foo(0)
+ }
+}