Skip to content

Commit 6cdd2e5

Browse files
authored
Rollup merge of #93094 - Enselic:check-for-enum-tuple-struct-fields, r=CraftSpider
src/test/rustdoc-json: Check for `struct_field`s in `variant_tuple_struct.rs` The presence of `struct_field`s is being checked for already in `variant_struct.rs`. We should also check for them in `variant_tuple_struct.rs`. This PR is one small step towards resolving #92945.
2 parents b1a405d + ab239cc commit 6cdd2e5

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/test/rustdoc-json/enums/variant_struct.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// @has - "$.index[*][?(@.name=='EnumStruct')].kind" \"enum\"
33
pub enum EnumStruct {
44
// @has - "$.index[*][?(@.name=='VariantS')].inner.variant_kind" \"struct\"
5-
// @has - "$.index[*][?(@.name=='x')]"
6-
// @has - "$.index[*][?(@.name=='y')]"
5+
// @has - "$.index[*][?(@.name=='x')].kind" \"struct_field\"
6+
// @has - "$.index[*][?(@.name=='y')].kind" \"struct_field\"
77
VariantS {
88
x: u32,
99
y: String,

src/test/rustdoc-json/enums/variant_tuple_struct.rs

+2
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22
// @has - "$.index[*][?(@.name=='EnumTupleStruct')].kind" \"enum\"
33
pub enum EnumTupleStruct {
44
// @has - "$.index[*][?(@.name=='VariantA')].inner.variant_kind" \"tuple\"
5+
// @has - "$.index[*][?(@.name=='0')].kind" \"struct_field\"
6+
// @has - "$.index[*][?(@.name=='1')].kind" \"struct_field\"
57
VariantA(u32, String),
68
}

0 commit comments

Comments
 (0)