about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/heap.rs1
-rw-r--r--src/liballoc/rc.rs3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/liballoc/heap.rs b/src/liballoc/heap.rs
index f9936b7a16a..d1c8ab348d4 100644
--- a/src/liballoc/heap.rs
+++ b/src/liballoc/heap.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[cfg(stage0)]
 #[cfg(not(test))]
 use core::ptr::PtrExt;
 
diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs
index 115acd4a0ef..3692149db44 100644
--- a/src/liballoc/rc.rs
+++ b/src/liballoc/rc.rs
@@ -159,7 +159,10 @@ use core::nonzero::NonZero;
 use core::ops::{Deref, Drop};
 use core::option::Option;
 use core::option::Option::{Some, None};
+#[cfg(stage0)]
 use core::ptr::{self, PtrExt};
+#[cfg(not(stage0))]
+use core::ptr;
 use core::result::Result;
 use core::result::Result::{Ok, Err};
 use core::intrinsics::assume;