diff options
author | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2023-02-22 20:51:29 +0000 |
---|---|---|
committer | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2023-02-23 18:42:36 +0000 |
commit | 025d2a147ff3dcde8f00ad5bc43b446837bd0240 (patch) | |
tree | c762a9797ea8144815ebbf3f722ecd9005c04b43 /compiler/rustc_abi | |
parent | b869e84e581612f4a30a4bca63bd9e90e9a17003 (diff) | |
download | rust-025d2a147ff3dcde8f00ad5bc43b446837bd0240.tar.gz |
Unify validity checks into a single query
Previously, there were two queries to check whether a type allows the
0x01 or zeroed bitpattern.
I am planning on adding a further initness to check, truly uninit for
MaybeUninit, which would make this three queries. This seems overkill
for such a small feature, so this PR unifies them into one.
Diffstat (limited to 'compiler/rustc_abi')
-rw-r--r-- | compiler/rustc_abi/src/lib.rs | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/compiler/rustc_abi/src/lib.rs b/compiler/rustc_abi/src/lib.rs index aa3a666b0b2..39574ca558f 100644 --- a/compiler/rustc_abi/src/lib.rs +++ b/compiler/rustc_abi/src/lib.rs @@ -1505,14 +1505,6 @@ pub struct PointeeInfo { pub safe: Option<PointerKind>, } -/// Used in `might_permit_raw_init` to indicate the kind of initialisation -/// that is checked to be valid -#[derive(Copy, Clone, Debug, PartialEq, Eq)] -pub enum InitKind { - Zero, - UninitMitigated0x01Fill, -} - impl LayoutS { /// Returns `true` if the layout corresponds to an unsized type. pub fn is_unsized(&self) -> bool { |