From 32bf5ca1bbabb1a1c695aaccbcc664bdc5fd711b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Wed, 24 Jul 2019 12:20:43 +0200 Subject: [PATCH] Don't insta-free in UniqueArc::assume_init. --- components/servo_arc/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/servo_arc/lib.rs b/components/servo_arc/lib.rs index 6e86ea7b5f3..1567fd3d421 100644 --- a/components/servo_arc/lib.rs +++ b/components/servo_arc/lib.rs @@ -144,7 +144,7 @@ impl UniqueArc> { #[inline] pub unsafe fn assume_init(this: Self) -> UniqueArc { UniqueArc(Arc { - p: this.0.p.cast(), + p: mem::ManuallyDrop::new(this).0.p.cast(), phantom: PhantomData, }) }