Skip to content

Commit 9105dd7

Browse files
committed
---
yaml --- r: 159666 b: refs/heads/auto c: 4aa2040 h: refs/heads/master v: v3
1 parent 0653d7d commit 9105dd7

File tree

272 files changed

+3072
-3621
lines changed

Some content is hidden

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

272 files changed

+3072
-3621
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: 0b7b4f075a531eb160becf2818c1e9a63fa10cd3
13+
refs/heads/auto: 4aa2040cc71d1a0394a2845e5b0959655e2a3ecb
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/compiletest/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
use std::from_str::FromStr;
1112
use std::fmt;
12-
use std::str::FromStr;
1313
use regex::Regex;
1414

1515
#[deriving(Clone, PartialEq)]

branches/auto/src/compiletest/compiletest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ extern crate regex;
2222
use std::os;
2323
use std::io;
2424
use std::io::fs;
25-
use std::str::FromStr;
25+
use std::from_str::FromStr;
2626
use getopts::{optopt, optflag, reqopt};
2727
use common::Config;
2828
use common::{Pretty, DebugInfoGdb, DebugInfoLldb, Codegen};

branches/auto/src/compiletest/header.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ use common::Config;
1212
use common;
1313
use util;
1414

15+
use std::from_str::FromStr;
16+
1517
pub struct TestProps {
1618
// Lines that should be expected, in order, on standard out
1719
pub error_patterns: Vec<String> ,
@@ -351,8 +353,8 @@ pub fn gdb_version_to_int(version_string: &str) -> int {
351353
panic!("{}", error_string);
352354
}
353355

354-
let major: int = from_str(components[0]).expect(error_string);
355-
let minor: int = from_str(components[1]).expect(error_string);
356+
let major: int = FromStr::from_str(components[0]).expect(error_string);
357+
let minor: int = FromStr::from_str(components[1]).expect(error_string);
356358

357359
return major * 1000 + minor;
358360
}
@@ -362,6 +364,6 @@ pub fn lldb_version_to_int(version_string: &str) -> int {
362364
"Encountered LLDB version string with unexpected format: {}",
363365
version_string);
364366
let error_string = error_string.as_slice();
365-
let major: int = from_str(version_string).expect(error_string);
367+
let major: int = FromStr::from_str(version_string).expect(error_string);
366368
return major;
367369
}

branches/auto/src/doc/complement-design-faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ code should need to run is a stack.
9595
`match` being exhaustive has some useful properties. First, if every
9696
possibility is covered by the `match`, adding further variants to the `enum`
9797
in the future will prompt a compilation failure, rather than runtime panic.
98-
Second, it makes cost explicit. In general, the only safe way to have a
98+
Second, it makes cost explicit. In general, only safe way to have a
9999
non-exhaustive match would be to panic the task if nothing is matched, though
100100
it could fall through if the type of the `match` expression is `()`. This sort
101101
of hidden cost and special casing is against the language's philosophy. It's

branches/auto/src/doc/guide-lifetimes.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ expensive. So we'd like to define a function that takes the points just as
5151
a reference.
5252

