diff options
-rw-r--r-- | src/ast/path.cpp | 4 | ||||
-rw-r--r-- | src/hir_expand/erased_types.cpp | 2 | ||||
-rw-r--r-- | src/hir_typeck/expr_cs.cpp | 4 | ||||
-rw-r--r-- | src/include/span.hpp | 1 | ||||
-rw-r--r-- | src/include/synext_decorator.hpp | 4 | ||||
-rw-r--r-- | src/include/synext_macro.hpp | 4 |
6 files changed, 10 insertions, 9 deletions
diff --git a/src/ast/path.cpp b/src/ast/path.cpp index ebec5d5a..9976cae5 100644 --- a/src/ast/path.cpp +++ b/src/ast/path.cpp @@ -198,10 +198,10 @@ void Path::bind_enum_var(const Enum& ent, const ::std::string& name, const ::std unsigned int idx = it - ent.variants().begin(); DEBUG("Bound to enum variant '" << name << "' (#" << idx << ")"); - ::AST::PathBinding::Data_EnumVar tmp; + ::AST::PathBinding::Data_EnumVar tmp = {}; tmp.enum_ = &ent; tmp.idx = idx; - m_binding = PathBinding::make_EnumVar(tmp); + m_binding = PathBinding::make_EnumVar( mv$(tmp) ); } Path& Path::operator+=(const Path& other) diff --git a/src/hir_expand/erased_types.cpp b/src/hir_expand/erased_types.cpp index aca58207..f5fbe27a 100644 --- a/src/hir_expand/erased_types.cpp +++ b/src/hir_expand/erased_types.cpp @@ -16,6 +16,8 @@ const ::HIR::Function& HIR_Expand_ErasedType_GetFunction(const Span& sp, const S const ::HIR::Function* fcn_ptr = nullptr; switch(origin_path.m_data.tag()) { + case ::HIR::Path::Data::TAGDEAD: + BUG(Span(), "DEAD in ErasedType - " << origin_path); case ::HIR::Path::Data::TAG_UfcsUnknown: BUG(Span(), "UfcsUnknown in ErasedType - " << origin_path); case ::HIR::Path::Data::TAG_Generic: { diff --git a/src/hir_typeck/expr_cs.cpp b/src/hir_typeck/expr_cs.cpp index eb922414..9b5e4f5d 100644 --- a/src/hir_typeck/expr_cs.cpp +++ b/src/hir_typeck/expr_cs.cpp @@ -1643,9 +1643,7 @@ namespace { (Function, fix_param_count(sp, this->context, *e.type, false, node.m_path, ie.m_params, e.params); - const auto& fcn_params = e.params; - const auto& trait_params = e.trait.m_params; - auto monomorph_cb = monomorphise_type_get_cb(sp, &*e.type, &e.trait.m_params, &e.params); + auto monomorph_cb = monomorphise_type_get_cb(sp, &*e.type, &e.trait.m_params, &e.params); ::HIR::FunctionType ft { ie.m_unsafe, ie.m_abi, box$( monomorphise_type_with(sp, ie.m_return, monomorph_cb) ), diff --git a/src/include/span.hpp b/src/include/span.hpp index 11ffc005..ddb08ae3 100644 --- a/src/include/span.hpp +++ b/src/include/span.hpp @@ -30,6 +30,7 @@ struct ProtoSpan }; struct Span { + //::std::unique_ptr<Span> outer_span; // Expansion target for macros RcString filename; unsigned int start_line; diff --git a/src/include/synext_decorator.hpp b/src/include/synext_decorator.hpp index 4988c624..3374fc88 100644 --- a/src/include/synext_decorator.hpp +++ b/src/include/synext_decorator.hpp @@ -67,9 +67,9 @@ struct DecoratorDef ::std::string name; ::std::unique_ptr<ExpandDecorator> def; DecoratorDef(::std::string name, ::std::unique_ptr<ExpandDecorator> def): + prev(nullptr), name(::std::move(name)), - def(::std::move(def)), - prev(nullptr) + def(::std::move(def)) { Register_Synext_Decorator_Static(this); } diff --git a/src/include/synext_macro.hpp b/src/include/synext_macro.hpp index c109b56e..0abaf0fe 100644 --- a/src/include/synext_macro.hpp +++ b/src/include/synext_macro.hpp @@ -35,9 +35,9 @@ struct MacroDef ::std::string name; ::std::unique_ptr<ExpandProcMacro> def; MacroDef(::std::string name, ::std::unique_ptr<ExpandProcMacro> def) : + prev(nullptr), name(::std::move(name)), - def(::std::move(def)), - prev(nullptr) + def(::std::move(def)) { Register_Synext_Macro_Static(this); } |