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.
This commit is contained in:
Matthias Krüger 2022-01-20 23:37:37 +01:00 committed by GitHub
commit 6cdd2e510c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -2,8 +2,8 @@
// @has - "$.index[*][?(@.name=='EnumStruct')].kind" \"enum\"
pub enum EnumStruct {
// @has - "$.index[*][?(@.name=='VariantS')].inner.variant_kind" \"struct\"
// @has - "$.index[*][?(@.name=='x')]"
// @has - "$.index[*][?(@.name=='y')]"
// @has - "$.index[*][?(@.name=='x')].kind" \"struct_field\"
// @has - "$.index[*][?(@.name=='y')].kind" \"struct_field\"
VariantS {
x: u32,
y: String,

View File

@ -2,5 +2,7 @@
// @has - "$.index[*][?(@.name=='EnumTupleStruct')].kind" \"enum\"
pub enum EnumTupleStruct {
// @has - "$.index[*][?(@.name=='VariantA')].inner.variant_kind" \"tuple\"
// @has - "$.index[*][?(@.name=='0')].kind" \"struct_field\"
// @has - "$.index[*][?(@.name=='1')].kind" \"struct_field\"
VariantA(u32, String),
}