From a9518c22d4a13c56252827f54ae149919cadbe63 Mon Sep 17 00:00:00 2001 From: Benjamin Davies Date: Thu, 1 Jun 2023 18:05:04 +1200 Subject: [PATCH] Document merge_generic_tags --- docs.md | 10 ++++++++++ template.toml | 1 + 2 files changed, 11 insertions(+) diff --git a/docs.md b/docs.md index d420f2dbe..676572f1b 100644 --- a/docs.md +++ b/docs.md @@ -900,6 +900,16 @@ derive_tagged_enum_copy_assignment = false # default: false private_default_tagged_enum_constructor = false +# Whether to only output a single tag enum for generic tagged enums. This only +# applies when generics are being monomorphized (i.e. not C++). +# +# For example, an enum monomorph `COption` would normally generate a tag enum +# `COption_u8_Tag`, but with this option enabled all monomorphs of `COption` will +# use the same tag enum, named `COption_Tag`. +# +# default: false +merge_generic_tags = false + diff --git a/template.toml b/template.toml index bc414290e..38d04366d 100644 --- a/template.toml +++ b/template.toml @@ -114,6 +114,7 @@ derive_tagged_enum_destructor = false derive_tagged_enum_copy_constructor = false enum_class = true private_default_tagged_enum_constructor = false +merge_generic_tags = false