- // By value bindings: load from the ptr into the matched value
- TrByValue => Load(bcx, binding_info.llmatch),
+ // By value mut binding for a copy type: load from the ptr
+ // into the matched value and copy to our alloca
+ TrByCopy(llbinding) => {
+ let llval = Load(bcx, binding_info.llmatch);
+ let datum = Datum::new(llval, binding_info.ty, Lvalue);
+ bcx = datum.store_to(bcx, llbinding);
+
+ llbinding
+ },
+
+ // By value move bindings: load from the ptr into the matched value
+ TrByMove => Load(bcx, binding_info.llmatch),