We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0cb7a0a commit f824373Copy full SHA for f824373
library/core/src/task/wake.rs
@@ -769,6 +769,14 @@ impl Clone for LocalWaker {
769
}
770
771
772
+#[unstable(feature = "local_waker", issue = "118959")]
773
+impl AsRef<LocalWaker> for Waker {
774
+ fn as_ref(&self) -> &LocalWaker {
775
+ // SAFETY: LocalWaker is just Waker without thread safety
776
+ unsafe { transmute(self) }
777
+ }
778
+}
779
+
780
#[stable(feature = "futures_api", since = "1.36.0")]
781
impl fmt::Debug for LocalWaker {
782
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
0 commit comments