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