diff options
author | John Hodge <tpg@mutabah.net> | 2016-06-10 13:36:12 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-06-10 13:36:12 +0800 |
commit | 91248863bcfba4cc97ae1d3a196fd3f0b2512551 (patch) | |
tree | 4794c6453e57a24cf825a97b5016440e17d25ff6 /src/hir/type.cpp | |
parent | 2dfe4182cbd34a775b7bea479d54b789019c0204 (diff) | |
download | mrust-91248863bcfba4cc97ae1d3a196fd3f0b2512551.tar.gz |
HIR Typecheck - Hack up closure inferrence from Fn* traits
Diffstat (limited to 'src/hir/type.cpp')
-rw-r--r-- | src/hir/type.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/hir/type.cpp b/src/hir/type.cpp index 14424dab..489cf2a5 100644 --- a/src/hir/type.cpp +++ b/src/hir/type.cpp @@ -64,7 +64,16 @@ void ::HIR::TypeRef::fmt(::std::ostream& os) const os << e.path; ), (Generic, - os << e.name << "/*#" << e.binding << "*/"; + os << e.name << "/*"; + if( e.binding == 0xFFFF ) + os << ""; + else if( e.binding < 256 ) + os << "I:" << e.binding; + else if( e.binding < 512 ) + os << "M:" << (e.binding - 256); + else + os << e.binding; + os << "*/"; ), (TraitObject, os << "("; |