diff options
author | John Hodge <tpg@ucc.asn.au> | 2017-05-05 14:40:20 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2017-05-05 14:40:20 +0800 |
commit | 932d569f69d8c67265f29fe1df334cc33e4f8dc5 (patch) | |
tree | d96cf8f023adc8ad0662f1d94b8ad77ae6d9372e /src/hir | |
parent | 65602ce5591a685b01a4ad19a1bbce8854201faf (diff) | |
download | mrust-932d569f69d8c67265f29fe1df334cc33e4f8dc5.tar.gz |
HIR Typecheck - Refactor of Unsize handling
Diffstat (limited to 'src/hir')
-rw-r--r-- | src/hir/deserialise.cpp | 1 | ||||
-rw-r--r-- | src/hir/hir.hpp | 1 | ||||
-rw-r--r-- | src/hir/serialise.cpp | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/src/hir/deserialise.cpp b/src/hir/deserialise.cpp index 19306a63..f4409310 100644 --- a/src/hir/deserialise.cpp +++ b/src/hir/deserialise.cpp @@ -586,6 +586,7 @@ namespace { m.dst_type = static_cast< ::HIR::TraitMarkings::DstType>( m_in.read_tag() ); m.coerce_unsized_index = m_in.read_count( ); m.unsized_field = m_in.read_count( ); + m.unsized_param = m_in.read_count(); // TODO: auto_impls return m; } diff --git a/src/hir/hir.hpp b/src/hir/hir.hpp index b7d116e3..51235c7d 100644 --- a/src/hir/hir.hpp +++ b/src/hir/hir.hpp @@ -177,6 +177,7 @@ struct TraitMarkings TraitObject, // (Trait) } dst_type; unsigned int unsized_field = ~0u; + unsigned int unsized_param = ~0u; /// `true` if there is a Copy impl bool is_copy = false; diff --git a/src/hir/serialise.cpp b/src/hir/serialise.cpp index e5264ae2..77e17dba 100644 --- a/src/hir/serialise.cpp +++ b/src/hir/serialise.cpp @@ -864,6 +864,7 @@ namespace { m_out.write_tag( static_cast<unsigned int>(m.dst_type) ); m_out.write_count( m.coerce_unsized_index ); m_out.write_count( m.unsized_field ); + m_out.write_count( m.unsized_param ); // TODO: auto_impls } |