rust/0004-Disable-future-and-task-modules-because-they-contain.patch
2018-08-30 20:48:42 +02:00

69 lines
1.7 KiB
Diff

From 9db209102bf5f7850ccd456be0d5af09405ee950 Mon Sep 17 00:00:00 2001
From: bjorn3 <bjorn3@users.noreply.github.com>
Date: Thu, 30 Aug 2018 20:47:12 +0200
Subject: [PATCH] Disable future and task modules, because they contain unsized
types
---
src/libcore/lib.rs | 4 +++-
src/libcore/option.rs | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs
index 9b64b7d..9d2e230 100644
--- a/src/libcore/lib.rs
+++ b/src/libcore/lib.rs
@@ -188,7 +188,7 @@ pub mod cell;
pub mod char;
pub mod panic;
pub mod panicking;
-pub mod pin;
+//pub mod pin;
pub mod iter;
pub mod option;
pub mod raw;
@@ -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/option.rs b/src/libcore/option.rs
index 3879abb..16204a8 100644
--- a/src/libcore/option.rs
+++ b/src/libcore/option.rs
@@ -147,7 +147,7 @@
use iter::{FromIterator, FusedIterator, TrustedLen};
use {hint, mem, ops::{self, Deref}};
-use pin::PinMut;
+//use pin::PinMut;
// Note that this is not a lang item per se, but it has a hidden dependency on
// `Iterator`, which is one. The compiler assumes that the `next` method of
@@ -270,6 +270,7 @@ impl<T> Option<T> {
}
}
+ /*
/// Converts from `Option<T>` to `Option<PinMut<'_, T>>`
#[inline]
#[unstable(feature = "pin", issue = "49150")]
@@ -278,6 +279,7 @@ impl<T> Option<T> {
PinMut::get_mut_unchecked(self).as_mut().map(|x| PinMut::new_unchecked(x))
}
}
+ */
/////////////////////////////////////////////////////////////////////////
// Getting to contained values
--
2.11.0