summaryrefslogtreecommitdiff
path: root/src/hir/deserialise.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-09-28 21:25:05 +0800
committerJohn Hodge <tpg@mutabah.net>2016-09-28 21:25:05 +0800
commit4ab41041599feb41c38d5db46ce87e69e43374f3 (patch)
tree09280d1a309934b4001782ecae14e4a6e57c1e05 /src/hir/deserialise.cpp
parenta008403477341808ace1dda16051a373059658dd (diff)
downloadmrust-4ab41041599feb41c38d5db46ce87e69e43374f3.tar.gz
HIR - Support Variant literals
Diffstat (limited to 'src/hir/deserialise.cpp')
-rw-r--r--src/hir/deserialise.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/hir/deserialise.cpp b/src/hir/deserialise.cpp
index 4161cd09..fcfaeda1 100644
--- a/src/hir/deserialise.cpp
+++ b/src/hir/deserialise.cpp
@@ -910,6 +910,10 @@ namespace {
{
#define _(x, ...) case ::HIR::Literal::TAG_##x: return ::HIR::Literal::make_##x(__VA_ARGS__);
_(List, deserialise_vec< ::HIR::Literal>() )
+ _(Variant, {
+ static_cast<unsigned int>(read_count()),
+ deserialise_vec< ::HIR::Literal>()
+ })
_(Integer, read_u64() )
_(Float, read_double() )
_(BorrowOf, deserialise_path() )