Skip to content

Commit fa5ff3a

Browse files
Remove unused Clone impl for Memory
1 parent 840e323 commit fa5ff3a

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/librustc_mir/interpret/memory.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -114,24 +114,6 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> HasDataLayout for Memory<'mir, 'tcx, M>
114114
}
115115
}
116116

117-
// FIXME: Really we shouldn't clone memory, ever. Snapshot machinery should instead
118-
// carefully copy only the reachable parts.
119-
impl<'mir, 'tcx, M> Clone for Memory<'mir, 'tcx, M>
120-
where
121-
M: Machine<'mir, 'tcx, PointerTag = (), AllocExtra = (), MemoryExtra = ()>,
122-
M::MemoryMap: AllocMap<AllocId, (MemoryKind<M::MemoryKinds>, Allocation)>,
123-
{
124-
fn clone(&self) -> Self {
125-
Memory {
126-
alloc_map: self.alloc_map.clone(),
127-
extra_fn_ptr_map: self.extra_fn_ptr_map.clone(),
128-
dead_alloc_map: self.dead_alloc_map.clone(),
129-
extra: (),
130-
tcx: self.tcx,
131-
}
132-
}
133-
}
134-
135117
impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'mir, 'tcx, M> {
136118
pub fn new(tcx: TyCtxtAt<'tcx>, extra: M::MemoryExtra) -> Self {
137119
Memory {

0 commit comments

Comments
 (0)