Skip to content

Commit 41de127

Browse files
committed
---
yaml --- r: 186997 b: refs/heads/try c: 1735e41 h: refs/heads/master i: 186995: 2d58511 v: v3
1 parent c414541 commit 41de127

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: b4c965ee803a4521d8b4575f634e036f93e408f3
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 3a96d6a9818fe2affc98a187fb1065120458cee9
5-
refs/heads/try: 2bcf3a4cd15f706dcb07b1835babeea15b8aa8c1
5+
refs/heads/try: 1735e41d1cbbe0666e188ccf3a064e5c8afb482c
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/src/libcore/atomic.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ use marker::Sync;
7676

7777
use intrinsics;
7878
use cell::UnsafeCell;
79+
use marker::PhantomData;
7980

8081
/// A boolean type which can be safely shared between threads.
8182
#[stable(feature = "rust1", since = "1.0.0")]
@@ -105,6 +106,7 @@ unsafe impl Sync for AtomicUsize {}
105106
#[stable(feature = "rust1", since = "1.0.0")]
106107
pub struct AtomicPtr<T> {
107108
p: UnsafeCell<usize>,
109+
_marker: PhantomData<*mut T>,
108110
}
109111

110112
unsafe impl<T> Sync for AtomicPtr<T> {}
@@ -791,7 +793,8 @@ impl<T> AtomicPtr<T> {
791793
#[inline]
792794
#[stable(feature = "rust1", since = "1.0.0")]
793795
pub fn new(p: *mut T) -> AtomicPtr<T> {
794-
AtomicPtr { p: UnsafeCell::new(p as usize) }
796+
AtomicPtr { p: UnsafeCell::new(p as usize),
797+
_marker: PhantomData }
795798
}
796799

797800
/// Loads a value from the pointer.

0 commit comments

Comments
 (0)