anchor.diff:        if (wireNameMapping.isEmpty) {
           // No wire names. Just use the enum names directly.
           return '''
  -class _\$${name}Serializer implements PrimitiveSerializer<$genericName> {
  +class $serializerImplName implements PrimitiveSerializer<$genericName> {
     @override
     final Iterable<Type> types = const <Type>[$name];
     @override
  
positive.code:          };''';
  
          return '''
  class _\$${name}Serializer implements PrimitiveSerializer<$genericName> {
    $toWire
    $fromWire
  
  
negative.code:   CompilationUnitElement get compilationUnit =>
        element.library.definingCompilationUnit;
  
    /// Returns the serializer class name for the generated implementation. If the manually
    /// maintained class is private then we ignore the underscore here, to avoid
    /// returning a class name starting `_$_`.
    @memoized
    String get serializerImplName {
      final unhidden = name.startsWith('_') ? name.substring(1) : name;
      return '_\$${unhidden}Serializer';
    }
  
    /// Returns the serializer instance name for the generated implementation,
    /// referenced by the user as a `static serializer` attribute.
    ///
    /// If the manually maintained class is private then we ignore the underscore here, to avoid
    /// returning a class name starting `_$_`.
    @memoized
    String get serializerInstanceName {
      final unhidden = name.startsWith('_') ? name.substring(1) : name;
      final camelCaseName =
          unhidden.substring(0, 1).toLowerCase() + unhidden.substring(1);
      return '_\$${camelCaseName}Serializer';
    }
  
    Iterable<String> computeErrors() {
      var result = <String>[];
  
      if (!serializerSettings.custom) {
        final expectedSerializerDeclaration =
            'static Serializer<$genericName> get serializer => ${serializerInstanceName};';
        // We used to recommend raw types; recommend the full type now, but still
        // allow raw types.
        final expectedSerializerDeclarationRaw =
            'static Serializer<$name> get serializer => ${serializerInstanceName};';
        if (serializerDeclaration != expectedSerializerDeclaration &&
            serializerDeclaration != expectedSerializerDeclarationRaw) {
          result.add('Declare $name.serializer as: '
  