diff options
| author | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2020-03-17 16:07:29 -0700 |
|---|---|---|
| committer | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2020-03-17 16:09:53 -0700 |
| commit | 5b66f27ed34849a849bd93ce662bffeec2e56947 (patch) | |
| tree | 6676513e215aa86b48345512048784e2ab442123 /src/librustc_mir/interpret | |
| parent | 7ceebd98c6a15ae30e772eebb676b63ffa1a8122 (diff) | |
| download | rust-5b66f27ed34849a849bd93ce662bffeec2e56947.tar.gz rust-5b66f27ed34849a849bd93ce662bffeec2e56947.zip | |
Use `const_eval_limit` instead of infinite loop detector
Diffstat (limited to 'src/librustc_mir/interpret')
| -rw-r--r-- | src/librustc_mir/interpret/memory.rs | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/librustc_mir/interpret/memory.rs b/src/librustc_mir/interpret/memory.rs index 82a467c7ba9..03be71f6174 100644 --- a/src/librustc_mir/interpret/memory.rs +++ b/src/librustc_mir/interpret/memory.rs @@ -112,25 +112,6 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> HasDataLayout for Memory<'mir, 'tcx, M> } } -// FIXME: Really we shouldn't clone memory, ever. Snapshot machinery should instead -// carefully copy only the reachable parts. -impl<'mir, 'tcx, M> Clone for Memory<'mir, 'tcx, M> -where - M: Machine<'mir, 'tcx, PointerTag = (), AllocExtra = ()>, - M::MemoryExtra: Copy, - M::MemoryMap: AllocMap<AllocId, (MemoryKind<M::MemoryKinds>, Allocation)>, -{ - fn clone(&self) -> Self { - Memory { - alloc_map: self.alloc_map.clone(), - extra_fn_ptr_map: self.extra_fn_ptr_map.clone(), - dead_alloc_map: self.dead_alloc_map.clone(), - extra: self.extra, - tcx: self.tcx, - } - } -} - impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'mir, 'tcx, M> { pub fn new(tcx: TyCtxtAt<'tcx>, extra: M::MemoryExtra) -> Self { Memory { |
