summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/hir_conv/bind.cpp4
-rw-r--r--src/hir_conv/expand_type.cpp4
-rw-r--r--src/hir_expand/closures.cpp2
-rw-r--r--src/hir_typeck/helpers.hpp2
-rw-r--r--src/mir/from_hir.cpp4
-rw-r--r--src/mir/main_bindings.hpp2
-rw-r--r--src/trans/codegen_mmir.cpp1
-rw-r--r--src/trans/mangling.hpp2
8 files changed, 11 insertions, 10 deletions
diff --git a/src/hir_conv/bind.cpp b/src/hir_conv/bind.cpp
index f8a06013..5418da85 100644
--- a/src/hir_conv/bind.cpp
+++ b/src/hir_conv/bind.cpp
@@ -319,7 +319,7 @@ namespace {
}
}
}
- void visit_params(::HIR::GenericParams& params)
+ void visit_params(::HIR::GenericParams& params) override
{
static Span sp;
for(auto& bound : params.m_bounds)
@@ -422,7 +422,7 @@ namespace {
upper_visitor(uv)
{}
- void visit_generic_path(::HIR::Visitor::PathContext pc, ::HIR::GenericPath& p)
+ void visit_generic_path(::HIR::Visitor::PathContext pc, ::HIR::GenericPath& p) override
{
upper_visitor.visit_generic_path(p, pc);
}
diff --git a/src/hir_conv/expand_type.cpp b/src/hir_conv/expand_type.cpp
index 6802cf22..dcdf79bd 100644
--- a/src/hir_conv/expand_type.cpp
+++ b/src/hir_conv/expand_type.cpp
@@ -208,11 +208,11 @@ public:
{}
// TODO: Use the other visitors.
- void visit_path(::HIR::Visitor::PathContext pc, ::HIR::Path& p)
+ void visit_path(::HIR::Visitor::PathContext pc, ::HIR::Path& p) override
{
upper_visitor.visit_path(p, pc);
}
- void visit_generic_path(::HIR::Visitor::PathContext pc, ::HIR::GenericPath& p)
+ void visit_generic_path(::HIR::Visitor::PathContext pc, ::HIR::GenericPath& p) override
{
upper_visitor.visit_generic_path(p, pc);
}
diff --git a/src/hir_expand/closures.cpp b/src/hir_expand/closures.cpp
index 8a90c037..a0814e49 100644
--- a/src/hir_expand/closures.cpp
+++ b/src/hir_expand/closures.cpp
@@ -647,7 +647,7 @@ namespace {
//node.m_res_type = ::HIR::TypeRef( node.m_obj_path.clone() );
DEBUG("-- Object name: " << node.m_obj_path);
::HIR::TypeRef closure_type = ::HIR::TypeRef( ::HIR::GenericPath(node.m_obj_path.m_path.clone(), mv$(impl_path_params)) );
- closure_type.m_data.as_Path().binding = ::HIR::TypeRef::TypePathBinding::make_Struct({ &closure_struct_ref });
+ closure_type.m_data.as_Path().binding = ::HIR::TypeRef::TypePathBinding::make_Struct(&closure_struct_ref);
// - Args
::std::vector< ::HIR::Pattern> args_pat_inner;
diff --git a/src/hir_typeck/helpers.hpp b/src/hir_typeck/helpers.hpp
index 335875a5..58688d6e 100644
--- a/src/hir_typeck/helpers.hpp
+++ b/src/hir_typeck/helpers.hpp
@@ -187,7 +187,7 @@ public:
/// Expand any located associated types in the input, operating in-place and returning the result
::HIR::TypeRef expand_associated_types(const Span& sp, ::HIR::TypeRef input) const {
expand_associated_types_inplace(sp, input, LList<const ::HIR::TypeRef*>());
- return mv$(input);
+ return input;
}
const ::HIR::TypeRef& expand_associated_types(const Span& sp, const ::HIR::TypeRef& input, ::HIR::TypeRef& tmp) const {
diff --git a/src/mir/from_hir.cpp b/src/mir/from_hir.cpp
index c2b80202..dc3b78a7 100644
--- a/src/mir/from_hir.cpp
+++ b/src/mir/from_hir.cpp
@@ -786,10 +786,10 @@ namespace {
{
DEBUG("- constant condition");
if( cond_lit->m_data.as_Boolean() ) {
- m_builder.end_block( ::MIR::Terminator::make_Goto({ true_branch }) );
+ m_builder.end_block( ::MIR::Terminator::make_Goto( true_branch ) );
}
else {
- m_builder.end_block( ::MIR::Terminator::make_Goto({ false_branch }) );
+ m_builder.end_block( ::MIR::Terminator::make_Goto( false_branch ) );
}
return ;
}
diff --git a/src/mir/main_bindings.hpp b/src/mir/main_bindings.hpp
index 9f160b12..cb4f3232 100644
--- a/src/mir/main_bindings.hpp
+++ b/src/mir/main_bindings.hpp
@@ -11,7 +11,7 @@
namespace HIR {
class Crate;
}
-struct TransList;
+class TransList;
extern void HIR_GenerateMIR(::HIR::Crate& crate);
extern void MIR_Dump(::std::ostream& sink, const ::HIR::Crate& crate);
diff --git a/src/trans/codegen_mmir.cpp b/src/trans/codegen_mmir.cpp
index 9755bb8b..3347606c 100644
--- a/src/trans/codegen_mmir.cpp
+++ b/src/trans/codegen_mmir.cpp
@@ -281,6 +281,7 @@ namespace
case ::HIR::StructMarkings::DstType::TraitObject:
return MetadataType::TraitObject;
}
+ throw "";
} break;
TU_ARM(te.binding, Union, tpb)
return MetadataType::None;
diff --git a/src/trans/mangling.hpp b/src/trans/mangling.hpp
index e1b6e35e..0d13d906 100644
--- a/src/trans/mangling.hpp
+++ b/src/trans/mangling.hpp
@@ -10,7 +10,7 @@
#include <debug.hpp>
namespace HIR {
- class SimplePath;
+ struct SimplePath;
class GenericPath;
class Path;
class TypeRef;