summaryrefslogtreecommitdiff
path: root/src/ast
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2018-05-25 21:16:11 +0800
committerJohn Hodge <tpg@mutabah.net>2018-05-25 21:16:11 +0800
commit4f5053eb77644d69f75b3482a91752684d810bd9 (patch)
tree622dcae8e59524a62b4a3c6fbabc9550bd7c7ceb /src/ast
parentc9475a45f05f73fc669d784c1ca48c720077af31 (diff)
downloadmrust-4f5053eb77644d69f75b3482a91752684d810bd9.tar.gz
Resolve - Named lifetimes
Diffstat (limited to 'src/ast')
-rw-r--r--src/ast/types.hpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ast/types.hpp b/src/ast/types.hpp
index 2490c5e8..1c06593c 100644
--- a/src/ast/types.hpp
+++ b/src/ast/types.hpp
@@ -61,6 +61,8 @@ namespace AST {
}
void set_binding(uint16_t b) { assert(m_binding == BINDING_UNBOUND); m_binding = b; }
+ bool is_unbound() const { return m_binding == BINDING_UNBOUND; }
+ bool is_infer() const { return m_binding == BINDING_INFER; }
const Ident& name() const { return m_name; }
Ordering ord(const LifetimeRef& x) const { return ::ord(m_name.name, x.m_name.name); }