summaryrefslogtreecommitdiff
path: root/src/ast/path.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2015-03-22 09:28:56 +0800
committerJohn Hodge <tpg@mutabah.net>2015-03-22 09:28:56 +0800
commit5aac662e859d10f42b541405fa0b8d14a1c1e2a8 (patch)
treea80f9e0d18a3fdd0c16a2244e204d29b474d0fe5 /src/ast/path.cpp
parent7944c18843cb82b21973521b6007a3d490e92318 (diff)
downloadmrust-5aac662e859d10f42b541405fa0b8d14a1c1e2a8.tar.gz
Hack in UFCS <Type as Trait> syntax
Diffstat (limited to 'src/ast/path.cpp')
-rw-r--r--src/ast/path.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ast/path.cpp b/src/ast/path.cpp
index 1f07d4b0..fae2642e 100644
--- a/src/ast/path.cpp
+++ b/src/ast/path.cpp
@@ -48,6 +48,12 @@ SERIALISE_TYPE(PathNode::, "PathNode", {
})
// --- AST::Path
+AST::Path::Path(TagUfcs, TypeRef type, TypeRef trait):
+ m_class(UFCS),
+ m_ufcs({::std::move(type), ::std::move(trait)} )
+{
+}
+
template<typename T>
typename ::std::vector<Item<T> >::const_iterator find_named(const ::std::vector<Item<T> >& vec, const ::std::string& name)
{