diff options
author | John Hodge <tpg@ucc.asn.au> | 2017-07-09 15:06:16 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2017-07-09 15:06:16 +0800 |
commit | 8c38465b21dfc0553417dc2f13071ed865a3d740 (patch) | |
tree | 2c0376a2e22388becc069948580b52a10bcea5d3 /src | |
parent | f0ae02d46648d0292a7ab326c4648c161376dceb (diff) | |
download | mrust-8c38465b21dfc0553417dc2f13071ed865a3d740.tar.gz |
HIR Deserialise - Remove another place where ordering is assumed
Diffstat (limited to 'src')
-rw-r--r-- | src/hir/deserialise.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/hir/deserialise.cpp b/src/hir/deserialise.cpp index 5870d269..21fc9cea 100644 --- a/src/hir/deserialise.cpp +++ b/src/hir/deserialise.cpp @@ -471,8 +471,11 @@ namespace { { switch( m_in.read_tag() ) { - case 0: - return ::HIR::TypeItem::make_Import({ deserialise_simplepath(), m_in.read_bool(), static_cast<unsigned int>(m_in.read_count()) }); + case 0: { + auto spath = deserialise_simplepath(); + auto is_variant = m_in.read_bool(); + return ::HIR::TypeItem::make_Import({ mv$(spath), is_variant, static_cast<unsigned int>(m_in.read_count()) }); + } case 1: return ::HIR::TypeItem( deserialise_module() ); case 2: @@ -493,8 +496,11 @@ namespace { { switch( m_in.read_tag() ) { - case 0: - return ::HIR::ValueItem::make_Import({ deserialise_simplepath(), m_in.read_bool(), static_cast<unsigned int>(m_in.read_count()) }); + case 0: { + auto spath = deserialise_simplepath(); + auto is_variant = m_in.read_bool(); + return ::HIR::ValueItem::make_Import({ mv$(spath), is_variant, static_cast<unsigned int>(m_in.read_count()) }); + } case 1: return ::HIR::ValueItem( deserialise_constant() ); case 2: |