diff options
| author | Ralf Jung <post@ralfj.de> | 2024-09-09 14:42:03 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-09-09 14:46:26 +0200 |
| commit | 65c70900ceda1c276c8eef1dad4e2c4f7a0756d0 (patch) | |
| tree | d14dddfc910871169e06c4b70cc911bb714dd176 /compiler/rustc_middle/src | |
| parent | 11bd99de8cc67683f215317dba55c91aaf3b5767 (diff) | |
| download | rust-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.rs | 1 |
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() |
