Skip to content

Commit 7afab9c

Browse files
authored
Merge pull request #50 from RalfJung/rustup
parts of the patch can be removed
2 parents afc82cb + 884d99e commit 7afab9c

File tree

2 files changed

+1
-61
lines changed

2 files changed

+1
-61
lines changed

rust-src.diff

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -11,63 +11,3 @@ index c306de3039f..eb5d5988768 100644
1111
// 64-bit only to be sure the allocator will fail fast on an impossible to satsify size
1212
#[cfg(target_pointer_width = "64")]
1313
fn try_oom_error() {
14-
diff --git a/library/core/src/task/wake.rs b/library/core/src/task/wake.rs
15-
index 8fc942dedc9..1b43c46bda5 100644
16-
--- a/library/core/src/task/wake.rs
17-
+++ b/library/core/src/task/wake.rs
18-
@@ -622,7 +622,7 @@ impl LocalWaker {
19-
///
20-
/// [`poll()`]: crate::future::Future::poll
21-
#[inline]
22-
- #[stable(feature = "futures_api", since = "1.36.0")]
23-
+ #[unstable(feature = "local_waker", issue = "118959")]
24-
pub fn wake(self) {
25-
// The actual wakeup call is delegated through a virtual function call
26-
// to the implementation which is defined by the executor.
27-
@@ -644,7 +644,7 @@ pub fn wake(self) {
28-
/// the case where an owned `Waker` is available. This method should be preferred to
29-
/// calling `waker.clone().wake()`.
30-
#[inline]
31-
- #[stable(feature = "futures_api", since = "1.36.0")]
32-
+ #[unstable(feature = "local_waker", issue = "118959")]
33-
pub fn wake_by_ref(&self) {
34-
// The actual wakeup call is delegated through a virtual function call
35-
// to the implementation which is defined by the executor.
36-
@@ -664,7 +664,7 @@ pub fn wake_by_ref(&self) {
37-
/// avoid cloning the waker when they would wake the same task anyway.
38-
#[inline]
39-
#[must_use]
40-
- #[stable(feature = "futures_api", since = "1.36.0")]
41-
+ #[unstable(feature = "local_waker", issue = "118959")]
42-
pub fn will_wake(&self, other: &LocalWaker) -> bool {
43-
self.waker == other.waker
44-
}
45-
@@ -676,7 +676,7 @@ pub fn will_wake(&self, other: &LocalWaker) -> bool {
46-
/// Therefore this method is unsafe.
47-
#[inline]
48-
#[must_use]
49-
- #[stable(feature = "futures_api", since = "1.36.0")]
50-
+ #[unstable(feature = "local_waker", issue = "118959")]
51-
#[rustc_const_unstable(feature = "const_waker", issue = "102012")]
52-
pub const unsafe fn from_raw(waker: RawWaker) -> LocalWaker {
53-
Self { waker }
54-
@@ -748,7 +748,18 @@ fn as_ref(&self) -> &LocalWaker {
55-
}
56-
}
57-
58-
-#[stable(feature = "futures_api", since = "1.36.0")]
59-
+#[unstable(feature = "local_waker", issue = "118959")]
60-
+impl Drop for LocalWaker {
61-
+ #[inline]
62-
+ fn drop(&mut self) {
63-
+ // SAFETY: This is safe because `LocalWaker::from_raw` is the only way
64-
+ // to initialize `drop` and `data` requiring the user to acknowledge
65-
+ // that the contract of `RawWaker` is upheld.
66-
+ unsafe { (self.waker.vtable.drop)(self.waker.data) }
67-
+ }
68-
+}
69-
+
70-
+#[unstable(feature = "local_waker", issue = "118959")]
71-
impl fmt::Debug for LocalWaker {
72-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
73-
let vtable_ptr = self.waker.vtable as *const RawWakerVTable;

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nightly-2024-03-10
1+
nightly-2024-03-11

0 commit comments

Comments
 (0)