summaryrefslogtreecommitdiff
path: root/src/ast/path.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-05-14 10:59:18 +0800
committerJohn Hodge <tpg@mutabah.net>2016-05-14 10:59:18 +0800
commitf043a45fd21bab906cafc8964a892a64def65ec9 (patch)
tree63217329f82a015cff4fc6e78e37be606065ff64 /src/ast/path.cpp
parent432892ea9ce604b6d12d6b087ad6328eb335f70c (diff)
downloadmrust-f043a45fd21bab906cafc8964a892a64def65ec9.tar.gz
Remove requirement for all variants of tagged unions to be empty-constructable
Diffstat (limited to 'src/ast/path.cpp')
-rw-r--r--src/ast/path.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ast/path.cpp b/src/ast/path.cpp
index 484ac7b7..fb1e60cf 100644
--- a/src/ast/path.cpp
+++ b/src/ast/path.cpp
@@ -551,7 +551,7 @@ void operator%(::Deserialiser& s, Path::Class::Tag& c) {
s.item(n);
c = Path::Class::tag_from_str(n);
}
-#define _D(VAR, ...) case Class::TAG_##VAR: { m_class = Class::make_null_##VAR(); auto& ent = m_class.as_##VAR(); (void)&ent; __VA_ARGS__ } break;
+#define _D(VAR, ...) case Class::TAG_##VAR: { m_class = Class::make_##VAR({}); auto& ent = m_class.as_##VAR(); (void)&ent; __VA_ARGS__ } break;
::std::unique_ptr<Path> Path::from_deserialiser(Deserialiser& s) {
Path p;
s.item(p);