about summary refs log tree commit diff
path: root/src/test/rustdoc-json/structs/with_primitives.rs
diff options
context:
space:
mode:
authorRune Tynan <runetynan@gmail.com>2021-01-15 20:34:15 -0500
committerRune Tynan <runetynan@gmail.com>2021-01-19 14:24:25 -0500
commit7715656edd201b8c6bbddf0040f424c27e4db4df (patch)
treea3c2f7b0835fd4f3728d85755df926566ee29f36 /src/test/rustdoc-json/structs/with_primitives.rs
parentf09fb488f70c5965ec4f64453a6e681fbfcff56c (diff)
downloadrust-7715656edd201b8c6bbddf0040f424c27e4db4df.tar.gz
rust-7715656edd201b8c6bbddf0040f424c27e4db4df.zip
Add jsondocck tool, and use it for rustdoc JSON
Diffstat (limited to 'src/test/rustdoc-json/structs/with_primitives.rs')
-rw-r--r--src/test/rustdoc-json/structs/with_primitives.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/rustdoc-json/structs/with_primitives.rs b/src/test/rustdoc-json/structs/with_primitives.rs
new file mode 100644
index 00000000000..f948b61f79b
--- /dev/null
+++ b/src/test/rustdoc-json/structs/with_primitives.rs
@@ -0,0 +1,11 @@
+// @has with_primitives.json "$.index.['0:3'].name" \"WithPrimitives\"
+// @has - "$.index.['0:3'].visibility" \"public\"
+// @has - "$.index.['0:3'].kind" \"struct\"
+// @has - "$.index.['0:3'].inner.generics.params[0].name" \"\'a\"
+// @has - "$.index.['0:3'].inner.generics.params[0].kind" \"lifetime\"
+// @has - "$.index.['0:3'].inner.struct_type" \"plain\"
+// @has - "$.index.['0:3'].inner.fields_stripped" true
+pub struct WithPrimitives<'a> {
+    num: u32,
+    s: &'a str,
+}