Skip to content

Commit 2c39c41

Browse files
committed
---
yaml --- r: 173492 b: refs/heads/master c: 1c78ad9 h: refs/heads/master v: v3
1 parent 800dba5 commit 2c39c41

File tree

244 files changed

+3789
-1663
lines changed

Some content is hidden

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

244 files changed

+3789
-1663
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 2a320f21d0e5f943b9cd02bb7882531bfb7ef0b9
2+
refs/heads/master: 1c78ad937b4da9dd872b0a865025f3e2e885f90d
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 210f0dcf007104240b2e286ed0b80cb4a61d7bae
55
refs/heads/try: 957472483d3a2f43c0e4f7c2056280a1022af93c

trunk/configure

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,10 @@ case $CFG_CPUTYPE in
448448
CFG_CPUTYPE=aarch64
449449
;;
450450

451+
powerpc)
452+
CFG_CPUTYPE=powerpc
453+
;;
454+
451455
x86_64 | x86-64 | x64 | amd64)
452456
CFG_CPUTYPE=x86_64
453457
;;
@@ -1004,7 +1008,7 @@ do
10041008
make_dir $t/rt/jemalloc
10051009
for i in \
10061010
isaac sync test \
1007-
arch/i386 arch/x86_64 arch/arm arch/aarch64 arch/mips
1011+
arch/i386 arch/x86_64 arch/arm arch/aarch64 arch/mips arch/powerpc
10081012
do
10091013
make_dir $t/rt/stage$s/$i
10101014
done
@@ -1169,7 +1173,7 @@ do
11691173

11701174
msg "configuring LLVM for $gnu_t"
11711175

1172-
LLVM_TARGETS="--enable-targets=x86,x86_64,arm,aarch64,mips"
1176+
LLVM_TARGETS="--enable-targets=x86,x86_64,arm,aarch64,mips,powerpc"
11731177
LLVM_BUILD="--build=$gnu_t"
11741178
LLVM_HOST="--host=$gnu_t"
11751179
LLVM_TARGET="--target=$gnu_t"
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# powerpc-unknown-linux-gnu configuration
2+
CROSS_PREFIX_powerpc-unknown-linux-gnu=powerpc-linux-gnu-
3+
CC_powerpc-unknown-linux-gnu=$(CC)
4+
CXX_powerpc-unknown-linux-gnu=$(CXX)
5+
CPP_powerpc-unknown-linux-gnu=$(CPP)
6+
AR_powerpc-unknown-linux-gnu=$(AR)
7+
CFG_LIB_NAME_powerpc-unknown-linux-gnu=lib$(1).so
8+
CFG_STATIC_LIB_NAME_powerpc-unknown-linux-gnu=lib$(1).a
9+
CFG_LIB_GLOB_powerpc-unknown-linux-gnu=lib$(1)-*.so
10+
CFG_LIB_DSYM_GLOB_powerpc-unknown-linux-gnu=lib$(1)-*.dylib.dSYM
11+
CFG_CFLAGS_powerpc-unknown-linux-gnu := -m32 $(CFLAGS)
12+
CFG_GCCISH_CFLAGS_powerpc-unknown-linux-gnu := -Wall -Werror -g -fPIC -m32 $(CFLAGS)
13+
CFG_GCCISH_CXXFLAGS_powerpc-unknown-linux-gnu := -fno-rtti $(CXXFLAGS)
14+
CFG_GCCISH_LINK_FLAGS_powerpc-unknown-linux-gnu := -shared -fPIC -ldl -pthread -lrt -g -m32
15+
CFG_GCCISH_DEF_FLAG_powerpc-unknown-linux-gnu := -Wl,--export-dynamic,--dynamic-list=
16+
CFG_GCCISH_PRE_LIB_FLAGS_powerpc-unknown-linux-gnu := -Wl,-whole-archive
17+
CFG_GCCISH_POST_LIB_FLAGS_powerpc-unknown-linux-gnu := -Wl,-no-whole-archive
18+
CFG_DEF_SUFFIX_powerpc-unknown-linux-gnu := .linux.def
19+
CFG_LLC_FLAGS_powerpc-unknown-linux-gnu :=
20+
CFG_INSTALL_NAME_powerpc-unknown-linux-gnu =
21+
CFG_EXE_SUFFIX_powerpc-unknown-linux-gnu =
22+
CFG_WINDOWSY_powerpc-unknown-linux-gnu :=
23+
CFG_UNIXY_powerpc-unknown-linux-gnu := 1
24+
CFG_PATH_MUNGE_powerpc-unknown-linux-gnu := true
25+
CFG_LDPATH_powerpc-unknown-linux-gnu :=
26+
CFG_RUN_powerpc-unknown-linux-gnu=$(2)
27+
CFG_RUN_TARG_powerpc-unknown-linux-gnu=$(call CFG_RUN_powerpc-unknown-linux-gnu,,$(2))
28+
CFG_GNU_TRIPLE_powerpc-unknown-linux-gnu := powerpc-unknown-linux-gnu

