summaryrefslogtreecommitdiff
path: root/src/ast/path.hpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2015-04-03 22:57:27 +0800
committerJohn Hodge <tpg@mutabah.net>2015-04-03 22:57:27 +0800
commitc15006c15505ae785eb5447c055b8f9379e7fcde (patch)
treeafe7f047db2c5ab2e0ea7bbf7155522771be474a /src/ast/path.hpp
parent44e15eac335bfe8a78af259541be97d1f6653d7a (diff)
downloadmrust-c15006c15505ae785eb5447c055b8f9379e7fcde.tar.gz
Added partial support for #[derive()]
- Supports Debug on struct, and assumes compiling in libcore (for now)
Diffstat (limited to 'src/ast/path.hpp')
-rw-r--r--src/ast/path.hpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ast/path.hpp b/src/ast/path.hpp
index a2ca316b..390271fe 100644
--- a/src/ast/path.hpp
+++ b/src/ast/path.hpp
@@ -180,7 +180,10 @@ public:
struct TagLocal {};
Path(TagLocal, ::std::string name):
m_class(LOCAL),
- m_nodes({PathNode(name, {})})
+ m_nodes({PathNode( ::std::move(name), {} )})
+ {}
+ Path(::std::string name):
+ Path(TagLocal(), ::std::move(name))
{}
struct TagSuper {};
Path(TagSuper):