diff options
author | Jorge Aparicio <japaricious@gmail.com> | 2016-01-16 16:20:04 -0500 |
---|---|---|
committer | Yamakaky <yamakaky@yamaworld.fr> | 2016-03-10 13:55:20 +0100 |
commit | fa6f4407f3cd366c2390b390a6400db8a5c5a071 (patch) | |
tree | 567ef81dfaad5566086927068d6edc3ceb5b4048 /tests/test_struct.rs | |
parent | 782156edefbc57baf6ed24cca2b9d75bfc2e6c31 (diff) |
produce valid univariant enums
Instead of generating a enum like this:
```
pub enum Enum_CUipcMem_flags_enum {
CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS = 1,
}
```
Which is a compiler error because repr can't be used with univariant enums.
See https://github.com/rust-lang/rust/issues/10292
We generate a two variant enum with a dummy variant.
```
pub enum Enum_CUipcMem_flags_enum {
CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS = 1,
__DUMMY,
}
```
Which is the recommend workaround to the previous compiler error.
closes #255
Diffstat (limited to 'tests/test_struct.rs')
0 files changed, 0 insertions, 0 deletions