From 6d513f752f5434029a1c5084deb70c66f9464c3e Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Thu, 24 May 2018 14:06:06 +0200 Subject: [PATCH] Remove dead code --- src/librustc_mir/interpret/memory.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/librustc_mir/interpret/memory.rs b/src/librustc_mir/interpret/memory.rs index 4305d6dd7c5..912fc64d342 100644 --- a/src/librustc_mir/interpret/memory.rs +++ b/src/librustc_mir/interpret/memory.rs @@ -956,8 +956,6 @@ pub trait HasMemory<'a, 'mir, 'tcx: 'a + 'mir, M: Machine<'mir, 'tcx>> { } Value::ScalarPair(ptr, vtable) => Ok((ptr.into(), vtable.to_ptr()?)), - - Value::Scalar(Scalar::Bits { defined: 0, .. }) => err!(ReadUndefBytes), _ => bug!("expected ptr and vtable, got {:?}", value), } } @@ -980,7 +978,6 @@ pub trait HasMemory<'a, 'mir, 'tcx: 'a + 'mir, M: Machine<'mir, 'tcx>> { let len = val.to_bits(self.memory().pointer_size())?; Ok((ptr.into(), len as u64)) } - Value::Scalar(Scalar::Bits { defined: 0, .. }) => err!(ReadUndefBytes), Value::Scalar(_) => bug!("expected ptr and length, got {:?}", value), } }