summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-json/structs/with_generics.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc-json/structs/with_generics.rs')
-rw-r--r--tests/rustdoc-json/structs/with_generics.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/rustdoc-json/structs/with_generics.rs b/tests/rustdoc-json/structs/with_generics.rs
new file mode 100644
index 000000000..00474800a
--- /dev/null
+++ b/tests/rustdoc-json/structs/with_generics.rs
@@ -0,0 +1,14 @@
+use std::collections::HashMap;
+
+// @is "$.index[*][?(@.name=='WithGenerics')].visibility" \"public\"
+// @is "$.index[*][?(@.name=='WithGenerics')].kind" \"struct\"
+// @is "$.index[*][?(@.name=='WithGenerics')].inner.generics.params[0].name" \"T\"
+// @is "$.index[*][?(@.name=='WithGenerics')].inner.generics.params[0].kind.type.bounds" []
+// @is "$.index[*][?(@.name=='WithGenerics')].inner.generics.params[1].name" \"U\"
+// @is "$.index[*][?(@.name=='WithGenerics')].inner.generics.params[1].kind.type.bounds" []
+// @is "$.index[*][?(@.name=='WithGenerics')].inner.kind.plain.fields_stripped" true
+// @is "$.index[*][?(@.name=='WithGenerics')].inner.kind.plain.fields" []
+pub struct WithGenerics<T, U> {
+ stuff: Vec<T>,
+ things: HashMap<U, U>,
+}