summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-js/type-parameters.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc-js/type-parameters.rs')
-rw-r--r--tests/rustdoc-js/type-parameters.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/rustdoc-js/type-parameters.rs b/tests/rustdoc-js/type-parameters.rs
new file mode 100644
index 000000000..cda5e2617
--- /dev/null
+++ b/tests/rustdoc-js/type-parameters.rs
@@ -0,0 +1,15 @@
+#![crate_name="foo"]
+
+pub trait Some {}
+impl Some for () {}
+pub trait Other {}
+impl Other for () {}
+
+pub fn alef<T: Some>() -> T { loop {} }
+pub fn alpha() -> impl Some { }
+
+pub fn bet<T, U>(t: T) -> U { loop {} }
+pub fn beta<T>(t: T) -> T {}
+
+pub fn other<T: Other, U: Other>(t: T, u: U) { loop {} }
+pub fn alternate<T: Other>(t: T, u: T) { loop {} }