summaryrefslogtreecommitdiff
path: root/src/hir/from_ast.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@ucc.asn.au>2019-06-22 14:32:49 +0800
committerJohn Hodge <tpg@ucc.asn.au>2019-06-22 14:32:49 +0800
commitd896ae84c2a890bcb7b7700dd4b4a69620499642 (patch)
treea93dcca0ab9b9e69e40aa3075b1fd09b6382ab3b /src/hir/from_ast.cpp
parent257db55be7db682f3a66747e4e308d003151c7df (diff)
downloadmrust-d896ae84c2a890bcb7b7700dd4b4a69620499642.tar.gz
HIR - Wrap impls in unique_ptr to keep pointer stability hack
Diffstat (limited to 'src/hir/from_ast.cpp')
-rw-r--r--src/hir/from_ast.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/hir/from_ast.cpp b/src/hir/from_ast.cpp
index 0ad59d56..3976aa9d 100644
--- a/src/hir/from_ast.cpp
+++ b/src/hir/from_ast.cpp
@@ -1677,7 +1677,7 @@ void LowerHIR_Module_Impls(const ::AST::Module& ast_mod, ::HIR::Crate& hir_crat
}
// Sorted later on
- hir_crate.m_trait_impls[mv$(trait_name)].generic.push_back( ::HIR::TraitImpl {
+ hir_crate.m_trait_impls[mv$(trait_name)].generic.push_back(box$(::HIR::TraitImpl {
mv$(params),
mv$(trait_args),
mv$(type),
@@ -1688,7 +1688,7 @@ void LowerHIR_Module_Impls(const ::AST::Module& ast_mod, ::HIR::Crate& hir_crat
mv$(types),
LowerHIR_SimplePath(Span(), ast_mod.path())
- } );
+ }));
}
else if( impl.def().type().m_data.is_None() )
{
@@ -1697,14 +1697,14 @@ void LowerHIR_Module_Impls(const ::AST::Module& ast_mod, ::HIR::Crate& hir_crat
else
{
auto type = LowerHIR_Type(impl.def().type());
- hir_crate.m_marker_impls[mv$(trait_name)].generic.push_back(::HIR::MarkerImpl {
+ hir_crate.m_marker_impls[mv$(trait_name)].generic.push_back(box$(::HIR::MarkerImpl {
mv$(params),
mv$(trait_args),
true,
mv$(type),
LowerHIR_SimplePath(Span(), ast_mod.path())
- } );
+ }));
}
}
else
@@ -1751,14 +1751,14 @@ void LowerHIR_Module_Impls(const ::AST::Module& ast_mod, ::HIR::Crate& hir_crat
}
// Sorted later on
- hir_crate.m_type_impls.generic.push_back( ::HIR::TypeImpl {
+ hir_crate.m_type_impls.generic.push_back( box$(::HIR::TypeImpl {
mv$(params),
mv$(type),
mv$(methods),
mv$(constants),
LowerHIR_SimplePath(Span(), ast_mod.path())
- } );
+ }) );
}
}
for( const auto& i : ast_mod.items() )
@@ -1773,14 +1773,14 @@ void LowerHIR_Module_Impls(const ::AST::Module& ast_mod, ::HIR::Crate& hir_crat
auto trait_args = mv$(trait.m_params);
// Sorting done later
- hir_crate.m_marker_impls[mv$(trait_name)].generic.push_back(::HIR::MarkerImpl {
+ hir_crate.m_marker_impls[mv$(trait_name)].generic.push_back(box$(::HIR::MarkerImpl {
mv$(params),
mv$(trait_args),
false,
mv$(type),
LowerHIR_SimplePath(Span(), ast_mod.path())
- } );
+ }) );
}
}