5353
~~~
54-
# use std::num::Float;
5554
# struct Point {x: f64, y: f64}
5655
# fn sqrt(f: f64) -> f64 { 0.0 }
5756
fn compute_distance(p1: &Point, p2: &Point) -> f64 {

branches/auto/src/doc/guide-pointers.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,11 @@ pass-by-reference. Basically, languages can make two choices (this is made
133133
up syntax, it's not Rust):
134134

135135
```{notrust,ignore}
136-
func foo(x) {
136+
fn foo(x) {
137137
x = 5
138138
}
139139
140-
func main() {
140+
fn main() {
141141
i = 1
142142
foo(i)
143143
// what is the value of i here?
@@ -153,11 +153,11 @@ So what do pointers have to do with this? Well, since pointers point to a
153153
location in memory...
154154

155155
```{notrust,ignore}
156-
func foo(&int x) {
156+
fn foo(&int x) {
157157
*x = 5
158158
}
159159
160-
func main() {
160+
fn main() {
161161
i = 1
162162
foo(&i)
163163
// what is the value of i here?
@@ -192,13 +192,13 @@ When you combine pointers and functions, it's easy to accidentally invalidate
192192
the memory the pointer is pointing to. For example:
193193

194194
```{notrust,ignore}
195-
func make_pointer(): &int {
195+
fn make_pointer(): &int {
196196
x = 5;
197197
198198
return &x;
199199
}
200200
201-
func main() {
201+
fn main() {
202202
&int i = make_pointer();
203203
*i = 5; // uh oh!
204204
}
@@ -214,11 +214,11 @@ issue. Two pointers are said to alias when they point at the same location
214214
in memory. Like this:
215215

216216
```{notrust,ignore}
217-
func mutate(&int i, int j) {
217+
fn mutate(&int i, int j) {
218218
*i = j;
219219
}
220220
221-
func main() {
221+
fn main() {
222222
x = 5;
223223
y = &x;
224224
z = &x; //y and z are aliased

branches/auto/src/doc/guide-strings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ println!("{}", s[0]);
155155
This does not compile. This is on purpose. In the world of UTF-8, direct
156156
indexing is basically never what you want to do. The reason is that each
157157
character can be a variable number of bytes. This means that you have to iterate
158-
through the characters anyway, which is an O(n) operation.
158+
through the characters anyway, which is a O(n) operation.
159159

160160
There's 3 basic levels of unicode (and its encodings):
161161

branches/auto/src/doc/guide-tasks.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ Here is another example showing how futures allow you to background
225225
computations. The workload will be distributed on the available cores.
226226

227227
```{rust}
228-
# use std::num::Float;
229228
# use std::sync::Future;
230229
fn partial_sum(start: uint) -> f64 {
231230
let mut local_sum = 0f64;
@@ -263,7 +262,6 @@ several computations on a single large vector of floats. Each task needs the
263262
full vector to perform its duty.
264263

265264
```{rust}
266-
use std::num::Float;
267265
use std::rand;
268266
use std::sync::Arc;
269267

branches/auto/src/doc/po4a.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
[type: text] src/doc/guide-tasks.md $lang:doc/l10n/$lang/guide-tasks.md
2020
[type: text] src/doc/guide-testing.md $lang:doc/l10n/$lang/guide-testing.md
2121
[type: text] src/doc/guide-unsafe.md $lang:doc/l10n/$lang/guide-unsafe.md
22-
[type: text] src/doc/guide-crates.md $lang:doc/l10n/$lang/guide-crates.md
22+
[type: text] src/doc/guide-unsafe.md $lang:doc/l10n/$lang/guide-crates.md
2323
[type: text] src/doc/guide.md $lang:doc/l10n/$lang/guide.md
2424
[type: text] src/doc/index.md $lang:doc/l10n/$lang/index.md
2525
[type: text] src/doc/intro.md $lang:doc/l10n/$lang/intro.md

branches/auto/src/doc/reference.md

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ Some productions are defined by exclusion of particular Unicode characters:
133133

134134
```{.ebnf .gram}
135135
comment : block_comment | line_comment ;
136-
block_comment : "/*" block_comment_body * "*/" ;
136+
block_comment : "/*" block_comment_body * '*' + '/' ;
137137
block_comment_body : [block_comment | character] * ;
138138
line_comment : "//" non_eol * ;
139139
```
@@ -458,9 +458,10 @@ Examples of floating-point literals of various forms:
458458
12E+99_f64; // type f64
459459
```
460460

461-
##### Boolean literals
461+
##### Unit and boolean literals
462462

463-
The two values of the boolean type are written `true` and `false`.
463+
The _unit value_, the only value of the type that has the same name, is written
464+
as `()`. The two values of the boolean type are written `true` and `false`.
464465

465466
### Symbols
466467

@@ -2525,7 +2526,7 @@ The currently implemented features of the reference compiler are:
25252526

25262527
* `plugin_registrar` - Indicates that a crate has [compiler plugins][plugin] that it
25272528
wants to load. As with `phase`, the implementation is
2528-
in need of an overhaul, and it is not clear that plugins
2529+
in need of a overhaul, and it is not clear that plugins
25292530
defined using this will continue to work.
25302531

25312532
* `quote` - Allows use of the `quote_*!` family of macros, which are
@@ -2582,7 +2583,7 @@ there isn't a parser error first). The directive in this case is no longer
25822583
necessary, and it's likely that existing code will break if the feature isn't
25832584
removed.
25842585

2585-
If an unknown feature is found in a directive, it results in a compiler error.
2586+
If a unknown feature is found in a directive, it results in a compiler error.
25862587
An unknown feature is one which has never been recognized by the compiler.
25872588

25882589
# Statements and expressions
@@ -2652,10 +2653,9 @@ An expression may have two roles: it always produces a *value*, and it may have
26522653
value, and has effects during *evaluation*. Many expressions contain
26532654
sub-expressions (operands). The meaning of each kind of expression dictates
26542655
several things:
2655-
2656-
* Whether or not to evaluate the sub-expressions when evaluating the expression
2657-
* The order in which to evaluate the sub-expressions
2658-
* How to combine the sub-expressions' values to obtain the value of the expression
2656+
* Whether or not to evaluate the sub-expressions when evaluating the
2657+
* expression The order in which to evaluate the sub-expressions How to
2658+
* combine the sub-expressions' values to obtain the value of the expression.
26592659

26602660
In this way, the structure of expressions dictates the structure of execution.
26612661
Blocks are just another kind of expression, so blocks, statements, expressions,
@@ -2684,7 +2684,7 @@ When an lvalue is evaluated in an _lvalue context_, it denotes a memory
26842684
location; when evaluated in an _rvalue context_, it denotes the value held _in_
26852685
that memory location.
26862686

2687-
When an rvalue is used in an lvalue context, a temporary un-named lvalue is
2687+
When an rvalue is used in lvalue context, a temporary un-named lvalue is
26882688
created and used instead. A temporary's lifetime equals the largest lifetime
26892689
of any reference that points to it.
26902690

@@ -2716,7 +2716,7 @@ or an item. Path expressions are [lvalues](#lvalues,-rvalues-and-temporaries).
27162716

27172717
### Tuple expressions
27182718

2719-
Tuples are written by enclosing zero or more comma-separated expressions in
2719+
Tuples are written by enclosing one or more comma-separated expressions in
27202720
parentheses. They are used to create [tuple-typed](#tuple-types) values.
27212721

27222722
```{.tuple}
@@ -2725,11 +2725,6 @@ parentheses. They are used to create [tuple-typed](#tuple-types) values.
27252725
("a", 4u, true);
27262726
```
27272727

2728-
### Unit expressions
2729-
2730-
The expression `()` denotes the _unit value_, the only value of the type with
2731-
the same name.
2732-
27332728
### Structure expressions
27342729

27352730
```{.ebnf .gram}
@@ -2837,7 +2832,7 @@ foo().x;
28372832
```
28382833

28392834
A field access is an [lvalue](#lvalues,-rvalues-and-temporaries) referring to
2840-
the value of that field. When the type providing the field inherits mutability,
2835+
the value of that field. When the type providing the field inherits mutabilty,
28412836
it can be [assigned](#assignment-expressions) to.
28422837

28432838
Also, if the type of the expression to the left of the dot is a pointer, it is
@@ -3112,10 +3107,11 @@ then the expression completes.
31123107
Some examples of call expressions:
31133108

31143109
```
3110+
# use std::from_str::FromStr;
31153111
# fn add(x: int, y: int) -> int { 0 }
31163112
31173113
let x: int = add(1, 2);
3118-
let pi: Option<f32> = from_str("3.14");
3114+
let pi: Option<f32> = FromStr::from_str("3.14");
31193115
```
31203116

31213117
### Lambda expressions
@@ -3324,7 +3320,7 @@ between `_` and `..` is that the pattern `C(_)` is only type-correct if `C` has
33243320
exactly one argument, while the pattern `C(..)` is type-correct for any enum
33253321
variant `C`, regardless of how many arguments `C` has.
33263322

3327-
Used inside an array pattern, `..` stands for any number of elements, when the
3323+
Used inside a array pattern, `..` stands for any number of elements, when the
33283324
`advanced_slice_patterns` feature gate is turned on. This wildcard can be used
33293325
at most once for a given array, which implies that it cannot be used to
33303326
specifically match elements that are at an unknown distance from both ends of a
@@ -3587,7 +3583,7 @@ is not a surrogate), represented as a 32-bit unsigned word in the 0x0000 to
35873583
0xD7FF or 0xE000 to 0x10FFFF range. A `[char]` array is effectively an UCS-4 /
35883584
UTF-32 string.
35893585

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

branches/auto/src/etc/generate-deriving-span-tests.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
3838
// This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
3939
40+
#![feature(struct_variant)]
4041
extern crate rand;
4142
4243
{error_deriving}

branches/auto/src/etc/make-win-dist.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def make_win_dist(dist_root, target_triple):
6262
"libcomctl32.a",
6363
"libcomdlg32.a",
6464
"libcrypt32.a",
65+
"libctl3d32.a",
6566
"libgdi32.a",
6667
"libimagehlp.a",
6768
"libiphlpapi.a",

branches/auto/src/etc/snapshot.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,7 @@ def full_snapshot_name(date, rev, platform, hsh):
7575

7676

7777
def get_kernel(triple):
78-
t = triple.split('-')
79-
if len(t) == 2:
80-
os_name = t[1]
81-
else:
82-
os_name = t[2]
78+
os_name = triple.split('-')[2]
8379
if os_name == "windows":
8480
return "winnt"
8581
if os_name == "darwin":

branches/auto/src/etc/vim/syntax/rust.vim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,16 @@ syn keyword rustTrait FromIterator IntoIterator Extend ExactSize
9797
syn keyword rustTrait Iterator DoubleEndedIterator
9898
syn keyword rustTrait RandomAccessIterator CloneableIterator
9999
syn keyword rustTrait OrdIterator MutableDoubleEndedIterator
100-
syn keyword rustTrait NumCast Int SignedInt UnsignedInt Float
100+
syn keyword rustTrait Num NumCast CheckedAdd CheckedSub CheckedMul CheckedDiv
101+
syn keyword rustTrait Signed Unsigned Primitive Int Float
101102
syn keyword rustTrait FloatMath ToPrimitive FromPrimitive
102103
syn keyword rustTrait Box
103104
syn keyword rustTrait GenericPath Path PosixPath WindowsPath
104105
syn keyword rustTrait RawPtr
105106
syn keyword rustTrait Buffer Writer Reader Seek
106107
syn keyword rustTrait Str StrVector StrSlice
107108
syn keyword rustTrait IntoMaybeOwned StrAllocating UnicodeStrSlice
108-
syn keyword rustTrait ToString IntoString
109+
syn keyword rustTrait ToString IntoStr
109110
syn keyword rustTrait Tuple1 Tuple2 Tuple3 Tuple4
110111
syn keyword rustTrait Tuple5 Tuple6 Tuple7 Tuple8
111112
syn keyword rustTrait Tuple9 Tuple10 Tuple11 Tuple12

branches/auto/src/liballoc/rc.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ pub struct Rc<T> {
179179
_noshare: marker::NoSync
180180
}
181181

182+
#[stable]
182183
impl<T> Rc<T> {
183184
/// Constructs a new reference-counted pointer.
184-
#[stable]
185185
pub fn new(value: T) -> Rc<T> {
186186
unsafe {
187187
Rc {
@@ -200,7 +200,9 @@ impl<T> Rc<T> {
200200
}
201201
}
202202
}
203+
}
203204

205+
impl<T> Rc<T> {
204206
/// Downgrades the reference-counted pointer to a weak reference.
205207
#[experimental = "Weak pointers may not belong in this module"]
206208
pub fn downgrade(&self) -> Weak<T> {

0 commit comments

Comments
 (0)