Skip to content

Commit 9efec35

Browse files
committed
---
yaml --- r: 173759 b: refs/heads/auto c: d3c5cf1 h: refs/heads/master i: 173757: 0b75a18 173755: 0a4c8fa 173751: 1c1bb20 173743: 0d10ac7 173727: b797a8a 173695: f7d4ac7 v: v3
1 parent aa7b87f commit 9efec35

File tree

315 files changed

+4834
-2088
lines changed

Some content is hidden

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

315 files changed

+4834
-2088
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: 9302dc5d9e13f716a21a5d9ebdcddc149a864b19
13+
refs/heads/auto: d3c5cf1b3515d9f43fa043ae235bd934f6f7f321
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

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

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

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

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

branches/auto/src/doc/intro.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ use semver::Version;
106106
107107
fn main() {
108108
assert!(Version::parse("1.2.3") == Ok(Version {
109-
major: 1u,
110-
minor: 2u,
111-
patch: 3u,
109+
major: 1u64,
110+
minor: 2u64,
111+
patch: 3u64,
112112
pre: vec!(),
113113
build: vec!(),
114114
}));

branches/auto/src/doc/reference.md

Lines changed: 43 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ mod b {
603603
```
604604

605605
* Paths starting with the keyword `super` begin resolution relative to the
606-
parent module. Each further identifier must resolve to an item
606+
parent module. Each further identifier must resolve to an item.
607607

608608
```rust
609609
mod a {
@@ -985,7 +985,7 @@ top of [modules](#modules) and [blocks](#blocks).
985985
986986
Use declarations support a number of convenient shortcuts:
987987

988-
* Rebinding the target name as a new local name, using the syntax `use p::q::r as x;`.
988+
* Rebinding the target name as a new local name, using the syntax `use p::q::r as x;`
989989
* Simultaneously binding a list of paths differing only in their final element,
990990
using the glob-like brace syntax `use a::b::{c,d,e,f};`
991991
* Binding all paths matching a given prefix, using the asterisk wildcard syntax
@@ -1091,7 +1091,7 @@ set of *input* [*slots*](#memory-slots) as parameters, through which the caller
10911091
passes arguments into the function, and an *output* [*slot*](#memory-slots)
10921092
through which the function passes results back to the caller.
10931093

1094-
A function may also be copied into a first class *value*, in which case the
1094+
A function may also be copied into a first-class *value*, in which case the
10951095
value has the corresponding [*function type*](#function-types), and can be used
10961096
otherwise exactly as a function item (with a minor additional cost of calling
10971097
the function indirectly).
@@ -1224,7 +1224,7 @@ the guarantee that these issues are never caused by safe code.
12241224
* A value other than `false` (0) or `true` (1) in a `bool`
12251225
* A discriminant in an `enum` not included in the type definition
12261226
* A value in a `char` which is a surrogate or above `char::MAX`
1227-
* non-UTF-8 byte sequences in a `str`
1227+
* Non-UTF-8 byte sequences in a `str`
12281228
* Unwinding into Rust from foreign code or unwinding from Rust into foreign
12291229
code. Rust's failure system is not compatible with exception handling in
12301230
other languages. Unwinding must be caught and handled at FFI boundaries.
@@ -1827,7 +1827,7 @@ accesses in two cases:
18271827

18281828
These two cases are surprisingly powerful for creating module hierarchies
18291829
exposing public APIs while hiding internal implementation details. To help
1830-
explain, here's a few use cases and what they would entail.
1830+
explain, here's a few use cases and what they would entail:
18311831

18321832
* A library developer needs to expose functionality to crates which link
18331833
against their library. As a consequence of the first case, this means that
@@ -1858,7 +1858,7 @@ import/expression is only valid if the destination is in the current visibility
18581858
scope.
18591859

18601860
Here's an example of a program which exemplifies the three cases outlined
1861-
above.
1861+
above:
18621862

18631863
```
18641864
// This module is private, meaning that no external crate can access this
@@ -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.
@@ -2213,7 +2220,7 @@ mod m1 {
22132220
```
22142221

22152222
This example shows how one can use `allow` and `warn` to toggle a particular
2216-
check on and off.
2223+
check on and off:
22172224

22182225
```{.ignore}
22192226
#[warn(missing_docs)]
@@ -2235,7 +2242,7 @@ mod m2{
22352242
```
22362243

22372244
This example shows how one can use `forbid` to disallow uses of `allow` for
2238-
that lint check.
2245+
that lint check:
22392246

22402247
```{.ignore}
22412248
#[forbid(missing_docs)]
@@ -2318,9 +2325,9 @@ These language items are traits:
23182325
* `ord`
23192326
: Elements have a partial ordering.
23202327
* `deref`
2321-
: `*` can be applied, yielding a reference to another type
2328+
: `*` can be applied, yielding a reference to another type.
23222329
* `deref_mut`
2323-
: `*` can be applied, yielding a mutable reference to another type
2330+
: `*` can be applied, yielding a mutable reference to another type.
23242331

23252332
These are functions:
23262333

@@ -2341,7 +2348,7 @@ These are functions:
23412348
* `type_id`
23422349
: The type returned by the `type_id` intrinsic.
23432350
* `unsafe`
2344-
: A type whose contents can be mutated through an immutable reference
2351+
: A type whose contents can be mutated through an immutable reference.
23452352

23462353
#### Marker types
23472354

@@ -2350,11 +2357,11 @@ These types help drive the compiler's analysis
23502357
* `begin_unwind`
23512358
: ___Needs filling in___
23522359
* `no_copy_bound`
2353-
: This type does not implement "copy", even if eligible
2360+
: This type does not implement "copy", even if eligible.
23542361
* `no_send_bound`
2355-
: This type does not implement "send", even if eligible
2362+
: This type does not implement "send", even if eligible.
23562363
* `no_sync_bound`
2357-
: This type does not implement "sync", even if eligible
2364+
: This type does not implement "sync", even if eligible.
23582365
* `eh_personality`
23592366
: ___Needs filling in___
23602367
* `exchange_free`
@@ -2376,11 +2383,11 @@ These types help drive the compiler's analysis
23762383
* `iterator`
23772384
: ___Needs filling in___
23782385
* `contravariant_lifetime`
2379-
: The lifetime parameter should be considered contravariant
2386+
: The lifetime parameter should be considered contravariant.
23802387
* `covariant_lifetime`
2381-
: The lifetime parameter should be considered covariant
2388+
: The lifetime parameter should be considered covariant.
23822389
* `invariant_lifetime`
2383-
: The lifetime parameter should be considered invariant
2390+
: The lifetime parameter should be considered invariant.
23842391
* `malloc`
23852392
: Allocate memory on the managed heap.
23862393
* `owned_box`
@@ -2390,11 +2397,11 @@ These types help drive the compiler's analysis
23902397
* `start`
23912398
: ___Needs filling in___
23922399
* `contravariant_type`
2393-
: The type parameter should be considered contravariant
2400+
: The type parameter should be considered contravariant.
23942401
* `covariant_type`
2395-
: The type parameter should be considered covariant
2402+
: The type parameter should be considered covariant.
23962403
* `invariant_type`
2397-
: The type parameter should be considered invariant
2404+
: The type parameter should be considered invariant.
23982405
* `ty_desc`
23992406
: ___Needs filling in___
24002407

@@ -2425,15 +2432,15 @@ There are three different types of inline attributes:
24252432
* `#[inline(always)]` asks the compiler to always perform an inline expansion.
24262433
* `#[inline(never)]` asks the compiler to never perform an inline expansion.
24272434

2428-
### Deriving
2435+
### Derive
24292436

2430-
The `deriving` attribute allows certain traits to be automatically implemented
2437+
The `derive` attribute allows certain traits to be automatically implemented
24312438
for data structures. For example, the following will create an `impl` for the
24322439
`PartialEq` and `Clone` traits for `Foo`, the type parameter `T` will be given
24332440
the `PartialEq` or `Clone` constraints for the appropriate `impl`:
24342441

24352442
```
2436-
#[deriving(PartialEq, Clone)]
2443+
#[derive(PartialEq, Clone)]
24372444
struct Foo<T> {
24382445
a: int,
24392446
b: T
@@ -2455,7 +2462,7 @@ impl<T: PartialEq> PartialEq for Foo<T> {
24552462
}
24562463
```
24572464

2458-
Supported traits for `deriving` are:
2465+
Supported traits for `derive` are:
24592466

24602467
* Comparison traits: `PartialEq`, `Eq`, `PartialOrd`, `Ord`.
24612468
* Serialization: `Encodable`, `Decodable`. These require `serialize`.
@@ -2921,13 +2928,13 @@ automatically dereferenced to make the field access possible.
29212928
```{.ebnf .gram}
29222929
array_expr : '[' "mut" ? vec_elems? ']' ;
29232930
2924-
array_elems : [expr [',' expr]*] | [expr ',' ".." expr] ;
2931+
array_elems : [expr [',' expr]*] | [expr ';' expr] ;
29252932
```
29262933

29272934
An [array](#array,-and-slice-types) _expression_ is written by enclosing zero
29282935
or more comma-separated expressions of uniform type in square brackets.
29292936

2930-
In the `[expr ',' ".." expr]` form, the expression after the `".."` must be a
2937+
In the `[expr ';' expr]` form, the expression after the `';'` must be a
29312938
constant expression that can be evaluated at compile time, such as a
29322939
[literal](#literals) or a [static item](#static-items).
29332940

@@ -3219,11 +3226,11 @@ the simplest and least-expensive form (analogous to a ```|| { }``` expression),
32193226
the lambda expression captures its environment by reference, effectively
32203227
borrowing pointers to all outer variables mentioned inside the function.
32213228
Alternately, the compiler may infer that a lambda expression should copy or
3222-
move values (depending on their type.) from the environment into the lambda
3229+
move values (depending on their type) from the environment into the lambda
32233230
expression's captured environment.
32243231

32253232
In this example, we define a function `ten_times` that takes a higher-order
3226-
function argument, and call it with a lambda expression as an argument.
3233+
function argument, and call it with a lambda expression as an argument:
32273234

32283235
```
32293236
fn ten_times<F>(f: F) where F: Fn(int) {
@@ -3661,14 +3668,14 @@ within an object along with one byte past the end.
36613668
The types `char` and `str` hold textual data.
36623669

36633670
A value of type `char` is a [Unicode scalar value](
3664-
http://www.unicode.org/glossary/#unicode_scalar_value) (ie. a code point that
3671+
http://www.unicode.org/glossary/#unicode_scalar_value) (i.e. a code point that
36653672
is not a surrogate), represented as a 32-bit unsigned word in the 0x0000 to
36663673
0xD7FF or 0xE000 to 0x10FFFF range. A `[char]` array is effectively an UCS-4 /
36673674
UTF-32 string.
36683675

36693676
A value of type `str` is a Unicode string, represented as an array of 8-bit
36703677
unsigned bytes holding a sequence of UTF-8 codepoints. Since `str` is of
3671-
unknown size, it is not a _first class_ type, but can only be instantiated
3678+
unknown size, it is not a _first-class_ type, but can only be instantiated
36723679
through a pointer type, such as `&str` or `String`.
36733680

36743681
### Tuple types
@@ -3698,7 +3705,7 @@ assert!(b != "world");
36983705

36993706
Rust has two different types for a list of items:
37003707

3701-
* `[T ..N]`, an 'array'
3708+
* `[T; N]`, an 'array'.
37023709
* `&[T]`, a 'slice'.
37033710

37043711
An array has a fixed size, and can be allocated on either the stack or the
@@ -3710,9 +3717,9 @@ to, it borrows it.
37103717
An example of each kind:
37113718

37123719
```{rust}
3713-
let vec: Vec<int> = vec![1, 2, 3];
3714-
let arr: [int; 3] = [1, 2, 3];
3715-
let s: &[int] = vec.as_slice();
3720+
let vec: Vec<i32> = vec![1, 2, 3];
3721+
let arr: [i32; 3] = [1, 2, 3];
3722+
let s: &[i32] = vec.as_slice();
37163723
```
37173724

37183725
As you can see, the `vec!` macro allows you to create a `Vec<T>` easily. The
@@ -3798,7 +3805,7 @@ enum List<T> {
37983805
Cons(T, Box<List<T>>)
37993806
}
38003807
3801-
let a: List<int> = List::Cons(7, Box::new(List::Cons(13, Box::new(List::Nil))));
3808+
let a: List<i32> = List::Cons(7, Box::new(List::Cons(13, Box::new(List::Nil))));
38023809
```
38033810

38043811
### Pointer types

0 commit comments

Comments
 (0)