summaryrefslogtreecommitdiff
path: root/src/ast/ast.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2015-05-23 14:34:56 +0800
committerJohn Hodge <tpg@mutabah.net>2015-05-23 14:34:56 +0800
commit029bf073a1ec77a06d6c64ab7166c74f13486926 (patch)
tree60d9a0bfc7e69baf2be174ef87b2d994457d9eaa /src/ast/ast.cpp
parentf98c94abad3cb06906896087f44cb77f5cbf61e4 (diff)
downloadmrust-029bf073a1ec77a06d6c64ab7166c74f13486926.tar.gz
Minor cleanup
Diffstat (limited to 'src/ast/ast.cpp')
-rw-r--r--src/ast/ast.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ast/ast.cpp b/src/ast/ast.cpp
index 63c228a6..8515f76e 100644
--- a/src/ast/ast.cpp
+++ b/src/ast/ast.cpp
@@ -267,18 +267,20 @@ bool Crate::find_impl(const Path& trait, const TypeRef& type, Impl** out_impl, :
{
DEBUG("trait = " << trait << ", type = " << type);
+ // If no params output provided, use a dud locaton
::std::vector<TypeRef> dud_params;
-
if(out_params)
*out_params = ::std::vector<TypeRef>();
else
out_params = &dud_params;
- if(out_impl) *out_impl = nullptr;
+ // Zero output
+ if(out_impl)
+ *out_impl = nullptr;
if( is_trait_implicit(trait) )
{
- if(out_impl) throw CompileError::BugCheck("find_impl - Asking for concrete impl of PhantomFn");
+ if(out_impl) throw CompileError::BugCheck("find_impl - Asking for concrete impl of a marker trait");
return true;
}