From a005b403ca375860160b105c1c1ccaa485f483ab Mon Sep 17 00:00:00 2001 From: Wim Looman Date: Fri, 17 Aug 2018 22:41:01 +0200 Subject: [PATCH] Make LocalWaker::new a const fn --- src/libcore/task/wake.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/task/wake.rs b/src/libcore/task/wake.rs index d770536ef4279..bcea6d364a519 100644 --- a/src/libcore/task/wake.rs +++ b/src/libcore/task/wake.rs @@ -119,7 +119,7 @@ impl LocalWaker { /// For this function to be used safely, it must be sound to call `inner.wake_local()` /// on the current thread. #[inline] - pub unsafe fn new(inner: NonNull) -> Self { + pub const unsafe fn new(inner: NonNull) -> Self { LocalWaker { inner } }