about summary refs log tree commit diff
path: root/compiler/rustc_middle/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-09-09 14:42:03 +0200
committerRalf Jung <post@ralfj.de>2024-09-09 14:46:26 +0200
commit65c70900ceda1c276c8eef1dad4e2c4f7a0756d0 (patch)
treed14dddfc910871169e06c4b70cc911bb714dd176 /compiler/rustc_middle/src
parent11bd99de8cc67683f215317dba55c91aaf3b5767 (diff)
downloadrust-65c70900ceda1c276c8eef1dad4e2c4f7a0756d0.tar.gz
rust-65c70900ceda1c276c8eef1dad4e2c4f7a0756d0.zip
union padding computation: add fast-path for ZST
Also avoid even tracking empty ranges, and add fast-path for arrays of scalars
Diffstat (limited to 'compiler/rustc_middle/src')
-rw-r--r--compiler/rustc_middle/src/ty/sty.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs
index 1f4f2c62d70..730ba265b19 100644
--- a/compiler/rustc_middle/src/ty/sty.rs
+++ b/compiler/rustc_middle/src/ty/sty.rs
@@ -1136,6 +1136,7 @@ impl<'tcx> Ty<'tcx> {
     }
 
     /// Tests if this is any kind of primitive pointer type (reference, raw pointer, fn pointer).
+    /// `Box` is *not* considered a pointer here!
     #[inline]
     pub fn is_any_ptr(self) -> bool {
         self.is_ref() || self.is_unsafe_ptr() || self.is_fn_ptr()