Give VariantData::Struct named fields, to clairfy recovered.
This commit is contained in:
parent
d165a38de0
commit
062845421b
4 changed files with 7 additions and 5 deletions
|
|
@ -436,7 +436,7 @@ impl LateLintPass<'_> for ItemNameRepetitions {
|
|||
{
|
||||
match item.kind {
|
||||
ItemKind::Enum(def, _) => check_variant(cx, self.enum_threshold, &def, item_name, item.span),
|
||||
ItemKind::Struct(VariantData::Struct(fields, _), _) => {
|
||||
ItemKind::Struct(VariantData::Struct { fields, .. }, _) => {
|
||||
check_fields(cx, self.struct_threshold, item, fields);
|
||||
},
|
||||
_ => (),
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ impl EarlyLintPass for ManualNonExhaustiveStruct {
|
|||
|
||||
if let ast::ItemKind::Struct(variant_data, _) = &item.kind {
|
||||
let (fields, delimiter) = match variant_data {
|
||||
ast::VariantData::Struct(fields, _) => (&**fields, '{'),
|
||||
ast::VariantData::Struct { fields, .. } => (&**fields, '{'),
|
||||
ast::VariantData::Tuple(fields, _) => (&**fields, '('),
|
||||
ast::VariantData::Unit(_) => return,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue