summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2015-03-21 15:50:12 +0800
committerJohn Hodge <tpg@mutabah.net>2015-03-21 15:50:12 +0800
commit5c0e31a6adcb76887e3877de537cfd1c6cf2ffa0 (patch)
tree1f4d7126f8e838395cac23d40b76e1f3f9e7dabe /src
parent0d7cf4b1e052642642fea63c5f328b7fa994fd05 (diff)
downloadmrust-5c0e31a6adcb76887e3877de537cfd1c6cf2ffa0.tar.gz
Misc (warning suppression, planning trait methods in resolve)
Diffstat (limited to 'src')
-rw-r--r--src/ast/path.cpp2
-rw-r--r--src/ast/path.hpp1
-rw-r--r--src/dump_as_rust.cpp2
3 files changed, 5 insertions, 0 deletions
diff --git a/src/ast/path.cpp b/src/ast/path.cpp
index 338a0b15..25015ab7 100644
--- a/src/ast/path.cpp
+++ b/src/ast/path.cpp
@@ -157,6 +157,8 @@ void Path::resolve(const Crate& root_crate)
goto ret;
}
else if( is_sec_last ) {
+ m_binding_type = TRAIT_METHOD;
+ m_binding.trait_ = &it->data;
throw ParseError::Todo("Path::resolve() trait method");
}
else {
diff --git a/src/ast/path.hpp b/src/ast/path.hpp
index 00a1b439..db8b64b3 100644
--- a/src/ast/path.hpp
+++ b/src/ast/path.hpp
@@ -57,6 +57,7 @@ public:
TRAIT,
STRUCT_METHOD,
+ TRAIT_METHOD,
ENUM_VAR,
FUNCTION,
STATIC,
diff --git a/src/dump_as_rust.cpp b/src/dump_as_rust.cpp
index a1fac249..764f5a86 100644
--- a/src/dump_as_rust.cpp
+++ b/src/dump_as_rust.cpp
@@ -308,6 +308,8 @@ public:
switch(n.m_datatype)
{
case CORETYPE_INVAL: break;
+ case CORETYPE_BOOL:
+ break;
case CORETYPE_CHAR:
m_os << "'\\u" << ::std::hex << n.m_value << ::std::dec << "'";
break;