1
Fork 0

Simplify Misc casts (still incorrect).

This commit is contained in:
Scott Olson 2016-03-19 11:07:19 -06:00
parent 20f152296a
commit 6a000b37cc

View file

@ -536,14 +536,10 @@ impl<'a, 'tcx: 'a, 'arena> Interpreter<'a, 'tcx, 'arena> {
}
Misc => {
if pointee_type(src_ty).is_some() && pointee_type(dest_ty).is_some() {
// FIXME(tsion): Wrong for fat pointers.
self.memory.copy(src, dest, 8)
} else {
// FIXME(tsion): Wrong for almost everything.
self.memory.copy(src, dest, 8)
// panic!("can't handle cast: {:?}", rvalue);
}
// FIXME(tsion): Wrong for almost everything.
let size = dest_repr.size();
self.memory.copy(src, dest, size)
// panic!("can't handle cast: {:?}", rvalue);
}
_ => panic!("can't handle cast: {:?}", rvalue),