Skip to content

Commit

Permalink
Rollup merge of rust-lang#93094 - Enselic:check-for-enum-tuple-struct…
Browse files Browse the repository at this point in the history
…-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 rust-lang#92945.
  • Loading branch information
matthiaskrgr committed Jan 20, 2022
2 parents b1a405d + ab239cc commit 6cdd2e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/rustdoc-json/enums/variant_struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions src/test/rustdoc-json/enums/variant_tuple_struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}

0 comments on commit 6cdd2e5

Please sign in to comment.