Skip to content

Commit ee6f7f7

Browse files
committed
---
yaml --- r: 159210 b: refs/heads/snap-stage3 c: 88c743d h: refs/heads/master v: v3
1 parent 9f734d0 commit ee6f7f7

File tree

307 files changed

+3453
-3188
lines changed

Some content is hidden

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

307 files changed

+3453
-3188
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 40fb87d40f681f5356af42175fc7b85da387f037
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: f97524387d0cabc146f6e2944eb6c820256493ef
4+
refs/heads/snap-stage3: 88c743def3cf42ee943ca09dda1e6dccf4894db9
55
refs/heads/try: f58aad6dce273570fb130b4df008ef9acd5a5be2
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/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;
1211
use std::fmt;
12+
use std::str::FromStr;
1313
use regex::Regex;
1414

1515
#[deriving(Clone, PartialEq)]

branches/snap-stage3/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::from_str::FromStr;
25+
use std::str::FromStr;
2626
use getopts::{optopt, optflag, reqopt};
2727
use common::Config;
2828
use common::{Pretty, DebugInfoGdb, DebugInfoLldb, Codegen};

branches/snap-stage3/src/compiletest/header.rs

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

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

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

359357
return major * 1000 + minor;
360358
}
@@ -364,6 +362,6 @@ pub fn lldb_version_to_int(version_string: &str) -> int {
364362
"Encountered LLDB version string with unexpected format: {}",
365363
version_string);
366364
let error_string = error_string.as_slice();
367-
let major: int = FromStr::from_str(version_string).expect(error_string);
365+
let major: int = from_str(version_string).expect(error_string);
368366
return major;
369367
}

