summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam Chodorowski <adam@chodorowski.com>2017-12-28 16:48:01 +0100
committerJohn Hodge (Mutabah) <acessdev@gmail.com>2017-12-29 08:37:10 +0800
commitd41143ff34ec44315cecf9413b9d4de399199447 (patch)
tree2451ce105512343e873127aced6bbe67da96d863 /src
parenta8bd3db91c77093e4bfdd62cf45d9313ac26b897 (diff)
downloadmrust-d41143ff34ec44315cecf9413b9d4de399199447.tar.gz
Fix enums with `repr(u64)`
Diffstat (limited to 'src')
-rw-r--r--src/hir/from_ast.cpp2
-rw-r--r--src/trans/codegen_c.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/hir/from_ast.cpp b/src/hir/from_ast.cpp
index fcd7dbf2..760339fe 100644
--- a/src/hir/from_ast.cpp
+++ b/src/hir/from_ast.cpp
@@ -927,7 +927,7 @@ namespace {
repr = ::HIR::Enum::Repr::U32;
}
else if( repr_str == "u64") {
- repr = ::HIR::Enum::Repr::U32;
+ repr = ::HIR::Enum::Repr::U64;
}
else if( repr_str == "usize") {
repr = ::HIR::Enum::Repr::Usize;
diff --git a/src/trans/codegen_c.cpp b/src/trans/codegen_c.cpp
index 59bb4921..cef90828 100644
--- a/src/trans/codegen_c.cpp
+++ b/src/trans/codegen_c.cpp
@@ -1203,7 +1203,7 @@ namespace {
m_of << "\tuint32_t TAG;\n";
break;
case ::HIR::Enum::Repr::U64:
- m_of << "\tuint32_t TAG;\n";
+ m_of << "\tuint64_t TAG;\n";
break;
}
m_of << "};\n";