about summary refs log tree commit diff
path: root/src/test/rustdoc-json
diff options
context:
space:
mode:
authorLoïc BRANSTETT <loic.branstett@epitech.eu>2021-09-26 18:22:07 +0200
committerLoïc BRANSTETT <loic.branstett@epitech.eu>2021-09-26 18:22:07 +0200
commit88ff75c6ccd44e6eef20157cbedfa15dc0f6a1b2 (patch)
tree3897435ec0e720ef2ea32ad7d50b38daac183a5f /src/test/rustdoc-json
parentf6e6ddc09d660fbfb4d483a9677d80768cc4e31c (diff)
downloadrust-88ff75c6ccd44e6eef20157cbedfa15dc0f6a1b2.tar.gz
rust-88ff75c6ccd44e6eef20157cbedfa15dc0f6a1b2.zip
Fix populate of union.impls
Diffstat (limited to 'src/test/rustdoc-json')
-rw-r--r--src/test/rustdoc-json/unions/impl.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/rustdoc-json/unions/impl.rs b/src/test/rustdoc-json/unions/impl.rs
new file mode 100644
index 00000000000..0388b4a8c3c
--- /dev/null
+++ b/src/test/rustdoc-json/unions/impl.rs
@@ -0,0 +1,15 @@
+#![no_std]
+
+// @has impl.json "$.index[*][?(@.name=='Ux')].visibility" \"public\"
+// @has - "$.index[*][?(@.name=='Ux')].kind" \"union\"
+pub union Ux {
+    a: u32,
+    b: u64
+}
+
+// @has - "$.index[*][?(@.name=='Num')].visibility" \"public\"
+// @has - "$.index[*][?(@.name=='Num')].kind" \"trait\"
+pub trait Num {}
+
+// @count - "$.index[*][?(@.name=='Ux')].inner.impls" 1
+impl Num for Ux {}