@@ -304,10 +304,10 @@ pub enum SubstructureFields<'a> {
304
304
/// variants has any fields).
305
305
AllFieldlessEnum ( & ' a ast:: EnumDef ) ,
306
306
307
- /// Matching variants of the enum: variant index, variant count, ast::Variant,
307
+ /// Matching variants of the enum: variant index, ast::Variant,
308
308
/// fields: the field name is only non-`None` in the case of a struct
309
309
/// variant.
310
- EnumMatching ( usize , usize , & ' a ast:: Variant , Vec < FieldInfo > ) ,
310
+ EnumMatching ( usize , & ' a ast:: Variant , Vec < FieldInfo > ) ,
311
311
312
312
/// The tag of an enum. The first field is a `FieldInfo` for the tags, as
313
313
/// if they were fields. The second field is the expression to combine the
@@ -1270,7 +1270,7 @@ impl<'a> MethodDef<'a> {
1270
1270
trait_,
1271
1271
type_ident,
1272
1272
nonselflike_args,
1273
- & EnumMatching ( 0 , 1 , & variants[ 0 ] , Vec :: new ( ) ) ,
1273
+ & EnumMatching ( 0 , & variants[ 0 ] , Vec :: new ( ) ) ,
1274
1274
) ;
1275
1275
}
1276
1276
}
@@ -1316,7 +1316,7 @@ impl<'a> MethodDef<'a> {
1316
1316
// expressions for referencing every field of every
1317
1317
// Self arg, assuming all are instances of VariantK.
1318
1318
// Build up code associated with such a case.
1319
- let substructure = EnumMatching ( index, variants . len ( ) , variant, fields) ;
1319
+ let substructure = EnumMatching ( index, variant, fields) ;
1320
1320
let arm_expr = self
1321
1321
. call_substructure_method (
1322
1322
cx,
@@ -1344,7 +1344,7 @@ impl<'a> MethodDef<'a> {
1344
1344
trait_,
1345
1345
type_ident,
1346
1346
nonselflike_args,
1347
- & EnumMatching ( 0 , variants . len ( ) , v, Vec :: new ( ) ) ,
1347
+ & EnumMatching ( 0 , v, Vec :: new ( ) ) ,
1348
1348
)
1349
1349
. into_expr ( cx, span) ,
1350
1350
)
0 commit comments