diff options
| author | John Kugelman <john@kugelman.name> | 2021-10-10 18:22:40 -0400 |
|---|---|---|
| committer | John Kugelman <john@kugelman.name> | 2021-10-10 19:00:33 -0400 |
| commit | cf2bcd10ed28b169b8df74383c2a35a4ffbdcf40 (patch) | |
| tree | 87acd2edbff6d167abc4e8e70c702da9b9e350fa /library/core/src/task | |
| parent | 6928fafe06e4ab29317f75194e1bf67c119dccdc (diff) | |
| download | rust-cf2bcd10ed28b169b8df74383c2a35a4ffbdcf40.tar.gz rust-cf2bcd10ed28b169b8df74383c2a35a4ffbdcf40.zip | |
Add #[must_use] to from_value conversions
Diffstat (limited to 'library/core/src/task')
| -rw-r--r-- | library/core/src/task/wake.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/core/src/task/wake.rs b/library/core/src/task/wake.rs index b775e022a54..e1bbdfaef80 100644 --- a/library/core/src/task/wake.rs +++ b/library/core/src/task/wake.rs @@ -158,6 +158,7 @@ pub struct Context<'a> { impl<'a> Context<'a> { /// Create a new `Context` from a `&Waker`. #[stable(feature = "futures_api", since = "1.36.0")] + #[must_use] #[inline] pub fn from_waker(waker: &'a Waker) -> Self { Context { waker, _marker: PhantomData } @@ -251,6 +252,7 @@ impl Waker { /// in [`RawWaker`]'s and [`RawWakerVTable`]'s documentation is not upheld. /// Therefore this method is unsafe. #[inline] + #[must_use] #[stable(feature = "futures_api", since = "1.36.0")] pub unsafe fn from_raw(waker: RawWaker) -> Waker { Waker { waker } |
