rust/library/std/src
bors 32cbc65e6b Auto merge of #77380 - fusion-engineering-forks:unbox-the-mutex, r=dtolnay
Unbox mutexes and condvars on some platforms

Both mutexes and condition variables contained a Box containing the actual os-specific object. This was done because moving these objects may cause undefined behaviour on some platforms.

However, this is not needed on Windows[1], Wasm[2], cloudabi[2], and 'unsupported'[3], were the box was only needlessly making them less efficient.

This change gets rid of the box on those platforms.

On those platforms, `Condvar` can no longer verify it is only used with one `Mutex`, as mutexes no longer have a stable address. This was addressed and considered acceptable in #76932.

[1]\: https://docs.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-initializesrwlock
[2]\: These are just a single atomic integer together with futex wait/wake calls/instructions.
[3]\: The `unsupported` platform doesn't support multiple threads at all.
2020-10-04 06:48:17 +00:00
..
backtrace std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
collections Rollup merge of #75377 - canova:map_debug_impl, r=dtolnay 2020-10-03 00:31:04 +02:00
env std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
error std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
f32 std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
f64 std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
ffi Implement destructuring for all aggregates and for references 2020-09-20 13:28:18 +02:00
fs std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
io Optimize set_{panic,print}(None). 2020-09-27 16:04:25 +02:00
lazy std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
memchr std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
net Rollup merge of #76304 - CDirkx:const-ip, r=ecstatic-morse 2020-09-25 02:29:30 +02:00
num std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
os library/std: Set OS raw type definitions for sparc-unknown-linux-gnu 2020-09-28 00:39:57 +02:00
panic review: fix nits and move panic safety tests to the correct place 2020-09-25 23:10:24 +02:00
path std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
prelude Fix incorrect link in prelude 2020-09-02 17:38:21 -04:00
process std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
sync Disable condvar::two_mutexes test on non-unix platforms. 2020-10-02 09:47:08 +02:00
sys Auto merge of #77380 - fusion-engineering-forks:unbox-the-mutex, r=dtolnay 2020-10-04 06:48:17 +00:00
sys_common Auto merge of #77380 - fusion-engineering-forks:unbox-the-mutex, r=dtolnay 2020-10-04 06:48:17 +00:00
thread Rollup merge of #77147 - fusion-engineering-forks:static-mutex, r=dtolnay 2020-10-02 08:25:15 +09:00
time std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
alloc.rs Rename AllocErr to AllocError 2020-09-28 14:51:03 -04:00
ascii.rs Convert many files to intra-doc links 2020-09-02 17:37:40 -04:00
backtrace.rs std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
env.rs Improve docs for std::env::args() 2020-09-04 14:00:09 -07:00
error.rs Rename AllocErr to AllocError 2020-09-28 14:51:03 -04:00
f32.rs std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
f64.rs std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
fs.rs Convert many files to intra-doc links 2020-09-02 17:37:40 -04:00
future.rs Fix stabilization marker for future_readiness_fns 2020-09-15 23:12:08 +02:00
keyword_docs.rs Improve wording for const pointers 2020-09-01 19:44:20 -07:00
lazy.rs Simplify SyncOnceCell's take and drop. 2020-09-12 14:00:38 +02:00
lib.rs Rollup merge of #77264 - fusion-engineering-forks:skip-local-stdio, r=dtolnay 2020-10-03 00:31:14 +02:00
macros.rs Add missing links 2020-08-22 20:23:50 -07:00
memchr.rs std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
num.rs std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
panic.rs review: fix nits and move panic safety tests to the correct place 2020-09-25 23:10:24 +02:00
panicking.rs Abort when catch_unwind catches a foreign exception 2020-08-27 21:08:30 +01:00
path.rs Fix is_absolute on WASI 2020-09-30 13:12:25 +01:00
primitive_docs.rs Add doc alias for pointer primitive 2020-09-26 11:21:24 +02:00
process.rs Add accessors to Command. 2020-09-26 18:58:38 -07:00
rt.rs Prevent __rust_begin_short_backtrace frames from being tail-call optimised away 2020-08-07 19:31:25 +01:00
time.rs Split sys_common::Mutex in StaticMutex and MovableMutex. 2020-09-27 10:05:56 +02:00