Skip to content

Commit 563a3a6

Browse files
committed
---
yaml --- r: 132543 b: refs/heads/dist-snap c: d29123b h: refs/heads/master i: 132541: fdb9220 132539: 5b3be70 132535: 00c14c0 132527: adc2895 132511: 6006bfb 132479: a9cdf8d v: v3
1 parent 17aea8c commit 563a3a6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+724
-926
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 457a3c991d79b971be07fce75f9d0c12848fb37c
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: d92eaf0273af8c09112f951b2f483505b2f3e8c9
9+
refs/heads/dist-snap: d29123b35da48d136c7b01462ea13b95769ccd39
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/mk/platform.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ RUSTC_CROSS_FLAGS_arm-unknown-linux-gnueabi :=
377377
# mipsel-linux configuration
378378
CC_mipsel-linux=mipsel-linux-gcc
379379
CXX_mipsel-linux=mipsel-linux-g++
380-
CPP_mipsel-linux=mipsel-linux-gcc
380+
CPP_mipsel-linux=mipsel-linux-gcc
381381
AR_mipsel-linux=mipsel-linux-ar
382382
CFG_LIB_NAME_mipsel-linux=lib$(1).so
383383
CFG_STATIC_LIB_NAME_mipsel-linux=lib$(1).a
@@ -641,7 +641,7 @@ define CFG_MAKE_TOOLCHAIN
641641
CXX_$(1)=$(CROSS_PREFIX_$(1))$(CXX_$(1))
642642
CPP_$(1)=$(CROSS_PREFIX_$(1))$(CPP_$(1))
643643
AR_$(1)=$(CROSS_PREFIX_$(1))$(AR_$(1))
644-
RUSTC_CROSS_FLAGS_$(1)=-C linker=$$(call FIND_COMPILER,$$(CXX_$(1))) \
644+
RUSTC_CROSS_FLAGS_$(1)=-C linker=$$(call FIND_COMPILER,$$(CC_$(1))) \
645645
-C ar=$$(call FIND_COMPILER,$$(AR_$(1))) $(RUSTC_CROSS_FLAGS_$(1))
646646

647647
RUSTC_FLAGS_$(1)=$$(RUSTC_CROSS_FLAGS_$(1)) $(RUSTC_FLAGS_$(1))

