From 029bf073a1ec77a06d6c64ab7166c74f13486926 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sat, 23 May 2015 14:34:56 +0800 Subject: Minor cleanup --- src/ast/ast.cpp | 8 +++++--- src/convert/resolve.cpp | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src') 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 dud_params; - if(out_params) *out_params = ::std::vector(); 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; -- cgit v1.2.3