diff options
author | John Hodge <tpg@mutabah.net> | 2016-10-23 19:38:13 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-10-23 19:38:13 +0800 |
commit | ea3c657845313a274f99cc568ff4e3310e248e15 (patch) | |
tree | f8e381baa016bc499cb982bff6e8a2aebe392508 /src/ast/types.hpp | |
parent | 061b63d4fd88e5802927bd42d4b0fd8d5f6fc0f8 (diff) | |
download | mrust-ea3c657845313a274f99cc568ff4e3310e248e15.tar.gz |
AST+HIR - Add stubbed support for erased types (`impl Trait`)
Diffstat (limited to 'src/ast/types.hpp')
-rw-r--r-- | src/ast/types.hpp | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/ast/types.hpp b/src/ast/types.hpp index 79934e16..66f5797c 100644 --- a/src/ast/types.hpp +++ b/src/ast/types.hpp @@ -96,10 +96,10 @@ TAGGED_UNION(TypeData, None, (TraitObject, struct {
::std::vector<::std::string> hrls;
::std::vector<AST::Path> traits;
- // }),
- //(ImplTrait, struct {
- // ::std::vector<::std::string> hrls;
- // ::std::vector<AST::Path> traits;
+ }),
+ (ErasedType, struct {
+ ::std::vector<::std::string> hrls;
+ ::std::vector<AST::Path> traits;
})
);
@@ -112,18 +112,10 @@ public: virtual ~TypeRef();
- TypeRef(TypeRef&& other) noexcept:
- m_data( mv$(other.m_data) )
- {
- m_span = mv$(other.m_span);
- }
+ TypeRef(TypeRef&& other) noexcept = default;
+ TypeRef& operator=(TypeRef&& other) = default;
TypeRef(const TypeRef& other);
- TypeRef& operator=(TypeRef&& other) {
- m_data = mv$( other.m_data );
- m_span = mv$( other.m_span );
- return *this;
- }
TypeRef& operator=(const TypeRef& other) {
m_data = TypeRef(other).m_data;
return *this;
|