diff --git a/tokio/src/runtime/context/scoped.rs b/tokio/src/runtime/context/scoped.rs index cc9465824..7b202a16c 100644 --- a/tokio/src/runtime/context/scoped.rs +++ b/tokio/src/runtime/context/scoped.rs @@ -6,8 +6,6 @@ pub(super) struct Scoped { pub(super) inner: Cell<*const T>, } -unsafe impl Sync for Scoped {} - impl Scoped { pub(super) const fn new() -> Scoped { Scoped { @@ -52,7 +50,7 @@ impl Scoped { if val.is_null() { f(None) } else { - unsafe { f(Some(&*(val as *const T))) } + unsafe { f(Some(&*val)) } } } }