rust/src/libstd
bors 4f99f37b7e Auto merge of #50880 - glandium:oom, r=SimonSapin
OOM handling changes

As discussed in https://github.com/rust-lang/rust/issues/49668#issuecomment-384893456 and subsequent.

This does have codegen implications. Even without the hooks, and with a handler that ignores the arguments, the compiler doesn't eliminate calling `rust_oom` with the `Layout`. Even if it managed to eliminate that, with the hooks, I don't know if the compiler would be able to figure out it can skip it if the hook is never set.

A couple implementation notes:
- I went with explicit enums rather than bools because it makes it clearer in callers what is being requested.
- I didn't know what `feature` to put the hook setting functions behind. (and surprisingly, the compile went through without any annotation on the functions)
- There's probably some bikeshedding to do on the naming.

Cc: @Simonsapin, @sfackler
2018-05-30 11:35:00 +00:00
..
collections Pass a Layout to oom 2018-05-30 05:35:48 +09:00
ffi Rollup merge of #50170 - burtonageo:more_cow_from, r=alexcrichton 2018-05-17 05:22:07 +08:00
io Deprecate Read::chars and char::decode_utf8 2018-04-15 08:18:00 +02:00
net Remove the deprecated std::net::{lookup_host,LookupHost} 2018-05-03 16:24:21 -07:00
os Add doc links to std::os extension traits 2018-04-14 15:32:24 -07:00
prelude Revert "Add TryFrom and TryInto to the prelude" 2018-03-30 15:54:05 +02:00
sync Update the Once docs to use Once::new 2018-05-24 14:09:42 +02:00
sys Auto merge of #50772 - nicokoch:fastcopy, r=alexcrichton 2018-05-29 23:49:11 +00:00
sys_common Rollup merge of #50550 - llogiq:fmt-result, r=petrochenkov 2018-05-12 07:32:27 -06:00
tests Update Cargo submodule 2018-03-11 10:59:28 -07:00
thread std: Minimize size of panicking on wasm 2018-04-13 07:03:00 -07:00
alloc.rs Add hooks allowing to override the oom behavior 2018-05-30 10:57:38 +09:00
ascii.rs Deprecate the AsciiExt trait in favor of inherent methods 2018-03-21 17:54:33 +01:00
build.rs rustc: Embed LLVM bitcode by default on iOS 2018-03-13 08:29:19 -07:00
Cargo.toml Update Cargo submodule 2018-03-11 10:59:28 -07:00
env.rs env: remove unwrap in examples in favor of try op 2018-05-14 12:56:18 +02:00
error.rs Suggest alternatives to Error::description() 2018-04-25 21:54:33 +01:00
f32.rs Switch to 1.26 bootstrap compiler 2018-05-17 08:47:25 -06:00
f64.rs Switch to 1.26 bootstrap compiler 2018-05-17 08:47:25 -06:00
fs.rs fs::write: Add example writing a &str 2018-05-12 08:39:05 -06:00
lib.rs Switch to 1.26 bootstrap compiler 2018-05-17 08:47:25 -06:00
macros.rs Add documentation about env! second argument 2018-05-24 20:08:10 +02:00
memchr.rs Fix inconsistent doc headings 2017-08-24 18:42:53 +02:00
num.rs Stabilize num::NonZeroU* 2018-05-16 19:11:31 +02:00
panic.rs Add more links in panic docs 2018-04-29 13:45:33 +02:00
panicking.rs Add more links in panic docs 2018-04-29 13:45:33 +02:00
path.rs Rollup merge of #50170 - burtonageo:more_cow_from, r=alexcrichton 2018-05-17 05:22:07 +08:00
primitive_docs.rs make std::str link into See also link 2018-05-09 18:30:32 -04:00
process.rs Rollup merge of #49461 - andreastt:child-kill-exited, r=Mark-Simulacrum 2018-04-24 11:56:59 +08:00
rt.rs Address review comments 2018-03-19 11:41:28 +09:00
time.rs Stabilize SystemTime::UNIX_EPOCH 2018-05-28 18:24:01 -06:00