Ensure enums generate a ref in owning structs
authorMatt Corallo <git@bluematt.me>
Wed, 8 Mar 2023 01:58:42 +0000 (01:58 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 8 Mar 2023 02:45:39 +0000 (02:45 +0000)
commitf800f9f0b95aa0f37671414397dbe7f876e298c8
treeea893bcfb0cd8650a6fd4e9ecad9b62fda9b3df0
parentb3a23d8dae8cc969fce9cad64991b393f74c94af
Ensure enums generate a ref in owning structs

Previously we only added a ref in an owning struct to an enum if
that enum contained a trait in a field. This isn't sufficient as an
enum could still contain a reference to an opaque object, which
needs to stick around as long as the enum exists.

For simplicity, simply add a ref in all cases as it seems to still
work in our own internal tests.
gen_type_mapping.py