]> git.lizzy.rs Git - rust.git/commit
Implement Clone, Eq and Hash for the heap and stack
authorDylan MacKenzie <ecstaticmorse@gmail.com>
Fri, 22 Jun 2018 04:40:14 +0000 (21:40 -0700)
committerDylan MacKenzie <ecstaticmorse@gmail.com>
Wed, 4 Jul 2018 21:36:07 +0000 (14:36 -0700)
commit6c0f502fe6bb54b285d66850ca8171e0c98091b0
treedf3bb64d941742ead834b5f05954f2ee8a7e2885
parentdb025c14eccb435ffb6bc5d4f834b4551589447b
Implement Clone, Eq and Hash for the heap and stack

I use a pattern binding in each custom impl, so that adding fields to
`Memory` or `Frame` will cause a compiler error instead of causing e.g.
`PartialEq` to become invalid. This may be too cute.

This adds several requirements to `Machine::MemoryData`. These can be
removed if we don't want this associated type to be part of the equality
of `Memory`.
src/librustc_mir/interpret/eval_context.rs
src/librustc_mir/interpret/machine.rs
src/librustc_mir/interpret/memory.rs
src/librustc_mir/interpret/place.rs