summaryrefslogtreecommitdiff
path: root/src/hir_conv/resolve_ufcs.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-09-12 10:52:40 +0800
committerJohn Hodge <tpg@mutabah.net>2016-09-12 10:52:40 +0800
commitd711bdac7f85a10a346933b4ad4a87fc52c95504 (patch)
tree99f838ce950db8314824917061e2d3f662defa1a /src/hir_conv/resolve_ufcs.cpp
parent6fe8cd798e8fca593c1b1d4048fee7a6607e8a98 (diff)
downloadmrust-d711bdac7f85a10a346933b4ad4a87fc52c95504.tar.gz
Resolve UFCS - (minor) Debug messages and commenting
Diffstat (limited to 'src/hir_conv/resolve_ufcs.cpp')
-rw-r--r--src/hir_conv/resolve_ufcs.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/hir_conv/resolve_ufcs.cpp b/src/hir_conv/resolve_ufcs.cpp
index 73bf863e..459c6e24 100644
--- a/src/hir_conv/resolve_ufcs.cpp
+++ b/src/hir_conv/resolve_ufcs.cpp
@@ -1,7 +1,10 @@
/*
- * Resolve unkown UFCS traits into inherent or trait
+ * MRustC - Rust Compiler
+ * - By John Hodge (Mutabah/thePowersGang)
*
- * HACK - Will likely be replaced with a proper typeck pass
+ * hir_conv/resolve_ufcs.cpp
+ * - Resolve unkown UFCS traits into inherent or trait
+ * - HACK: Will likely be replaced with a proper typeck pass (no it won't)
*/
#include "main_bindings.hpp"
#include <hir/hir.hpp>
@@ -288,9 +291,8 @@ namespace {
void visit_path(::HIR::Path& p, ::HIR::Visitor::PathContext pc) override
{
- auto sp = Span();
+ static Span sp;
- DEBUG("p = " << p);
TU_IFLET(::HIR::Path::Data, p.m_data, UfcsUnknown, e,
TRACE_FUNCTION_F("UfcsUnknown - p=" << p);
@@ -327,7 +329,7 @@ namespace {
else {
// 1. Search for applicable inherent methods (COMES FIRST!)
if( m_crate.find_type_impls(*e.type, [&](const auto& t)->const auto& { return t; }, [&](const auto& impl) {
- DEBUG("- matched inherent impl " << *e.type);
+ DEBUG("- matched inherent impl" << impl.m_params.fmt_args() << " " << impl.m_type);
// Search for item in this block
switch( pc )
{