anchor.diff:      }
       final customMocksField = generateMocksValue.getField('customMocks');
       if (customMocksField != null && !customMocksField.isNull) {
  -      mockTargets.addAll(customMocksField
  -          .toListValue()!
  -          .map((mockSpec) => _mockTargetFromMockSpec(mockSpec, entryLib)));
  +      mockTargets.addAll(customMocksField.toListValue()!.mapIndexed(
  +          (index, mockSpec) =>
  +              _mockTargetFromMockSpec(mockSpec, entryLib, index)));
       }
       return mockTargets;
     }
   
     static _MockTarget _mockTargetFromMockSpec(
  -      DartObject mockSpec, LibraryElement entryLib,
  +      DartObject mockSpec, LibraryElement entryLib, int index,
         {bool nice = false}) {
       final mockSpecType = mockSpec.type as analyzer.InterfaceType;
       assert(mockSpecType.typeArguments.length == 1);
       final typeToMock = mockSpecType.typeArguments.single;
       if (typeToMock.isDynamic) {
         throw InvalidMockitoAnnotationException(
  -          'Mockito cannot mock `dynamic`; be sure to declare type '
  -          'arguments on MockSpec(), in @GenerateMocks.');
  +          'Mockito cannot mock `dynamic`; be sure to declare a type argument '
  +          'on the ${(index + 1).ordinal} MockSpec() in @GenerateMocks.');
       }
       var type = _determineDartType(typeToMock, entryLib.typeProvider);
   
  
positive.code:       method.parameters.any((p) => isPotentiallyNonNullable(p.type));
  }
  
  bool _needsOverrideForVoidStub(ExecutableElement method) =>
      method.returnType.isVoid || method.returnType.isFutureOfVoid;
  
negative.code:       throw InvalidMockitoAnnotationException(
            'The GenerateNiceMocks "mockSpecs" argument is missing');
      }
      return mockSpecsField.toListValue()!.mapIndexed((index, mockSpec) =>
          _mockTargetFromMockSpec(mockSpec, entryLib, index, nice: true));
    }
  
    static Map<String, ExecutableElement> _extractFallbackGenerators(
  