diff options
author | Michael Wu <mwu@mozilla.com> | 2015-03-25 00:39:01 -0400 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2015-12-28 02:34:29 +0100 |
commit | 8bf4a40b4805a4743233855bad1d6506ce7d5492 (patch) | |
tree | 6914302a29d79532978006e0d3c67565820ffc2c /tests/headers/enum.h | |
parent | 6e33fbe74de0c38c68658cc51c6d8fe584691367 (diff) |
Translate C enums to Rust enums
Duplicate values end up as constants of the same enum type. Most enums
are repr(u32) as they should, except for those with attribute((packed)),
which are of the smallest representation possible.
Diffstat (limited to 'tests/headers/enum.h')
-rw-r--r-- | tests/headers/enum.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/headers/enum.h b/tests/headers/enum.h new file mode 100644 index 00000000..f2d301e7 --- /dev/null +++ b/tests/headers/enum.h @@ -0,0 +1,9 @@ +enum Foo { + Bar = 0, + Qux +}; + +enum Neg { + MinusOne = -1, + One = 1, +}; |