summaryrefslogtreecommitdiff
path: root/src/hir/type.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-11-06 11:20:29 +0800
committerJohn Hodge <tpg@mutabah.net>2016-11-06 11:20:29 +0800
commitdff6b08430f3ff263fb7d890a9e207db94fa0f98 (patch)
treed75561f5c36c347fc714ed1764682fcb87717b0d /src/hir/type.cpp
parent37aadb483f18b24bd45ec242c11a19dc7b695e92 (diff)
downloadmrust-dff6b08430f3ff263fb7d890a9e207db94fa0f98.tar.gz
HIR Typecheck Expr - Fix leaking of a placeholder param
Diffstat (limited to 'src/hir/type.cpp')
-rw-r--r--src/hir/type.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/hir/type.cpp b/src/hir/type.cpp
index bee801e7..226dccf2 100644
--- a/src/hir/type.cpp
+++ b/src/hir/type.cpp
@@ -91,10 +91,12 @@ void ::HIR::TypeRef::fmt(::std::ostream& os) const
os << e.name << "/*";
if( e.binding == 0xFFFF )
os << "";
- else if( e.binding < 256 )
+ else if( e.binding < 1*256 )
os << "I:" << e.binding;
- else if( e.binding < 512 )
- os << "M:" << (e.binding - 256);
+ else if( e.binding < 2*256 )
+ os << "M:" << (e.binding % 256);
+ else if( e.binding < 3*256 )
+ os << "P:" << (e.binding % 256);
else
os << e.binding;
os << "*/";