diff options
author | John Hodge <tpg@mutabah.net> | 2016-12-03 10:04:06 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-12-03 10:04:06 +0800 |
commit | c6b54cafb06560d298b550a3711de642710f72e1 (patch) | |
tree | ed675784cc78b3c5062b003e0a369c8a4072d1f9 /src/mir/from_hir.cpp | |
parent | 3d4b0c406c11a2f98ea258e0762736fca119b76a (diff) | |
download | mrust-c6b54cafb06560d298b550a3711de642710f72e1.tar.gz |
MIR Gen - Fix missing type param for Place trait
Diffstat (limited to 'src/mir/from_hir.cpp')
-rw-r--r-- | src/mir/from_hir.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mir/from_hir.cpp b/src/mir/from_hir.cpp index a763b42c..9bc1c287 100644 --- a/src/mir/from_hir.cpp +++ b/src/mir/from_hir.cpp @@ -1271,8 +1271,8 @@ namespace { auto place_refmut__type = ::HIR::TypeRef::new_borrow(::HIR::BorrowType::Unique, place_type.clone()); auto place_refmut = m_builder.lvalue_or_temp(node.span(), place_refmut__type, ::MIR::RValue::make_Borrow({ 0, ::HIR::BorrowType::Unique, place.clone() })); auto fcn_ty_data = ::HIR::FunctionType { false, "", box$( place_raw__type.clone() ), ::make_vec1(mv$(place_refmut__type)) }; - // <typeof(place) as ops::Place>::pointer - auto fcn_path = ::HIR::Path(place_type.clone(), ::HIR::GenericPath(path_Place), "pointer", {}); + // <typeof(place) as ops::Place<T>>::pointer (T = inner) + auto fcn_path = ::HIR::Path(place_type.clone(), ::HIR::GenericPath(path_Place, ::HIR::PathParams(data_ty.clone())), "pointer"); auto fcn_val = m_builder.new_temporary( ::HIR::TypeRef(mv$(fcn_ty_data)) ); m_builder.push_stmt_assign( node.span(), fcn_val.clone(), ::MIR::RValue::make_Constant( ::MIR::Constant(mv$(fcn_path)) ) ); m_builder.end_block(::MIR::Terminator::make_Call({ |