diff options
| author | bors <bors@rust-lang.org> | 2016-07-15 03:06:58 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-15 03:06:58 -0700 |
| commit | 3cc3ad11e6fadcba443cc50ba6ed03ab04d34355 (patch) | |
| tree | 8f740d9a475036c51e4524543e9571e4f9664354 /src/libstd/sync | |
| parent | b6c1ef3745f707a0f76f17dc2b313b831ee1bfb0 (diff) | |
| parent | 89593741540e125c768432bd98dbd4fdd1abd286 (diff) | |
| download | rust-3cc3ad11e6fadcba443cc50ba6ed03ab04d34355.tar.gz rust-3cc3ad11e6fadcba443cc50ba6ed03ab04d34355.zip | |
Auto merge of #34819 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 7 pull requests - Successful merges: #34456, #34733, #34777, #34794, #34799, #34804, #34818 - Failed merges: #33951
Diffstat (limited to 'src/libstd/sync')
| -rw-r--r-- | src/libstd/sync/once.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstd/sync/once.rs b/src/libstd/sync/once.rs index e9ea465cc99..54c1fe6c564 100644 --- a/src/libstd/sync/once.rs +++ b/src/libstd/sync/once.rs @@ -65,6 +65,7 @@ // it! use marker; +use ptr; use sync::atomic::{AtomicUsize, AtomicBool, Ordering}; use thread::{self, Thread}; @@ -297,7 +298,7 @@ impl Once { let mut node = Waiter { thread: Some(thread::current()), signaled: AtomicBool::new(false), - next: 0 as *mut Waiter, + next: ptr::null_mut(), }; let me = &mut node as *mut Waiter as usize; assert!(me & STATE_MASK == 0); |
