diff options
| author | Andreas Molzer <andreas.molzer@gmx.de> | 2019-08-14 02:26:18 +0200 |
|---|---|---|
| committer | Andreas Molzer <andreas.molzer@gmx.de> | 2019-08-21 10:55:16 +0200 |
| commit | 7b941e368fac6612eacf3423eac0149ef5ca3bb3 (patch) | |
| tree | 81cf11511dd8fa49993f9e5d59fad833559966f1 /src/librustc | |
| parent | d8c5bc7ec6ea2501bdbd2853551aa83175d6e8d0 (diff) | |
| download | rust-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.rs | 5 |
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 {} |
