Skip to content

Commit 591abef

Browse files
committed
---
yaml --- r: 73709 b: refs/heads/dist-snap c: 61ac5fd h: refs/heads/master i: 73707: 1882e9d v: v3
1 parent 010c1ba commit 591abef

File tree

3 files changed

+33
-34
lines changed

3 files changed

+33
-34
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: b50030718cf28f2a5a81857a26b57442734fe854
10-
refs/heads/dist-snap: 979b037e5a7541a1d77453091839cb7dcf124ba7
10+
refs/heads/dist-snap: 61ac5fdab73878584053b79457eed34cf5b7055d
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/libstd/clone.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ clone_impl!(char)
9090
/// managed boxes which would otherwise not be copied.
9191
pub trait DeepClone {
9292
/// Return a deep copy of the value. Unlike `Clone`, the contents of shared pointer types
93-
/// *are* copied. Note that this is currently unimplemented for managed boxes, as
94-
/// it would need to handle cycles, but it is implemented for other smart-pointer types.
93+
/// *are* copied.
9594
fn deep_clone(&self) -> Self;
9695
}
9796

branches/dist-snap/src/libstd/unstable/atomics.rs

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,15 @@ pub enum Ordering {
7575

7676
impl AtomicFlag {
7777

78-
pub fn new() -> AtomicFlag {
78+
fn new() -> AtomicFlag {
7979
AtomicFlag { v: 0 }
8080
}
8181

8282
/**
8383
* Clears the atomic flag
8484
*/
8585
#[inline(always)]
86-
pub fn clear(&mut self, order: Ordering) {
86+
fn clear(&mut self, order: Ordering) {
8787
unsafe {atomic_store(&mut self.v, 0, order)}
8888
}
8989

@@ -92,37 +92,37 @@ impl AtomicFlag {
9292
* flag.
9393
*/
9494
#[inline(always)]
95-
pub fn test_and_set(&mut self, order: Ordering) -> bool {
95+
fn test_and_set(&mut self, order: Ordering) -> bool {
9696
unsafe {atomic_compare_and_swap(&mut self.v, 0, 1, order) > 0}
9797
}
9898
}
9999

100100
impl AtomicBool {
101-
pub fn new(v: bool) -> AtomicBool {
101+
fn new(v: bool) -> AtomicBool {
102102
AtomicBool { v: if v { 1 } else { 0 } }
103103
}
104104

105105
#[inline(always)]
106-
pub fn load(&self, order: Ordering) -> bool {
106+
fn load(&self, order: Ordering) -> bool {
107107
unsafe { atomic_load(&self.v, order) > 0 }
108108
}
109109

110110
#[inline(always)]
111-
pub fn store(&mut self, val: bool, order: Ordering) {
111+
fn store(&mut self, val: bool, order: Ordering) {
112112
let val = if val { 1 } else { 0 };
113113

114114
unsafe { atomic_store(&mut self.v, val, order); }
115115
}
116116

117117
#[inline(always)]
118-
pub fn swap(&mut self, val: bool, order: Ordering) -> bool {
118+
fn swap(&mut self, val: bool, order: Ordering) -> bool {
119119
let val = if val { 1 } else { 0 };
120120

121121
unsafe { atomic_swap(&mut self.v, val, order) > 0}
122122
}
123123

124124
#[inline(always)]
125-
pub fn compare_and_swap(&mut self, old: bool, new: bool, order: Ordering) -> bool {
125+
fn compare_and_swap(&mut self, old: bool, new: bool, order: Ordering) -> bool {
126126
let old = if old { 1 } else { 0 };
127127
let new = if new { 1 } else { 0 };
128128

@@ -131,113 +131,113 @@ impl AtomicBool {
131131
}
132132

133133
impl AtomicInt {
134-
pub fn new(v: int) -> AtomicInt {
134+
fn new(v: int) -> AtomicInt {
135135
AtomicInt { v:v }
136136
}
137137

138138
#[inline(always)]
139-
pub fn load(&self, order: Ordering) -> int {
139+
fn load(&self, order: Ordering) -> int {
140140
unsafe { atomic_load(&self.v, order) }
141141
}
142142

143143
#[inline(always)]
144-
pub fn store(&mut self, val: int, order: Ordering) {
144+
fn store(&mut self, val: int, order: Ordering) {
145145
unsafe { atomic_store(&mut self.v, val, order); }
146146
}
147147

148148
#[inline(always)]
149-
pub fn swap(&mut self, val: int, order: Ordering) -> int {
149+
fn swap(&mut self, val: int, order: Ordering) -> int {
150150
unsafe { atomic_swap(&mut self.v, val, order) }
151151
}
152152

153153
#[inline(always)]
154-
pub fn compare_and_swap(&mut self, old: int, new: int, order: Ordering) -> int {
154+
fn compare_and_swap(&mut self, old: int, new: int, order: Ordering) -> int {
155155
unsafe { atomic_compare_and_swap(&mut self.v, old, new, order) }
156156
}
157157

158158
#[inline(always)]
159-
pub fn fetch_add(&mut self, val: int, order: Ordering) -> int {
159+
fn fetch_add(&mut self, val: int, order: Ordering) -> int {
160160
unsafe { atomic_add(&mut self.v, val, order) }
161161
}
162162

163163
#[inline(always)]
164-
pub fn fetch_sub(&mut self, val: int, order: Ordering) -> int {
164+
fn fetch_sub(&mut self, val: int, order: Ordering) -> int {
165165
unsafe { atomic_sub(&mut self.v, val, order) }
166166
}
167167
}
168168

169169
impl AtomicUint {
170-
pub fn new(v: uint) -> AtomicUint {
170+
fn new(v: uint) -> AtomicUint {
171171
AtomicUint { v:v }
172172
}
173173

174174
#[inline(always)]
175-
pub fn load(&self, order: Ordering) -> uint {
175+
fn load(&self, order: Ordering) -> uint {
176176
unsafe { atomic_load(&self.v, order) }
177177
}
178178

179179
#[inline(always)]
180-
pub fn store(&mut self, val: uint, order: Ordering) {
180+
fn store(&mut self, val: uint, order: Ordering) {
181181
unsafe { atomic_store(&mut self.v, val, order); }
182182
}
183183

184184
#[inline(always)]
185-
pub fn swap(&mut self, val: uint, order: Ordering) -> uint {
185+
fn swap(&mut self, val: uint, order: Ordering) -> uint {
186186
unsafe { atomic_swap(&mut self.v, val, order) }
187187
}
188188

189189
#[inline(always)]
190-
pub fn compare_and_swap(&mut self, old: uint, new: uint, order: Ordering) -> uint {
190+
fn compare_and_swap(&mut self, old: uint, new: uint, order: Ordering) -> uint {
191191
unsafe { atomic_compare_and_swap(&mut self.v, old, new, order) }
192192
}
193193

194194
#[inline(always)]
195-
pub fn fetch_add(&mut self, val: uint, order: Ordering) -> uint {
195+
fn fetch_add(&mut self, val: uint, order: Ordering) -> uint {
196196
unsafe { atomic_add(&mut self.v, val, order) }
197197
}
198198

199199
#[inline(always)]
200-
pub fn fetch_sub(&mut self, val: uint, order: Ordering) -> uint {
200+
fn fetch_sub(&mut self, val: uint, order: Ordering) -> uint {
201201
unsafe { atomic_sub(&mut self.v, val, order) }
202202
}
203203
}
204204

205205
impl<T> AtomicPtr<T> {
206-
pub fn new(p: *mut T) -> AtomicPtr<T> {
206+
fn new(p: *mut T) -> AtomicPtr<T> {
207207
AtomicPtr { p:p }
208208
}
209209

210210
#[inline(always)]
211-
pub fn load(&self, order: Ordering) -> *mut T {
211+
fn load(&self, order: Ordering) -> *mut T {
212212
unsafe { atomic_load(&self.p, order) }
213213
}
214214

215215
#[inline(always)]
216-
pub fn store(&mut self, ptr: *mut T, order: Ordering) {
216+
fn store(&mut self, ptr: *mut T, order: Ordering) {
217217
unsafe { atomic_store(&mut self.p, ptr, order); }
218218
}
219219

220220
#[inline(always)]
221-
pub fn swap(&mut self, ptr: *mut T, order: Ordering) -> *mut T {
221+
fn swap(&mut self, ptr: *mut T, order: Ordering) -> *mut T {
222222
unsafe { atomic_swap(&mut self.p, ptr, order) }
223223
}
224224

225225
#[inline(always)]
226-
pub fn compare_and_swap(&mut self, old: *mut T, new: *mut T, order: Ordering) -> *mut T {
226+
fn compare_and_swap(&mut self, old: *mut T, new: *mut T, order: Ordering) -> *mut T {
227227
unsafe { atomic_compare_and_swap(&mut self.p, old, new, order) }
228228
}
229229
}
230230

231231
impl<T> AtomicOption<T> {
232-
pub fn new(p: ~T) -> AtomicOption<T> {
232+
fn new(p: ~T) -> AtomicOption<T> {
233233
unsafe {
234234
AtomicOption {
235235
p: cast::transmute(p)
236236
}
237237
}
238238
}
239239

240-
pub fn empty() -> AtomicOption<T> {
240+
fn empty() -> AtomicOption<T> {
241241
unsafe {
242242
AtomicOption {
243243
p: cast::transmute(0)
@@ -246,7 +246,7 @@ impl<T> AtomicOption<T> {
246246
}
247247

248248
#[inline(always)]
249-
pub fn swap(&mut self, val: ~T, order: Ordering) -> Option<~T> {
249+
fn swap(&mut self, val: ~T, order: Ordering) -> Option<~T> {
250250
unsafe {
251251
let val = cast::transmute(val);
252252

@@ -262,7 +262,7 @@ impl<T> AtomicOption<T> {
262262
}
263263

264264
#[inline(always)]
265-
pub fn take(&mut self, order: Ordering) -> Option<~T> {
265+
fn take(&mut self, order: Ordering) -> Option<~T> {
266266
unsafe {
267267
self.swap(cast::transmute(0), order)
268268
}

0 commit comments

Comments
 (0)