Skip to content

Commit e4ec2d8

Browse files
committed
---
yaml --- r: 127231 b: refs/heads/auto c: 4879ca7 h: refs/heads/master i: 127229: f08c3b2 127227: e57bb30 127223: 260d153 127215: 8aef0f5 127199: bef76a6 127167: 706924c 127103: 66c5e8e 126975: 331ad03 v: v3
1 parent 87ab663 commit e4ec2d8

File tree

130 files changed

+1217
-1224
lines changed

Some content is hidden

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

130 files changed

+1217
-1224
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: f7aadee14ef4c0cf67771664de8d95eac0023de8
16+
refs/heads/auto: 4879ca79240387d18723a324d92c603c5057d342
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/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/auto/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/auto/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/auto/src/etc/gedit/share/gtksourceview-3.0/language-specs/rust.lang

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@
266266

267267
<define-regex id="common_escape" extended="true">
268268
'|"|
269-
\\|n|r|t|
269+
\\|n|r|t|0|
270270
x\%{hex_digit}{2}|
271271
u\%{hex_digit}{4}|
272272
U\%{hex_digit}{8}

branches/auto/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/auto/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
}

branches/auto/src/libcollections/str.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1457,7 +1457,7 @@ mod tests {
14571457
109
14581458
];
14591459
assert_eq!("".as_bytes(), &[]);
1460-
assert_eq!("abc".as_bytes(), &['a' as u8, 'b' as u8, 'c' as u8]);
1460+
assert_eq!("abc".as_bytes(), b"abc");
14611461
assert_eq!("ศไทย中华Việt Nam".as_bytes(), v.as_slice());
14621462
}
14631463

@@ -1475,11 +1475,11 @@ mod tests {
14751475
fn test_as_ptr() {
14761476
let buf = "hello".as_ptr();
14771477
unsafe {
1478-
assert_eq!(*buf.offset(0), 'h' as u8);
1479-
assert_eq!(*buf.offset(1), 'e' as u8);
1480-
assert_eq!(*buf.offset(2), 'l' as u8);
1481-
assert_eq!(*buf.offset(3), 'l' as u8);
1482-
assert_eq!(*buf.offset(4), 'o' as u8);
1478+
assert_eq!(*buf.offset(0), b'h');
1479+
assert_eq!(*buf.offset(1), b'e');
1480+
assert_eq!(*buf.offset(2), b'l');
1481+
assert_eq!(*buf.offset(3), b'l');
1482+
assert_eq!(*buf.offset(4), b'o');
14831483
}
14841484
}
14851485

branches/auto/src/libcollections/string.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,7 @@ mod tests {
10401040
fn test_push_bytes() {
10411041
let mut s = String::from_str("ABC");
10421042
unsafe {
1043-
s.push_bytes([ 'D' as u8 ]);
1043+
s.push_bytes([b'D']);
10441044
}
10451045
assert_eq!(s.as_slice(), "ABCD");
10461046
}

0 commit comments

Comments
 (0)