We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fb9dfa8 commit fd59b62Copy full SHA for fd59b62
library/core/src/task/wake.rs
@@ -181,6 +181,9 @@ pub struct Context<'a> {
181
// are contravariant while return-position lifetimes are
182
// covariant).
183
_marker: PhantomData<fn(&'a ()) -> &'a ()>,
184
+ // Ensure `Context` is `!Send` and `!Sync` in order to allow
185
+ // for future `!Send` and / or `!Sync` fields.
186
+ _marker2: PhantomData<*mut ()>,
187
}
188
189
impl<'a> Context<'a> {
@@ -190,7 +193,7 @@ impl<'a> Context<'a> {
190
193
#[must_use]
191
194
#[inline]
192
195
pub const fn from_waker(waker: &'a Waker) -> Self {
- Context { waker, _marker: PhantomData }
196
+ Context { waker, _marker: PhantomData, _marker2: PhantomData }
197
198
199
/// Returns a reference to the [`Waker`] for the current task.
0 commit comments