aboutsummaryrefslogtreecommitdiff
path: root/patches/std.diff
blob: 8238bdd7758c0b32d13f639ffd09e2dc64522662 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
diff --git a/src/lib.rs b/src/lib.rs
index c85fb01..25b0444 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -56,7 +56,8 @@
 //! let checksum = crc16(checksum_range);
 //! ```
 
-#![no_std]
+// ANDROID: include standard library to build as a dynlib
+//#![no_std]
 #![cfg_attr(
     feature = "unstable_const",
     feature(
@@ -80,9 +81,9 @@ doctest!("../README.md");
 // This `use` statement enables the macros to use `$crate::mem`.
 // Doing this enables this crate to function under both std and no-std crates.
 #[doc(hidden)]
-pub use core::mem;
+pub use std::mem;  // ANDROID: use std instead of core, since we're not building wiht no-std.
 #[doc(hidden)]
-pub use core::ptr;
+pub use std::ptr;  // ANDROID: use std instead of core, since we're not building wiht no-std.
 
 #[macro_use]
 mod raw_field;
diff --git a/src/span_of.rs b/src/span_of.rs
index 0592dbd..369e5c6 100644
--- a/src/span_of.rs
+++ b/src/span_of.rs
@@ -155,7 +155,8 @@ macro_rules! span_of {
 
 #[cfg(test)]
 mod tests {
-    use core::mem;
+    // ANDROID: use std instead of core, since we're not building wiht no-std.
+    use std::mem;
 
     #[test]
     fn span_simple() {