diff options
author | John Hodge (bugs) <tpg@mutabah.net> | 2017-03-04 18:12:49 +0800 |
---|---|---|
committer | John Hodge (bugs) <tpg@mutabah.net> | 2017-03-04 18:12:49 +0800 |
commit | c6fca061dd134068c831aefd88d9535a30f423ed (patch) | |
tree | 28fc4abecddf8514792a4cb748f1c6e5700274c1 /src/hir/type.hpp | |
parent | 03addc877bab648ccde022edec29f5b051ce7cb9 (diff) | |
download | mrust-c6fca061dd134068c831aefd88d9535a30f423ed.tar.gz |
Many many changes to allow compiling in visual studio (Community 2015)
Diffstat (limited to 'src/hir/type.hpp')
-rw-r--r-- | src/hir/type.hpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/hir/type.hpp b/src/hir/type.hpp index 3bf384a6..b5b10c4e 100644 --- a/src/hir/type.hpp +++ b/src/hir/type.hpp @@ -125,8 +125,8 @@ public: TAGGED_UNION(Data, Infer, (Infer, struct { - unsigned int index = ~0u; - InferClass ty_class = InferClass::None; + unsigned int index; + InferClass ty_class; }), (Diverge, struct {}), (Primitive, ::HIR::CoreType), @@ -210,6 +210,9 @@ public: static TypeRef new_diverge() { return TypeRef(Data::make_Diverge({})); } + static TypeRef new_infer(unsigned int idx = ~0u, InferClass ty_class = InferClass::None) { + return TypeRef(Data::make_Infer({idx, ty_class})); + } static TypeRef new_borrow(BorrowType bt, TypeRef inner) { return TypeRef(Data::make_Borrow({bt, box$(mv$(inner))})); } |