about summary refs log tree commit diff
path: root/tests/rustdoc-json/unions
diff options
context:
space:
mode:
authorLuca Palmieri <20745048+LukeMathWalker@users.noreply.github.com>2023-05-22 18:17:52 +0100
committerLuca Palmieri <20745048+LukeMathWalker@users.noreply.github.com>2023-05-22 18:22:08 +0100
commita5e51013753ca75c239403b47af1e605f5af2a64 (patch)
tree70c1c02274321292eebb8db3603ff83c80da08a2 /tests/rustdoc-json/unions
parent48ec50ae39d0ca0baa0e78f56c395dcc6d7ebd65 (diff)
downloadrust-a5e51013753ca75c239403b47af1e605f5af2a64.tar.gz
rust-a5e51013753ca75c239403b47af1e605f5af2a64.zip
Serialize all enums as externally tagged to guarantee compatibility with binary formats such as bincode or postcard
Diffstat (limited to 'tests/rustdoc-json/unions')
-rw-r--r--tests/rustdoc-json/unions/impl.rs6
-rw-r--r--tests/rustdoc-json/unions/union.rs8
2 files changed, 7 insertions, 7 deletions
diff --git a/tests/rustdoc-json/unions/impl.rs b/tests/rustdoc-json/unions/impl.rs
index 4454a69ecd1..7456892df1b 100644
--- a/tests/rustdoc-json/unions/impl.rs
+++ b/tests/rustdoc-json/unions/impl.rs
@@ -1,15 +1,15 @@
 #![no_std]
 
 // @is "$.index[*][?(@.name=='Ux')].visibility" \"public\"
-// @is "$.index[*][?(@.name=='Ux')].kind" \"union\"
+// @has "$.index[*][?(@.name=='Ux')].inner.union"
 pub union Ux {
     a: u32,
     b: u64
 }
 
 // @is "$.index[*][?(@.name=='Num')].visibility" \"public\"
-// @is "$.index[*][?(@.name=='Num')].kind" \"trait\"
+// @has "$.index[*][?(@.name=='Num')].inner.trait"
 pub trait Num {}
 
-// @count "$.index[*][?(@.name=='Ux')].inner.impls" 1
+// @count "$.index[*][?(@.name=='Ux')].inner.union.impls" 1
 impl Num for Ux {}
diff --git a/tests/rustdoc-json/unions/union.rs b/tests/rustdoc-json/unions/union.rs
index c9df2b81c4b..22b70e1ce8c 100644
--- a/tests/rustdoc-json/unions/union.rs
+++ b/tests/rustdoc-json/unions/union.rs
@@ -1,6 +1,6 @@
 // @has "$.index[*][?(@.name=='Union')].visibility" \"public\"
-// @has "$.index[*][?(@.name=='Union')].kind" \"union\"
-// @!has "$.index[*][?(@.name=='Union')].inner.struct_type"
+// @has "$.index[*][?(@.name=='Union')].inner.union"
+// @!has "$.index[*][?(@.name=='Union')].inner.union.struct_type"
 // @set Union = "$.index[*][?(@.name=='Union')].id"
 pub union Union {
     int: i32,
@@ -8,8 +8,8 @@ pub union Union {
 }
 
 
-// @is "$.index[*][?(@.name=='make_int_union')].inner.decl.output.kind" '"resolved_path"'
-// @is "$.index[*][?(@.name=='make_int_union')].inner.decl.output.inner.id" $Union
+// @has "$.index[*][?(@.name=='make_int_union')].inner.function.decl.output.resolved_path"
+// @is "$.index[*][?(@.name=='make_int_union')].inner.function.decl.output.resolved_path.id" $Union
 pub fn make_int_union(int: i32) -> Union {
     Union { int }
 }