trunk/mk/main.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ endif
263263
######################################################################
264264

265265
# FIXME: x86-ism
266-
LLVM_COMPONENTS=x86 arm aarch64 mips ipo bitreader bitwriter linker asmparser mcjit \
266+
LLVM_COMPONENTS=x86 arm aarch64 mips powerpc ipo bitreader bitwriter linker asmparser mcjit \
267267
interpreter instrumentation
268268

269269
# Only build these LLVM tools

trunk/mk/platform.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ define CFG_MAKE_TOOLCHAIN
177177
$$(CFG_GCCISH_DEF_FLAG_$(1))$$(3) $$(2) \
178178
$$(call CFG_INSTALL_NAME_$(1),$$(4))
179179

180-
ifeq ($$(findstring $(HOST_$(1)),arm aarch64 mips mipsel),)
180+
ifeq ($$(findstring $(HOST_$(1)),arm aarch64 mips mipsel powerpc),)
181181

182182
# We're using llvm-mc as our assembler because it supports
183183
# .cfi pseudo-ops on mac
@@ -189,7 +189,7 @@ define CFG_MAKE_TOOLCHAIN
189189
-o=$$(1)
190190
else
191191

192-
# For the ARM, AARCH64 and MIPS crosses, use the toolchain assembler
192+
# For the ARM, AARCH64, MIPS and POWER crosses, use the toolchain assembler
193193
# FIXME: We should be able to use the LLVM assembler
194194
CFG_ASSEMBLE_$(1)=$$(CC_$(1)) $$(CFG_GCCISH_CFLAGS_$(1)) \
195195
$$(CFG_DEPEND_FLAGS) $$(2) -c -o $$(1)

trunk/src/compiletest/runtest.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -966,6 +966,16 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
966966
line.starts_with( prefix )
967967
}
968968

