about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Schneider <github35764891676564198441@oli-obk.de>2018-05-22 16:18:43 +0200
committerOliver Schneider <github35764891676564198441@oli-obk.de>2018-05-24 20:49:37 +0200
commit1550fd212b2100c875f7fc2ccb9638c7ca7c709b (patch)
tree4372c58b9ca5230cf14f9f25813db514e71b64be
parentedbdf3d2635db5e456b3da72e51382b62810232b (diff)
downloadrust-1550fd212b2100c875f7fc2ccb9638c7ca7c709b.tar.gz
rust-1550fd212b2100c875f7fc2ccb9638c7ca7c709b.zip
Use the destination type size instead of the source type size
-rw-r--r--src/librustc_mir/interpret/cast.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_mir/interpret/cast.rs b/src/librustc_mir/interpret/cast.rs
index a2eede82acd..4efd89d3816 100644
--- a/src/librustc_mir/interpret/cast.rs
+++ b/src/librustc_mir/interpret/cast.rs
@@ -21,7 +21,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M> {
             Scalar::Bits { defined: 0, .. } => Ok(val),
             Scalar::Ptr(ptr) => self.cast_from_ptr(ptr, dest_ty),
             Scalar::Bits { bits, .. } => {
-                // TODO(oli-obk): impl scalar_size for floats and check defined bits here
+                // TODO(oli-obk): check defined bits here
                 match src_ty.sty {
                     TyFloat(fty) => self.cast_from_float(bits, fty, dest_ty),
                     _ => self.cast_from_int(bits, src_ty, dest_ty),