about summary refs log tree commit diff
path: root/compiler/rustc_target/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2022-06-02 20:30:29 -0400
committerRalf Jung <post@ralfj.de>2022-06-05 10:13:34 -0400
commit47d11a8483a194dfbdf981f8f5cc0af3dfc54c5c (patch)
tree2e1e25154c3b4a77342afae11c070db987673083 /compiler/rustc_target/src
parent5e6bb83268518dcd74c96b5504f485b71e604e4c (diff)
downloadrust-47d11a8483a194dfbdf981f8f5cc0af3dfc54c5c.tar.gz
rust-47d11a8483a194dfbdf981f8f5cc0af3dfc54c5c.zip
interpret: better control over whether we read data with provenance, and implicit provenance stripping where possible
Diffstat (limited to 'compiler/rustc_target/src')
-rw-r--r--compiler/rustc_target/src/abi/mod.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_target/src/abi/mod.rs b/compiler/rustc_target/src/abi/mod.rs
index a771369c807..08ea4bb317b 100644
--- a/compiler/rustc_target/src/abi/mod.rs
+++ b/compiler/rustc_target/src/abi/mod.rs
@@ -746,6 +746,11 @@ impl Primitive {
     pub fn is_int(self) -> bool {
         matches!(self, Int(..))
     }
+
+    #[inline]
+    pub fn is_ptr(self) -> bool {
+        matches!(self, Pointer)
+    }
 }
 
 /// Inclusive wrap-around range of valid values, that is, if