@@ -8,10 +8,8 @@ use crate::marker::{PhantomData, Unpin};
8
8
///
9
9
/// [vtable]: https://en.wikipedia.org/wiki/Virtual_method_table
10
10
///
11
- /// It consists of a data pointer and a [virtual function pointer table (vtable)][vtable] that
12
- /// customizes the behavior of the `RawWaker`.
13
- ///
14
- /// [`Waker`]: struct.Waker.html
11
+ /// It consists of a data pointer and a [virtual function pointer table (vtable)][vtable]
12
+ /// that customizes the behavior of the `RawWaker`.
15
13
#[ derive( PartialEq , Debug ) ]
16
14
#[ stable( feature = "futures_api" , since = "1.36.0" ) ]
17
15
pub struct RawWaker {
@@ -52,12 +50,10 @@ impl RawWaker {
52
50
/// The pointer passed to all functions inside the vtable is the `data` pointer
53
51
/// from the enclosing [`RawWaker`] object.
54
52
///
55
- /// The functions inside this struct are only intended be called on the `data`
53
+ /// The functions inside this struct are only intended to be called on the `data`
56
54
/// pointer of a properly constructed [`RawWaker`] object from inside the
57
55
/// [`RawWaker`] implementation. Calling one of the contained functions using
58
56
/// any other `data` pointer will cause undefined behavior.
59
- ///
60
- /// [`RawWaker`]: struct.RawWaker.html
61
57
#[ stable( feature = "futures_api" , since = "1.36.0" ) ]
62
58
#[ derive( PartialEq , Copy , Clone , Debug ) ]
63
59
pub struct RawWakerVTable {
@@ -68,9 +64,6 @@ pub struct RawWakerVTable {
68
64
/// required for this additional instance of a [`RawWaker`] and associated
69
65
/// task. Calling `wake` on the resulting [`RawWaker`] should result in a wakeup
70
66
/// of the same task that would have been awoken by the original [`RawWaker`].
71
- ///
72
- /// [`Waker`]: struct.Waker.html
73
- /// [`RawWaker`]: struct.RawWaker.html
74
67
clone : unsafe fn ( * const ( ) ) -> RawWaker ,
75
68
76
69
/// This function will be called when `wake` is called on the [`Waker`].
@@ -79,28 +72,20 @@ pub struct RawWakerVTable {
79
72
/// The implementation of this function must make sure to release any
80
73
/// resources that are associated with this instance of a [`RawWaker`] and
81
74
/// associated task.
82
- ///
83
- /// [`Waker`]: struct.Waker.html
84
- /// [`RawWaker`]: struct.RawWaker.html
85
75
wake : unsafe fn ( * const ( ) ) ,
86
76
87
77
/// This function will be called when `wake_by_ref` is called on the [`Waker`].
88
78
/// It must wake up the task associated with this [`RawWaker`].
89
79
///
90
80
/// This function is similar to `wake`, but must not consume the provided data
91
81
/// pointer.
92
- ///
93
- /// [`Waker`]: struct.Waker.html
94
- /// [`RawWaker`]: struct.RawWaker.html
95
82
wake_by_ref : unsafe fn ( * const ( ) ) ,
96
83
97
84
/// This function gets called when a [`RawWaker`] gets dropped.
98
85
///
99
86
/// The implementation of this function must make sure to release any
100
87
/// resources that are associated with this instance of a [`RawWaker`] and
101
88
/// associated task.
102
- ///
103
- /// [`RawWaker`]: struct.RawWaker.html
104
89
drop : unsafe fn ( * const ( ) ) ,
105
90
}
106
91
@@ -142,9 +127,6 @@ impl RawWakerVTable {
142
127
/// The implementation of this function must make sure to release any
143
128
/// resources that are associated with this instance of a [`RawWaker`] and
144
129
/// associated task.
145
- ///
146
- /// [`Waker`]: struct.Waker.html
147
- /// [`RawWaker`]: struct.RawWaker.html
148
130
#[ rustc_promotable]
149
131
#[ stable( feature = "futures_api" , since = "1.36.0" ) ]
150
132
// `rustc_allow_const_fn_ptr` is a hack that should not be used anywhere else
@@ -208,8 +190,6 @@ impl fmt::Debug for Context<'_> {
208
190
/// executor-specific wakeup behavior.
209
191
///
210
192
/// Implements [`Clone`], [`Send`], and [`Sync`].
211
- ///
212
- /// [`RawWaker`]: struct.RawWaker.html
213
193
#[ repr( transparent) ]
214
194
#[ stable( feature = "futures_api" , since = "1.36.0" ) ]
215
195
pub struct Waker {
@@ -275,9 +255,6 @@ impl Waker {
275
255
/// The behavior of the returned `Waker` is undefined if the contract defined
276
256
/// in [`RawWaker`]'s and [`RawWakerVTable`]'s documentation is not upheld.
277
257
/// Therefore this method is unsafe.
278
- ///
279
- /// [`RawWaker`]: struct.RawWaker.html
280
- /// [`RawWakerVTable`]: struct.RawWakerVTable.html
281
258
#[ inline]
282
259
#[ stable( feature = "futures_api" , since = "1.36.0" ) ]
283
260
pub unsafe fn from_raw ( waker : RawWaker ) -> Waker {
0 commit comments