summaryrefslogtreecommitdiff
path: root/src/hir_conv/constant_evaluation.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-06-13 13:57:43 +0800
committerJohn Hodge <tpg@mutabah.net>2016-06-13 13:57:43 +0800
commit2dd9abe0cd5e9c2b6f8235af697332e063efc9aa (patch)
tree0ff8f71b001e0c133f3642c06932f915784a5f0b /src/hir_conv/constant_evaluation.cpp
parentb8ffa877896d09fa13a0c89aae41d9e9a5b736bb (diff)
downloadmrust-2dd9abe0cd5e9c2b6f8235af697332e063efc9aa.tar.gz
HIR - Fix name resolution of `Type::method` to search inherent then traits
Diffstat (limited to 'src/hir_conv/constant_evaluation.cpp')
-rw-r--r--src/hir_conv/constant_evaluation.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/hir_conv/constant_evaluation.cpp b/src/hir_conv/constant_evaluation.cpp
index fe1c46ca..286981f7 100644
--- a/src/hir_conv/constant_evaluation.cpp
+++ b/src/hir_conv/constant_evaluation.cpp
@@ -379,9 +379,12 @@ namespace {
}
}
- const_cast<HIR::ExprNode&>(*fcn.m_code).visit( *this );
- assert( ! m_rv.is_Invalid() );
- //TODO(node.span(), "exec const fn - " << node.m_path);
+ // Call by running the code directly
+ {
+ TRACE_FUNCTION_F("Call const fn " << node.m_path);
+ const_cast<HIR::ExprNode&>(*fcn.m_code).visit( *this );
+ assert( ! m_rv.is_Invalid() );
+ }
for(unsigned int i = 0; i < fcn.m_args.size(); i ++ )
{