Move the `data` and `vtable` methods from `RawWaker` to `Waker` · patricklam/verify-rust-std@2ec266b
@@ -60,22 +60,6 @@ impl RawWaker {
6060RawWaker { data, vtable }
6161}
626263-/// Gets the `data` pointer used to create this `RawWaker`.
64- #[inline]
65-#[must_use]
66-#[unstable(feature = "waker_getters", issue = "96992")]
67-pub fn data(&self) -> *const () {
68-self.data
69-}
70-71-/// Gets the `vtable` pointer used to create this `RawWaker`.
72- #[inline]
73-#[must_use]
74-#[unstable(feature = "waker_getters", issue = "96992")]
75-pub fn vtable(&self) -> &'static RawWakerVTable {
76-self.vtable
77-}
78-7963#[unstable(feature = "noop_waker", issue = "98286")]
8064const NOOP: RawWaker = {
8165const VTABLE: RawWakerVTable = RawWakerVTable::new(
@@ -565,12 +549,20 @@ impl Waker {
565549WAKER
566550}
567551568-/// Gets a reference to the underlying [`RawWaker`].
552+/// Gets the `data` pointer used to create this `Waker`.
569553 #[inline]
570554#[must_use]
571555#[unstable(feature = "waker_getters", issue = "96992")]
572-pub fn as_raw(&self) -> &RawWaker {
573-&self.waker
556+pub fn data(&self) -> *const () {
557+self.waker.data
558+}
559+560+/// Gets the `vtable` pointer used to create this `Waker`.
561+ #[inline]
562+#[must_use]
563+#[unstable(feature = "waker_getters", issue = "96992")]
564+pub fn vtable(&self) -> &'static RawWakerVTable {
565+self.waker.vtable
574566}
575567}
576568@@ -831,12 +823,20 @@ impl LocalWaker {
831823WAKER
832824}
833825834-/// Gets a reference to the underlying [`RawWaker`].
826+/// Gets the `data` pointer used to create this `LocalWaker`.
835827 #[inline]
836828#[must_use]
837829#[unstable(feature = "waker_getters", issue = "96992")]
838-pub fn as_raw(&self) -> &RawWaker {
839-&self.waker
830+pub fn data(&self) -> *const () {
831+self.waker.data
832+}
833+834+/// Gets the `vtable` pointer used to create this `LocalWaker`.
835+ #[inline]
836+#[must_use]
837+#[unstable(feature = "waker_getters", issue = "96992")]
838+pub fn vtable(&self) -> &'static RawWakerVTable {
839+self.waker.vtable
840840}
841841}
842842#[unstable(feature = "local_waker", issue = "118959")]