From bf268fe928eae8d85a868ccdbcc086ea033ae51c Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Tue, 13 Oct 2020 23:25:42 +0200 Subject: [PATCH] box mutex to get a movable mutex the commit avoid an alignement issue in Mutex implementation --- library/std/src/sys/hermit/mutex.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/std/src/sys/hermit/mutex.rs b/library/std/src/sys/hermit/mutex.rs index e12c2f4e00c50..f988a019cfedb 100644 --- a/library/std/src/sys/hermit/mutex.rs +++ b/library/std/src/sys/hermit/mutex.rs @@ -155,7 +155,7 @@ pub struct Mutex { inner: Spinlock, } -pub type MovableMutex = Mutex; +pub type MovableMutex = Box; unsafe impl Send for Mutex {} unsafe impl Sync for Mutex {}