From 5bc35b1852ea3b7871befeeeec7531107e147278 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Wed, 18 Mar 2015 00:20:52 +0100 Subject: [PATCH] filling-drop: switch `DTOR_NEEDED` and `DTOR_DONE` to non-trivial values. --- src/libcore/mem.rs | 2 +- src/librustc_trans/trans/adt.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs index e5b6c3f3472e..7fea029e02d8 100644 --- a/src/libcore/mem.rs +++ b/src/libcore/mem.rs @@ -334,7 +334,7 @@ macro_rules! repeat_u8_as_u64 { // But having the sign bit set is a pain, so 0x1d is probably better. // // And of course, 0x00 brings back the old world of zero'ing on drop. -#[cfg(not(stage0))] pub const POST_DROP_U8: u8 = 0x0; +#[cfg(not(stage0))] pub const POST_DROP_U8: u8 = 0x1d; #[cfg(not(stage0))] pub const POST_DROP_U32: u32 = repeat_u8_as_u32!(POST_DROP_U8); #[cfg(not(stage0))] pub const POST_DROP_U64: u64 = repeat_u8_as_u64!(POST_DROP_U8); diff --git a/src/librustc_trans/trans/adt.rs b/src/librustc_trans/trans/adt.rs index 9f90b5cea5f6..dddc2d2be48b 100644 --- a/src/librustc_trans/trans/adt.rs +++ b/src/librustc_trans/trans/adt.rs @@ -166,7 +166,7 @@ macro_rules! repeat_u8_as_u64 { (repeat_u8_as_u32!($name) as u64)) } } -pub const DTOR_NEEDED: u8 = 0x1; +pub const DTOR_NEEDED: u8 = 0xd4; pub const DTOR_NEEDED_U32: u32 = repeat_u8_as_u32!(DTOR_NEEDED); pub const DTOR_NEEDED_U64: u64 = repeat_u8_as_u64!(DTOR_NEEDED); #[allow(dead_code)] @@ -178,7 +178,7 @@ pub fn dtor_needed_usize(ccx: &CrateContext) -> usize { } } -pub const DTOR_DONE: u8 = 0x0; +pub const DTOR_DONE: u8 = 0x1d; pub const DTOR_DONE_U32: u32 = repeat_u8_as_u32!(DTOR_DONE); pub const DTOR_DONE_U64: u64 = repeat_u8_as_u64!(DTOR_DONE); #[allow(dead_code)]