about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/coverage/spans.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-06-19 08:20:36 +0000
committerbors <bors@rust-lang.org>2022-06-19 08:20:36 +0000
commit15fc228d0d0a68b5ba565758fab13ed7f863fcea (patch)
treee7b2995928c0484ecc6c82a443a3533226aba222 /compiler/rustc_mir_transform/src/coverage/spans.rs
parent5fb8a3926619a18a2e31627e4cdf05f16530b0eb (diff)
parentedae4958556a6150841b9964b322d1e96e7a4586 (diff)
downloadrust-15fc228d0d0a68b5ba565758fab13ed7f863fcea.tar.gz
rust-15fc228d0d0a68b5ba565758fab13ed7f863fcea.zip
Auto merge of #97791 - m-ou-se:const-locks, r=m-ou-se
Make {Mutex, Condvar, RwLock}::new() const.

This makes it possible to have `static M: Mutex<_> = Mutex::new(..);` 🎉

Our implementations [on Linux](https://github.com/rust-lang/rust/pull/95035), [on Windows](https://github.com/rust-lang/rust/pull/77380), and various BSDs and some tier 3 platforms have already been using a non-allocating const-constructible implementation. As of https://github.com/rust-lang/rust/pull/97647, the remaining platforms (most notably macOS) now have a const-constructible implementation as well. This means we can finally make these functions publicly const.

Tracking issue: https://github.com/rust-lang/rust/issues/93740
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/spans.rs')
0 files changed, 0 insertions, 0 deletions