diff options
Diffstat (limited to 'tests/rustdoc/const-fn-76501.rs')
| -rw-r--r-- | tests/rustdoc/const-fn-76501.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/rustdoc/const-fn-76501.rs b/tests/rustdoc/const-fn-76501.rs new file mode 100644 index 00000000000..4a7284f9851 --- /dev/null +++ b/tests/rustdoc/const-fn-76501.rs @@ -0,0 +1,20 @@ +// https://github.com/rust-lang/rust/issues/76501 +#![crate_name="foo"] + +// @has 'foo/fn.bloop.html' '//pre' 'pub const fn bloop() -> i32' +/// A useless function that always returns 1. +pub const fn bloop() -> i32 { + 1 +} + +/// A struct. +pub struct Struct {} + +impl Struct { + // @has 'foo/struct.Struct.html' '//*[@class="method"]' \ + // 'pub const fn blurp() -> i32' + /// A useless function that always returns 1. + pub const fn blurp() -> i32 { + 1 + } +} |