branches/snap-stage3/src/compiletest/runtest.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
399399
procsrv::run("",
400400
config.adb_path.as_slice(),
401401
None,
402-
[
402+
&[
403403
"push".to_string(),
404404
exe_file.as_str().unwrap().to_string(),
405405
config.adb_test_dir.clone()
@@ -411,7 +411,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
411411
procsrv::run("",
412412
config.adb_path.as_slice(),
413413
None,
414-
[
414+
&[
415415
"forward".to_string(),
416416
"tcp:5039".to_string(),
417417
"tcp:5039".to_string()
@@ -432,7 +432,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
432432
config.adb_path
433433
.as_slice(),
434434
None,
435-
[
435+
&[
436436
"shell".to_string(),
437437
adb_arg.clone()
438438
],
@@ -746,7 +746,7 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
746746
cmd.arg(lldb_script_path)
747747
.arg(test_executable)
748748
.arg(debugger_script)
749-
.env_set_all([("PYTHONPATH", config.lldb_python_dir.clone().unwrap().as_slice())]);
749+
.env_set_all(&[("PYTHONPATH", config.lldb_python_dir.clone().unwrap().as_slice())]);
750750

751751
let (status, out, err) = match cmd.spawn() {
752752
Ok(process) => {
@@ -1142,11 +1142,11 @@ struct ProcRes {
11421142

11431143
fn compile_test(config: &Config, props: &TestProps,
11441144
testfile: &Path) -> ProcRes {
1145-
compile_test_(config, props, testfile, [])
1145+
compile_test_(config, props, testfile, &[])
11461146
}
11471147

11481148
fn jit_test(config: &Config, props: &TestProps, testfile: &Path) -> ProcRes {
1149-
compile_test_(config, props, testfile, ["--jit".to_string()])
1149+
compile_test_(config, props, testfile, &["--jit".to_string()])
11501150
}
11511151

11521152
fn compile_test_(config: &Config, props: &TestProps,
@@ -1507,7 +1507,7 @@ fn _arm_exec_compiled_test(config: &Config,
15071507
let copy_result = procsrv::run("",
15081508
config.adb_path.as_slice(),
15091509
None,
1510-
[
1510+
&[
15111511
"push".to_string(),
15121512
args.prog.clone(),
15131513
config.adb_test_dir.clone()
@@ -1624,7 +1624,7 @@ fn _arm_push_aux_shared_library(config: &Config, testfile: &Path) {
16241624
let copy_result = procsrv::run("",
16251625
config.adb_path.as_slice(),
16261626
None,
1627-
[
1627+
&[
16281628
"push".to_string(),
16291629
file.as_str()
16301630
.unwrap()

branches/snap-stage3/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, only safe way to have a
98+
Second, it makes cost explicit. In general, the 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/snap-stage3/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-
fn foo(x) {
136+
func foo(x) {
137137
x = 5
138138
}
139139
140-
fn main() {
140+
func 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-
fn foo(&int x) {
156+
func foo(&int x) {
157157
*x = 5
158158
}
159159
160-
fn main() {
160+
func 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-
fn make_pointer(): &int {
195+
func make_pointer(): &int {
196196
x = 5;
197197
198198
return &x;
199199
}
200200
201-
fn main() {
201+
func 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-
fn mutate(&int i, int j) {
217+
func mutate(&int i, int j) {
218218
*i = j;
219219
}
220220
221-
fn main() {
221+
func main() {
222222
x = 5;
223223
y = &x;
224224
z = &x; //y and z are aliased

branches/snap-stage3/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 a O(n) operation.
158+
through the characters anyway, which is an O(n) operation.
159159

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

branches/snap-stage3/src/doc/guide-testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ will be counted as a failure. For example:
8484
#[test]
8585
#[should_fail]
8686
fn test_out_of_bounds_failure() {
87-
let v: &[int] = [];
87+
let v: &[int] = &[];
8888
v[0];
8989
}
9090
~~~

branches/snap-stage3/src/doc/reference.md

Lines changed: 16 additions & 13 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,10 +458,9 @@ Examples of floating-point literals of various forms:
458458
12E+99_f64; // type f64
459459
```
460460

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

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`.
463+
The two values of the boolean type are written `true` and `false`.
465464

466465
### Symbols
467466

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

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

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

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

25892588
# Statements and expressions
@@ -2685,7 +2684,7 @@ When an lvalue is evaluated in an _lvalue context_, it denotes a memory
26852684
location; when evaluated in an _rvalue context_, it denotes the value held _in_
26862685
that memory location.
26872686

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

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

27182717
### Tuple expressions
27192718

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

27232722
```{.tuple}
@@ -2726,6 +2725,11 @@ parentheses. They are used to create [tuple-typed](#tuple-types) values.
27262725
("a", 4u, true);
27272726
```
27282727

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

27312735
```{.ebnf .gram}
@@ -2833,7 +2837,7 @@ foo().x;
28332837
```
28342838

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

28392843
Also, if the type of the expression to the left of the dot is a pointer, it is
@@ -3108,11 +3112,10 @@ then the expression completes.
31083112
Some examples of call expressions:
31093113

31103114
```
3111-
# use std::from_str::FromStr;
31123115
# fn add(x: int, y: int) -> int { 0 }
31133116
31143117
let x: int = add(1, 2);
3115-
let pi: Option<f32> = FromStr::from_str("3.14");
3118+
let pi: Option<f32> = from_str("3.14");
31163119
```
31173120

31183121
### Lambda expressions
@@ -3321,7 +3324,7 @@ between `_` and `..` is that the pattern `C(_)` is only type-correct if `C` has
33213324
exactly one argument, while the pattern `C(..)` is type-correct for any enum
33223325
variant `C`, regardless of how many arguments `C` has.
33233326

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

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

branches/snap-stage3/src/etc/generate-deriving-span-tests.py

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

branches/snap-stage3/src/etc/snapshot.py

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

7676

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

branches/snap-stage3/src/etc/vim/syntax/rust.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ syn keyword rustTrait RawPtr
105105
syn keyword rustTrait Buffer Writer Reader Seek
106106
syn keyword rustTrait Str StrVector StrSlice
107107
syn keyword rustTrait IntoMaybeOwned StrAllocating UnicodeStrSlice
108-
syn keyword rustTrait ToString IntoStr
108+
syn keyword rustTrait ToString IntoString
109109
syn keyword rustTrait Tuple1 Tuple2 Tuple3 Tuple4
110110
syn keyword rustTrait Tuple5 Tuple6 Tuple7 Tuple8
111111
syn keyword rustTrait Tuple9 Tuple10 Tuple11 Tuple12

branches/snap-stage3/src/liballoc/rc.rs

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

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

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

0 commit comments

Comments
 (0)