about summary refs log tree commit diff
path: root/src/librustc
diff options
context:
space:
mode:
authorAndreas Molzer <andreas.molzer@gmx.de>2019-08-14 02:26:18 +0200
committerAndreas Molzer <andreas.molzer@gmx.de>2019-08-21 10:55:16 +0200
commit7b941e368fac6612eacf3423eac0149ef5ca3bb3 (patch)
tree81cf11511dd8fa49993f9e5d59fad833559966f1 /src/librustc
parentd8c5bc7ec6ea2501bdbd2853551aa83175d6e8d0 (diff)
downloadrust-7b941e368fac6612eacf3423eac0149ef5ca3bb3.tar.gz
rust-7b941e368fac6612eacf3423eac0149ef5ca3bb3.zip
Expose encapsulated undef mask as immutable
Diffstat (limited to 'src/librustc')
-rw-r--r--src/librustc/mir/interpret/allocation.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/librustc/mir/interpret/allocation.rs b/src/librustc/mir/interpret/allocation.rs
index bfbfffeb3b8..d3f87f16313 100644
--- a/src/librustc/mir/interpret/allocation.rs
+++ b/src/librustc/mir/interpret/allocation.rs
@@ -143,6 +143,11 @@ impl<Tag, Extra> Allocation<Tag, Extra> {
     pub fn inspect_with_undef_and_ptr_outside_interpreter(&self, range: Range<usize>) -> &[u8] {
         &self.bytes[range]
     }
+
+    /// View the undef mask.
+    pub fn undef_mask(&self) -> &UndefMask {
+        &self.undef_mask
+    }
 }
 
 impl<'tcx> rustc_serialize::UseSpecializedDecodable for &'tcx Allocation {}