about summary refs log tree commit diff
path: root/tests/rustdoc/assoc-fns.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc/assoc-fns.rs')
-rw-r--r--tests/rustdoc/assoc-fns.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/rustdoc/assoc-fns.rs b/tests/rustdoc/assoc-fns.rs
new file mode 100644
index 00000000000..6ffbebc3d27
--- /dev/null
+++ b/tests/rustdoc/assoc-fns.rs
@@ -0,0 +1,13 @@
+// Basic testing for associated functions (in traits, trait impls & inherent impls).
+
+//@ has assoc_fns/trait.Trait.html
+pub trait Trait {
+    //@ has - '//*[@id="tymethod.required"]' 'fn required(first: i32, second: &str)'
+    fn required(first: i32, second: &str);
+
+    //@ has - '//*[@id="method.provided"]' 'fn provided(only: ())'
+    fn provided(only: ()) {}
+
+    //@ has - '//*[@id="tymethod.params_are_unnamed"]' 'fn params_are_unnamed(_: i32, _: u32)'
+    fn params_are_unnamed(_: i32, _: u32);
+}