diff options
-rw-r--r-- | src/ast/ast.cpp | 8 | ||||
-rw-r--r-- | src/convert/resolve.cpp | 2 |
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;
|