969+
// A multi-line error will have followup lines which will always
970+
// start with one of these strings.
971+
fn continuation( line: &str) -> bool {
972+
line.starts_with(" expected") ||
973+
line.starts_with(" found") ||
974+
// 1234
975+
// Should have 4 spaces: see issue 18946
976+
line.starts_with("(")
977+
}
978+
969979
// Scan and extract our error/warning messages,
970980
// which look like:
971981
// filename:line1:col1: line2:col2: *error:* msg
@@ -981,7 +991,7 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
981991
ee.kind,
982992
ee.msg,
983993
line);
984-
if prefix_matches(line, prefixes[i].as_slice()) &&
994+
if (prefix_matches(line, prefixes[i].as_slice()) || continuation(line)) &&
985995
line.contains(ee.kind.as_slice()) &&
986996
line.contains(ee.msg.as_slice()) {
987997
found_flags[i] = true;

trunk/src/doc/reference.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2117,6 +2117,13 @@ macro scope.
21172117
destructors from being run twice. Destructors might be run multiple times on
21182118
the same object with this attribute.
21192119
- `doc` - Doc comments such as `/// foo` are equivalent to `#[doc = "foo"]`.
2120+
- `rustc_on_unimplemented` - Write a custom note to be shown along with the error
2121+
when the trait is found to be unimplemented on a type.
2122+
You may use format arguments like `{T}`, `{A}` to correspond to the
2123+
types at the point of use corresponding to the type parameters of the
2124+
trait of the same name. `{Self}` will be replaced with the type that is supposed
2125+
to implement the trait but doesn't. To use this, the `on_unimplemented` feature gate
2126+
must be enabled.
21202127

21212128
### Conditional compilation
21222129

@@ -2163,7 +2170,7 @@ arbitrarily complex configurations through nesting.
21632170
The following configurations must be defined by the implementation:
21642171

21652172
* `target_arch = "..."`. Target CPU architecture, such as `"x86"`, `"x86_64"`
2166-
`"mips"`, `"arm"`, or `"aarch64"`.
2173+
`"mips"`, `"powerpc"`, `"arm"`, or `"aarch64"`.
21672174
* `target_endian = "..."`. Endianness of the target CPU, either `"little"` or
21682175
`"big"`.
21692176
* `target_family = "..."`. Operating system family of the target, e. g.

trunk/src/etc/emacs/rust-mode.el

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@
3131
(modify-syntax-entry ?\" "\"" table)
3232
(modify-syntax-entry ?\\ "\\" table)
3333

34+
;; mark _ as a word constituent so that identifiers
35+
;; such as xyz_type don't cause type to be highlighted
36+
;; as a keyword
37+
(modify-syntax-entry ?_ "w" table)
38+
3439
;; Comments
3540
(modify-syntax-entry ?/ ". 124b" table)
3641
(modify-syntax-entry ?* ". 23" table)

trunk/src/liballoc/arc.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ unsafe impl<T: Sync + Send> Send for Weak<T> { }
137137
unsafe impl<T: Sync + Send> Sync for Weak<T> { }
138138

139139
struct ArcInner<T> {
140-
strong: atomic::AtomicUint,
141-
weak: atomic::AtomicUint,
140+
strong: atomic::AtomicUsize,
141+
weak: atomic::AtomicUsize,
142142
data: T,
143143
}
144144

@@ -161,8 +161,8 @@ impl<T> Arc<T> {
161161
// Start the weak pointer count as 1 which is the weak pointer that's
162162
// held by all the strong pointers (kinda), see std/rc.rs for more info
163163
let x = box ArcInner {
164-
strong: atomic::AtomicUint::new(1),
165-
weak: atomic::AtomicUint::new(1),
164+
strong: atomic::AtomicUsize::new(1),
165+
weak: atomic::AtomicUsize::new(1),
166166
data: data,
167167
};
168168
Arc { _ptr: unsafe { NonZero::new(mem::transmute(x)) } }
@@ -619,7 +619,7 @@ mod tests {
619619
use super::{Arc, Weak, weak_count, strong_count};
620620
use std::sync::Mutex;
621621

622-
struct Canary(*mut atomic::AtomicUint);
622+
struct Canary(*mut atomic::AtomicUsize);
623623

624624
impl Drop for Canary
625625
{
@@ -743,16 +743,16 @@ mod tests {
743743

744744
#[test]
745745
fn drop_arc() {
746-
let mut canary = atomic::AtomicUint::new(0);
747-
let x = Arc::new(Canary(&mut canary as *mut atomic::AtomicUint));
746+
let mut canary = atomic::AtomicUsize::new(0);
747+
let x = Arc::new(Canary(&mut canary as *mut atomic::AtomicUsize));
748748
drop(x);
749749
assert!(canary.load(Acquire) == 1);
750750
}
751751

752752
#[test]
753753
fn drop_arc_weak() {
754-
let mut canary = atomic::AtomicUint::new(0);
755-
let arc = Arc::new(Canary(&mut canary as *mut atomic::AtomicUint));
754+
let mut canary = atomic::AtomicUsize::new(0);
755+
let arc = Arc::new(Canary(&mut canary as *mut atomic::AtomicUsize));
756756
let arc_weak = arc.downgrade();
757757
assert!(canary.load(Acquire) == 0);
758758
drop(arc);

trunk/src/liballoc/heap.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ unsafe fn exchange_free(ptr: *mut u8, old_size: uint, align: uint) {
119119
not(feature = "external_crate"),
120120
any(target_arch = "arm",
121121
target_arch = "mips",
122-
target_arch = "mipsel")))]
122+
target_arch = "mipsel",
123+
target_arch = "powerpc")))]
123124
const MIN_ALIGN: uint = 8;
124125
#[cfg(all(not(feature = "external_funcs"),
125126
not(feature = "external_crate"),

