Skip to content

Commit 0bfec7b

Browse files
committed
---
yaml --- r: 184159 b: refs/heads/beta c: 1735e41 h: refs/heads/master i: 184157: 414b8df 184155: aa29df4 184151: e5655cc 184143: e501a73 184127: 52d3d61 v: v3
1 parent 405db5c commit 0bfec7b

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
@@ -31,7 +31,7 @@ refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
3232
refs/heads/batch: b7fd822592a4fb577552d93010c4a4e14f314346
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34-
refs/heads/beta: 2bcf3a4cd15f706dcb07b1835babeea15b8aa8c1
34+
refs/heads/beta: 1735e41d1cbbe0666e188ccf3a064e5c8afb482c
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
3737
refs/heads/tmp: c65fb1a81e5dc58cf171cc47f65de9e6e2119247

branches/beta/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)