Skip to content

Commit 8ad1253

Browse files
pcwaltonpnkfelix
authored andcommitted
librustc added clone() calls to placate new by-value closure changes.
1 parent 715a0cd commit 8ad1253

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustc/middle/typeck/collect.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,8 @@ pub fn convert_struct(ccx: &CrateCtxt,
789789
// Enum-like.
790790
write_ty_to_tcx(tcx, ctor_id, selfty);
791791

792-
tcx.tcache.borrow_mut().insert(local_def(ctor_id), tpt);
792+
tcx.tcache.borrow_mut().insert(local_def(ctor_id),
793+
tpt.clone());
793794
} else if struct_def.fields.get(0).node.kind.is_unnamed() {
794795
// Tuple-like.
795796
let inputs: Vec<_> = struct_def.fields.iter().map(

0 commit comments

Comments
 (0)