trunk/src/libcollections/slice.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1631,7 +1631,7 @@ mod tests {
16311631
#[test]
16321632
fn test_slice_from() {
16331633
let vec: &[int] = &[1, 2, 3, 4];
1634-
assert_eq!(&vec[0..], vec);
1634+
assert_eq!(&vec[], vec);
16351635
let b: &[int] = &[3, 4];
16361636
assert_eq!(&vec[2..], b);
16371637
let b: &[int] = &[];
@@ -1641,11 +1641,11 @@ mod tests {
16411641
#[test]
16421642
fn test_slice_to() {
16431643
let vec: &[int] = &[1, 2, 3, 4];
1644-
assert_eq!(&vec[0..4], vec);
1644+
assert_eq!(&vec[..4], vec);
16451645
let b: &[int] = &[1, 2];
1646-
assert_eq!(&vec[0..2], b);
1646+
assert_eq!(&vec[..2], b);
16471647
let b: &[int] = &[];
1648-
assert_eq!(&vec[0..0], b);
1648+
assert_eq!(&vec[..0], b);
16491649
}
16501650

16511651

@@ -2538,15 +2538,15 @@ mod tests {
25382538
let (left, right) = values.split_at_mut(2);
25392539
{
25402540
let left: &[_] = left;
2541-
assert!(left[0..left.len()] == [1, 2][]);
2541+
assert!(left[..left.len()] == [1, 2][]);
25422542
}
25432543
for p in left.iter_mut() {
25442544
*p += 1;
25452545
}
25462546

25472547
{
25482548
let right: &[_] = right;
2549-
assert!(right[0..right.len()] == [3, 4, 5][]);
2549+
assert!(right[..right.len()] == [3, 4, 5][]);
25502550
}
25512551
for p in right.iter_mut() {
25522552
*p += 2;

trunk/src/libcollections/str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,7 @@ pub trait StrExt: Index<FullRange, Output = str> {
807807
/// out of bounds.
808808
///
809809
/// See also `slice`, `slice_from` and `slice_chars`.
810-
#[unstable = "use slice notation [0..a] instead"]
810+
#[unstable = "use slice notation [..a] instead"]
811811
fn slice_to(&self, end: uint) -> &str {
812812
core_str::StrExt::slice_to(&self[], end)
813813
}

trunk/src/libcollections/string.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ impl String {
168168

169169
if i > 0 {
170170
unsafe {
171-
res.as_mut_vec().push_all(&v[0..i])
171+
res.as_mut_vec().push_all(&v[..i])
172172
};
173173
}
174174

trunk/src/libcollections/vec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2199,7 +2199,7 @@ mod tests {
21992199

22002200
#[test]
22012201
fn test_map_in_place_zero_drop_count() {
2202-
use std::sync::atomic::{AtomicUint, Ordering, ATOMIC_UINT_INIT};
2202+
use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
22032203

22042204
#[derive(Clone, PartialEq, Show)]
22052205
struct Nothing;
@@ -2213,7 +2213,7 @@ mod tests {
22132213
}
22142214
}
22152215
const NUM_ELEMENTS: uint = 2;
2216-
static DROP_COUNTER: AtomicUint = ATOMIC_UINT_INIT;
2216+
static DROP_COUNTER: AtomicUsize = ATOMIC_USIZE_INIT;
22172217

22182218
let v = repeat(Nothing).take(NUM_ELEMENTS).collect::<Vec<_>>();
22192219

0 commit comments

Comments
 (0)