diff options
| author | kennytm <kennytm@gmail.com> | 2018-03-16 05:36:46 +0800 |
|---|---|---|
| committer | kennytm <kennytm@gmail.com> | 2018-03-16 05:36:46 +0800 |
| commit | 90230ce3723f6e88f2f39e852a54837b80e59736 (patch) | |
| tree | f1ce610a776eb3daf941c67e38d4c5f2c4cc49aa /src/libstd | |
| parent | 55a0075a20ec064e7ec793656d564e13e9206836 (diff) | |
| parent | 9e64946bded0698c8c45d74526e6a8b5a514c4a1 (diff) | |
| download | rust-90230ce3723f6e88f2f39e852a54837b80e59736.tar.gz rust-90230ce3723f6e88f2f39e852a54837b80e59736.zip | |
Rollup merge of #49050 - snf:fix_oom_asmjs, r=alexcrichton
setting ABORTING_MALLOC=0 for asmjs backend This changes the behaviour of the allocator for asmjs backend. It will return NULL on OOM instead of aborting and let Rust choose the behaviour. Fixes #48968 and enables try_reserve (fallible allocation) in asmjs.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/collections/hash/map.rs | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index 5f5dec2dd4f..b18b38ec302 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -2755,11 +2755,8 @@ mod test_map { use cell::RefCell; use rand::{thread_rng, Rng}; use panic; - #[cfg(not(target_arch = "asmjs"))] use realstd::collections::CollectionAllocErr::*; - #[cfg(not(target_arch = "asmjs"))] use realstd::mem::size_of; - #[cfg(not(target_arch = "asmjs"))] use realstd::usize; #[test] @@ -3696,7 +3693,6 @@ mod test_map { assert_eq!(hm.len(), 0); } - #[cfg(not(target_arch = "asmjs"))] #[test] fn test_try_reserve() { |
