about summary refs log tree commit diff
path: root/src/libstd/sys_common/remutex.rs
AgeCommit message (Collapse)AuthorLines
2020-07-27mv std libs to library/mark-224/+0
2020-03-20Fix abort-on-eprintln during process shutdownAlex Crichton-63/+51
This commit fixes an issue where if `eprintln!` is used in a TLS destructor it can accidentally cause the process to abort. TLS destructors are executed after `main` returns on the main thread, and at this point we've also deinitialized global `Lazy` values like those which store the `Stderr` and `Stdout` internals. This means that despite handling TLS not being accessible in `eprintln!`, we will fail due to not being able to call `stderr()`. This means that we'll double-panic quickly because panicking also attempt to write to stderr. The fix here is to reimplement the global stderr handle to avoid the need for destruction. This avoids the need for `Lazy` as well as the hidden panic inside of the `stderr` function. Overall this should improve the robustness of printing errors and/or panics in weird situations, since the `stderr` accessor should be infallible in more situations.
2019-12-22Format the worldMark Rousskov-17/+14
2019-03-31libstd: deny(elided_lifetimes_in_paths)Mazdak Farrokhzad-4/+6
2019-02-28libstd => 2018Taiki Endo-10/+10
2019-02-17Use more impl header lifetime elisionScott McMurray-4/+4
There are two big categories of changes in here - Removing lifetimes from common traits that can essentially never user a lifetime from an input (particularly `Drop` & `Debug`) - Forwarding impls that are only possible because the lifetime doesn't matter (like `impl<R: Read + ?Sized> Read for &mut R`) I omitted things that seemed like they could be more controversial, like the handful of iterators that have a `Item: 'static` despite the iterator having a lifetime or the `PartialEq` implementations where the flipped one cannot elide the lifetime.
2018-12-25Remove licensesMark Rousskov-10/+0
2018-07-02Make Stdio handle UnwindSafeEvan Simmons-0/+4
2018-05-07Add explanation for #[must_use] on mutex guardsManish Goregaokar-1/+1
2017-10-09Refactor to use `debug_struct` in several Debug implsMalo Jaffré-3/+10
Fixes #44771.
2016-11-01std: Move sys_common to libstd/sys_commonBrian Anderson-0/+236
Make the directory structure reflect the module structure. I've always found the existing structure confusing.