rust/0004-Disable-future-and-task-modules-because-they-contain.patch

63 lines
1.7 KiB
Diff
Raw Normal View History

2018-08-08 09:00:14 -05:00
From 439444eb7d5557daa5e8cfafd1317816fefdad70 Mon Sep 17 00:00:00 2001
From: bjorn3 <bjorn3@users.noreply.github.com>
Date: Wed, 8 Aug 2018 15:51:42 +0200
Subject: [PATCH] Disable future and task modules, because they contain unsized
types
---
src/libcore/lib.rs | 2 ++
src/libcore/mem.rs | 6 ++++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs
index 71fcff2..7dcbb4b 100644
--- a/src/libcore/lib.rs
+++ b/src/libcore/lib.rs
@@ -202,9 +202,11 @@ pub mod time;
pub mod unicode;
+/*
/* Async */
pub mod future;
pub mod task;
+*/
/* Heap memory allocator trait */
#[allow(missing_docs)]
diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs
index 642fffa..f5a22ab 100644
--- a/src/libcore/mem.rs
+++ b/src/libcore/mem.rs
@@ -18,12 +18,12 @@
use clone;
use cmp;
use fmt;
-use future::{Future, UnsafeFutureObj};
+//use future::{Future, UnsafeFutureObj};
use hash;
use intrinsics;
use marker::{Copy, PhantomData, Sized, Unpin, Unsize};
use ptr;
-use task::{Context, Poll};
+//use task::{Context, Poll};
use ops::{Deref, DerefMut, CoerceUnsized};
#[stable(feature = "rust1", since = "1.0.0")]
@@ -1148,6 +1148,7 @@ impl<'a, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<PinMut<'a, U>> for PinM
#[unstable(feature = "pin", issue = "49150")]
impl<'a, T: ?Sized> Unpin for PinMut<'a, T> {}
+/*
#[unstable(feature = "futures_api", issue = "50547")]
unsafe impl<'a, T, F> UnsafeFutureObj<'a, T> for PinMut<'a, F>
where F: Future<Output = T> + 'a
@@ -1162,3 +1163,4 @@ unsafe impl<'a, T, F> UnsafeFutureObj<'a, T> for PinMut<'a, F>
unsafe fn drop(_ptr: *mut ()) {}
}
+*/
--
2.15.2 (Apple Git-101.1)