diff options
author | John Hodge <tpg@ucc.asn.au> | 2019-06-22 14:32:49 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2019-06-22 14:32:49 +0800 |
commit | d896ae84c2a890bcb7b7700dd4b4a69620499642 (patch) | |
tree | a93dcca0ab9b9e69e40aa3075b1fd09b6382ab3b /src/hir/hir_ops.cpp | |
parent | 257db55be7db682f3a66747e4e308d003151c7df (diff) | |
download | mrust-d896ae84c2a890bcb7b7700dd4b4a69620499642.tar.gz |
HIR - Wrap impls in unique_ptr to keep pointer stability hack
Diffstat (limited to 'src/hir/hir_ops.cpp')
-rw-r--r-- | src/hir/hir_ops.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hir/hir_ops.cpp b/src/hir/hir_ops.cpp index d9b1fb07..a548b725 100644 --- a/src/hir/hir_ops.cpp +++ b/src/hir/hir_ops.cpp @@ -938,13 +938,13 @@ bool ::HIR::TraitImpl::overlaps_with(const Crate& crate, const ::HIR::TraitImpl& namespace { template<typename ImplType> - bool find_impls_list(const ::std::vector<ImplType>& impl_list, const ::HIR::TypeRef& type, ::HIR::t_cb_resolve_type ty_res, ::std::function<bool(const ImplType&)> callback) + bool find_impls_list(const typename ::HIR::Crate::ImplGroup<ImplType>::list_t& impl_list, const ::HIR::TypeRef& type, ::HIR::t_cb_resolve_type ty_res, ::std::function<bool(const ImplType&)> callback) { for(const auto& impl : impl_list) { - if( impl.matches_type(type, ty_res) ) + if( impl->matches_type(type, ty_res) ) { - if( callback(impl) ) + if( callback(*impl) ) { return true; } |