Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
2b9ba46
fix indefinite article in cell.rs
petar-dambovaliev Dec 12, 2020
86a4b27
Increment `self.index` before calling `Iterator::self.a.__iterator_ge…
sdroege Feb 4, 2021
55ca27f
use rwlock for accessing ENV
the8472 Feb 6, 2021
406fd3a
silence dead code warnings on windows
the8472 Feb 7, 2021
c7d9bff
HWASan support
Jan 23, 2021
9c34c14
HWASan documentation
Feb 8, 2021
2200cf1
avoid &mut on the read path since it now allows concurrent readers
the8472 Feb 8, 2021
44abad5
introduce StaticRWLock wrapper to make methods safe
the8472 Feb 8, 2021
1d9ac3c
Fix const generics in GAT
BoxyUwU Feb 9, 2021
4fc181d
split guard into read and write types
the8472 Feb 9, 2021
471ed5f
Use ItemCtxt::to_ty
camsteffen Feb 10, 2021
883988b
RELEASES.md 1.50: Group platform support notes together
joshtriplett Feb 10, 2021
d3fea13
bootstrap: Locate llvm-dwp based on llvm-config bindir
dtolnay Feb 10, 2021
2c4337a
Comments :3
BoxyUwU Feb 10, 2021
0422745
Fix comment smol mistakes
BoxyUwU Feb 10, 2021
0ffa2da
comma...
BoxyUwU Feb 10, 2021
a6d4137
Fix assosiated typo
therealprof Feb 10, 2021
7ca96ed
rewrite the comments
BoxyUwU Feb 10, 2021
f13bbea
Catch errors on localStorage setting failure
lovasoa Feb 10, 2021
16f0ccd
Fix getCurrentValue
lovasoa Feb 10, 2021
5034b50
bootstrap: fix wrong docs installation path
pietroalbini Feb 10, 2021
bfd1ccf
Seal the CommandExt, OsStrExt and OsStringExt traits
Amanieu Feb 10, 2021
02ab235
Rollup merge of #79983 - petar-dambovaliev:master, r=Dylan-DPC
Dylan-DPC Feb 11, 2021
9fad47a
Rollup merge of #81506 - vo4:hwasan, r=nagisa
Dylan-DPC Feb 11, 2021
94d1441
Rollup merge of #81741 - sdroege:zip-trusted-random-access-specializa…
Dylan-DPC Feb 11, 2021
9947da8
Rollup merge of #81850 - the8472:env-rwlock, r=m-ou-se
Dylan-DPC Feb 11, 2021
ebe4041
Rollup merge of #81911 - BoxyUwU:constgenericgaticefix, r=nikomatsakis
Dylan-DPC Feb 11, 2021
dd73aab
Rollup merge of #81947 - camsteffen:to-ty, r=jyn514
Dylan-DPC Feb 11, 2021
3a0fb95
Rollup merge of #81954 - joshtriplett:release-notes-group-platform-no…
Dylan-DPC Feb 11, 2021
daccdb3
Rollup merge of #81955 - dtolnay:dwp, r=Mark-Simulacrum
Dylan-DPC Feb 11, 2021
9e4c98d
Rollup merge of #81959 - therealprof:fix-typo, r=oli-obk
Dylan-DPC Feb 11, 2021
0db0a0a
Rollup merge of #81964 - lovasoa:patch-1, r=GuillaumeGomez
Dylan-DPC Feb 11, 2021
67cc5e4
Rollup merge of #81968 - pietroalbini:fix-doc-install-path, r=Mark-Si…
Dylan-DPC Feb 11, 2021
12c5065
Rollup merge of #81975 - Amanieu:seal2, r=m-ou-se
Dylan-DPC Feb 11, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
silence dead code warnings on windows
  • Loading branch information
the8472 committed Feb 7, 2021
commit 406fd3a2772e62ff1b466e59de45d5caa4cfd975
5 changes: 5 additions & 0 deletions library/std/src/sys_common/rwlock.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
use crate::sys::rwlock as imp;

#[cfg(unix)]
enum GuardType {
Read,
Write,
}

#[cfg(unix)]
pub struct RWLockGuard(&'static RWLock, GuardType);

#[cfg(unix)]
impl Drop for RWLockGuard {
fn drop(&mut self) {
unsafe {
Expand Down Expand Up @@ -52,6 +55,7 @@ impl RWLock {
/// Behavior is undefined if the rwlock has been moved between this and any
/// previous method call.
#[inline]
#[cfg(unix)]
pub unsafe fn read_with_guard(&'static self) -> RWLockGuard {
self.read();
RWLockGuard(&self, GuardType::Read)
Expand Down Expand Up @@ -87,6 +91,7 @@ impl RWLock {
/// Behavior is undefined if the rwlock has been moved between this and any
/// previous method call.
#[inline]
#[cfg(unix)]
pub unsafe fn write_with_guard(&'static self) -> RWLockGuard {
self.write();
RWLockGuard(&self, GuardType::Write)
Expand Down