branches/dist-snap/src/doc/guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3295,7 +3295,7 @@ fn times_four(x: int) -> int { x * 4 }
32953295
#[cfg(test)]
32963296
mod test {
32973297
use super::add_three;
3298-
use super::add_four;
3298+
use super::times_four;
32993299
33003300
#[test]
33013301
fn test_add_three() {
@@ -3344,7 +3344,7 @@ about yet, and that's these lines:
33443344

33453345
```{rust,ignore}
33463346
use super::add_three;
3347-
use super::add_four;
3347+
use super::times_four;
33483348
```
33493349

33503350
Because we've made a nested module, we can import functions from the parent

branches/dist-snap/src/etc/ctags.rust

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
--regex-Rust=/^[ \t]*(pub[ \t]+)?mod[ \t]+([a-zA-Z0-9_]+)/\2/m,modules,module names/
88
--regex-Rust=/^[ \t]*(pub[ \t]+)?static[ \t]+([a-zA-Z0-9_]+)/\2/c,consts,static constants/
99
--regex-Rust=/^[ \t]*(pub[ \t]+)?trait[ \t]+([a-zA-Z0-9_]+)/\2/t,traits,traits/
10-
--regex-Rust=/^[ \t]*(pub[ \t]+)?impl([ \t\n]+<.*>)?[ \t]+([a-zA-Z0-9_]+)/\3/i,impls,trait implementations/
10+
--regex-Rust=/^[ \t]*(pub[ \t]+)?impl([ \t\n]*<[^>]*>)?[ \t]+(([a-zA-Z0-9_:]+)[ \t]*(<[^>]*>)?[ \t]+(for)[ \t]+)?([a-zA-Z0-9_]+)/\4 \6 \7/i,impls,trait implementations/
1111
--regex-Rust=/^[ \t]*macro_rules![ \t]+([a-zA-Z0-9_]+)/\1/d,macros,macro definitions/

branches/dist-snap/src/etc/get-snapshot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def unpack_snapshot(triple, dl_path):
5353
dl_path = sys.argv[2]
5454
else:
5555
# There are no 64-bit Windows snapshots yet, so we'll use 32-bit ones instead, for now
56-
snap_triple = triple if triple != "x86_64-w64-mingw32" else "i686-pc-mingw32"
56+
snap_triple = triple if triple != "x86_64-w64-mingw32" else "i686-w64-mingw32"
5757
snap = determine_curr_snapshot(snap_triple)
5858
dl = os.path.join(download_dir_base, snap)
5959
url = download_url_base + "/" + snap

branches/dist-snap/src/liballoc/arc.rs

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
//! Concurrency-enabled mechanisms for sharing mutable and/or immutable state
1414
//! between tasks.
1515
16-
use core::atomics;
16+
use core::atomic;
1717
use core::clone::Clone;
1818
use core::kinds::{Share, Send};
1919
use core::mem::{min_align_of, size_of, drop};
@@ -71,8 +71,8 @@ pub struct Weak<T> {
7171
}
7272

7373
struct ArcInner<T> {
74-
strong: atomics::AtomicUint,
75-
weak: atomics::AtomicUint,
74+
strong: atomic::AtomicUint,
75+
weak: atomic::AtomicUint,
7676
data: T,
7777
}
7878

@@ -84,8 +84,8 @@ impl<T: Share + Send> Arc<T> {
8484
// Start the weak pointer count as 1 which is the weak pointer that's
8585
// held by all the strong pointers (kinda), see std/rc.rs for more info
8686
let x = box ArcInner {
87-
strong: atomics::AtomicUint::new(1),
88-
weak: atomics::AtomicUint::new(1),
87+
strong: atomic::AtomicUint::new(1),
88+
weak: atomic::AtomicUint::new(1),
8989
data: data,
9090
};
9191
Arc { _ptr: unsafe { mem::transmute(x) } }
@@ -109,7 +109,7 @@ impl<T: Share + Send> Arc<T> {
109109
#[experimental = "Weak pointers may not belong in this module."]
110110
pub fn downgrade(&self) -> Weak<T> {
111111
// See the clone() impl for why this is relaxed
112-
self.inner().weak.fetch_add(1, atomics::Relaxed);
112+
self.inner().weak.fetch_add(1, atomic::Relaxed);
113113
Weak { _ptr: self._ptr }
114114
}
115115
}
@@ -134,7 +134,7 @@ impl<T: Share + Send> Clone for Arc<T> {
134134
// another must already provide any required synchronization.
135135
//
136136
// [1]: (www.boost.org/doc/libs/1_55_0/doc/html/atomic/usage_examples.html)
137-
self.inner().strong.fetch_add(1, atomics::Relaxed);
137+
self.inner().strong.fetch_add(1, atomic::Relaxed);
138138
Arc { _ptr: self._ptr }
139139
}
140140
}
@@ -159,8 +159,8 @@ impl<T: Send + Share + Clone> Arc<T> {
159159
// Note that we hold a strong reference, which also counts as
160160
// a weak reference, so we only clone if there is an
161161
// additional reference of either kind.
162-
if self.inner().strong.load(atomics::SeqCst) != 1 ||
163-
self.inner().weak.load(atomics::SeqCst) != 1 {
162+
if self.inner().strong.load(atomic::SeqCst) != 1 ||
163+
self.inner().weak.load(atomic::SeqCst) != 1 {
164164
*self = Arc::new(self.deref().clone())
165165
}
166166
// This unsafety is ok because we're guaranteed that the pointer
@@ -185,7 +185,7 @@ impl<T: Share + Send> Drop for Arc<T> {
185185
// Because `fetch_sub` is already atomic, we do not need to synchronize
186186
// with other threads unless we are going to delete the object. This
187187
// same logic applies to the below `fetch_sub` to the `weak` count.
188-
if self.inner().strong.fetch_sub(1, atomics::Release) != 1 { return }
188+
if self.inner().strong.fetch_sub(1, atomic::Release) != 1 { return }
189189

190190
// This fence is needed to prevent reordering of use of the data and
191191
// deletion of the data. Because it is marked `Release`, the
@@ -204,14 +204,14 @@ impl<T: Share + Send> Drop for Arc<T> {
204204
// and an "acquire" operation before deleting the object.
205205
//
206206
// [1]: (www.boost.org/doc/libs/1_55_0/doc/html/atomic/usage_examples.html)
207-
atomics::fence(atomics::Acquire);
207+
atomic::fence(atomic::Acquire);
208208

209209
// Destroy the data at this time, even though we may not free the box
210210
// allocation itself (there may still be weak pointers lying around).
211211
unsafe { drop(ptr::read(&self.inner().data)); }
212212

213-
if self.inner().weak.fetch_sub(1, atomics::Release) == 1 {
214-
atomics::fence(atomics::Acquire);
213+
if self.inner().weak.fetch_sub(1, atomic::Release) == 1 {
214+
atomic::fence(atomic::Acquire);
215215
unsafe { deallocate(self._ptr as *mut u8, size_of::<ArcInner<T>>(),
216216
min_align_of::<ArcInner<T>>()) }
217217
}
@@ -230,9 +230,9 @@ impl<T: Share + Send> Weak<T> {
230230
// fetch_add because once the count hits 0 is must never be above 0.
231231
let inner = self.inner();
232232
loop {
233-
let n = inner.strong.load(atomics::SeqCst);
233+
let n = inner.strong.load(atomic::SeqCst);
234234
if n == 0 { return None }
235-
let old = inner.strong.compare_and_swap(n, n + 1, atomics::SeqCst);
235+
let old = inner.strong.compare_and_swap(n, n + 1, atomic::SeqCst);
236236
if old == n { return Some(Arc { _ptr: self._ptr }) }
237237
}
238238
}
@@ -249,7 +249,7 @@ impl<T: Share + Send> Clone for Weak<T> {
249249
#[inline]
250250
fn clone(&self) -> Weak<T> {
251251
// See comments in Arc::clone() for why this is relaxed
252-
self.inner().weak.fetch_add(1, atomics::Relaxed);
252+
self.inner().weak.fetch_add(1, atomic::Relaxed);
253253
Weak { _ptr: self._ptr }
254254
}
255255
}
@@ -264,8 +264,8 @@ impl<T: Share + Send> Drop for Weak<T> {
264264
// If we find out that we were the last weak pointer, then its time to
265265
// deallocate the data entirely. See the discussion in Arc::drop() about
266266
// the memory orderings
267-
if self.inner().weak.fetch_sub(1, atomics::Release) == 1 {
268-
atomics::fence(atomics::Acquire);
267+
if self.inner().weak.fetch_sub(1, atomic::Release) == 1 {
268+
atomic::fence(atomic::Acquire);
269269
unsafe { deallocate(self._ptr as *mut u8, size_of::<ArcInner<T>>(),
270270
min_align_of::<ArcInner<T>>()) }
271271
}
@@ -281,21 +281,21 @@ mod tests {
281281
use std::mem::drop;
282282
use std::ops::Drop;
283283
use std::option::{Option, Some, None};
284-
use std::sync::atomics;
284+
use std::sync::atomic;
285285
use std::task;
286286
use std::vec::Vec;
287287
use super::{Arc, Weak};
288288
use std::sync::Mutex;
289289

290-
struct Canary(*mut atomics::AtomicUint);
290+
struct Canary(*mut atomic::AtomicUint);
291291

292292
impl Drop for Canary
293293
{
294294
fn drop(&mut self) {
295295
unsafe {
296296
match *self {
297297
Canary(c) => {
298-
(*c).fetch_add(1, atomics::SeqCst);
298+
(*c).fetch_add(1, atomic::SeqCst);
299299
}
300300
}
301301
}
@@ -413,20 +413,20 @@ mod tests {
413413

414414
#[test]
415415
fn drop_arc() {
416-
let mut canary = atomics::AtomicUint::new(0);
417-
let x = Arc::new(Canary(&mut canary as *mut atomics::AtomicUint));
416+
let mut canary = atomic::AtomicUint::new(0);
417+
let x = Arc::new(Canary(&mut canary as *mut atomic::AtomicUint));
418418
drop(x);
419-
assert!(canary.load(atomics::Acquire) == 1);
419+
assert!(canary.load(atomic::Acquire) == 1);
420420
}
421421

422422
#[test]
423423
fn drop_arc_weak() {
424-
let mut canary = atomics::AtomicUint::new(0);
425-
let arc = Arc::new(Canary(&mut canary as *mut atomics::AtomicUint));
424+
let mut canary = atomic::AtomicUint::new(0);
425+
let arc = Arc::new(Canary(&mut canary as *mut atomic::AtomicUint));
426426
let arc_weak = arc.downgrade();
427-
assert!(canary.load(atomics::Acquire) == 0);
427+
assert!(canary.load(atomic::Acquire) == 0);
428428
drop(arc);
429-
assert!(canary.load(atomics::Acquire) == 1);
429+
assert!(canary.load(atomic::Acquire) == 1);
430430
drop(arc_weak);
431431
}
432432
}

0 commit comments

Comments
 (0)