void WriteEnum(FileWriter writer, PartialEnumFileInfo info, EnumType enumType) { if (enumType.IsFlags) { var attrs = new List <string>(); if (enumType.IsPublic) { attrs.Add(RustConstants.AttributeAllowMissingCopyImplementations); attrs.Add(RustConstants.AttributeAllowMissingDebugImplementations); } attrs.AddRange(info.Attributes.Where(a => a.StartsWith(RustConstants.FeaturePrefix))); constantsWriter.Write(writer, enumType.ToConstantsType(ConstantKind.UInt32), attrs.ToArray()); } else { WriteEnumCore(writer, info, enumType); } }
void WriteConstants(FileWriter writer, ConstantsType constantsType) => constantsWriter.Write(writer, constantsType, Array.Empty <string>());