summaryrefslogtreecommitdiff
path: root/src
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
parentf98c94abad3cb06906896087f44cb77f5cbf61e4 (diff)
downloadmrust-029bf073a1ec77a06d6c64ab7166c74f13486926.tar.gz
Minor cleanup
Diffstat (limited to 'src')
-rw-r--r--src/ast/ast.cpp8
-rw-r--r--src/convert/resolve.cpp2
2 files changed, 6 insertions, 4 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;
}
diff --git a/src/convert/resolve.cpp b/src/convert/resolve.cpp
index dd7e11d7..bb6a15e3 100644
--- a/src/convert/resolve.cpp
+++ b/src/convert/resolve.cpp
@@ -58,7 +58,7 @@ public:
void handle_params(AST::TypeParams& params) override;
virtual void handle_path(AST::Path& path, CASTIterator::PathMode mode) override;
- void handle_path_ufcs(AST::Path& path, CASTIterator::PathMode mode);
+ void handle_path_ufcs(AST::Path& path, CASTIterator::PathMode mode);
virtual void handle_type(TypeRef& type) override;
virtual void handle_expr(AST::ExprNode& node) override;