summaryrefslogtreecommitdiff
path: root/src/ast/path.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2015-08-24 22:50:49 +0800
committerJohn Hodge <tpg@mutabah.net>2015-08-24 22:50:49 +0800
commit7156d7d274184a085452a58ee3398d06024112b5 (patch)
tree874e8ca17500870c7aeb8e440e9d09d982284593 /src/ast/path.cpp
parentedbd5db807dd66876ad25e0b67a37a567187f076 (diff)
downloadmrust-7156d7d274184a085452a58ee3398d06024112b5.tar.gz
BROKEN - Halfway through a rewrite of type handling
Diffstat (limited to 'src/ast/path.cpp')
-rw-r--r--src/ast/path.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ast/path.cpp b/src/ast/path.cpp
index df00f147..9757e576 100644
--- a/src/ast/path.cpp
+++ b/src/ast/path.cpp
@@ -568,6 +568,17 @@ void Path::match_args(const Path& other, ::std::function<void(const char*,const
}
}
+bool Path::is_concrete() const
+{
+ for(const auto& n : this->nodes())
+ {
+ for(const auto& p : n.args())
+ if( not p.is_concrete() )
+ return false;
+ }
+ return true;
+}
+
/// Compare if two paths refer to the same non-generic item
///
/// - This doesn't handle the (impossible?) case where a generic might