Skip to content

Commit 1577397

Browse files
committed
---
yaml --- r: 152317 b: refs/heads/try2 c: 792fae3 h: refs/heads/master i: 152315: 21e6304 v: v3
1 parent c86a0ff commit 1577397

File tree

224 files changed

+1173
-1847
lines changed

Some content is hidden

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

224 files changed

+1173
-1847
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 61d79175c018a193a7676fe804f1b89280e18937
8+
refs/heads/try2: 792fae35f73b2fa8a8429f5489b5ed1a6b7fcc82
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ script: |
4040
if [[ $LLVM_VERSION != '3.4' ]]; then exit 0; fi
4141
fi &&
4242
make tidy &&
43-
travis_wait make -j4 rustc-stage1 &&
43+
make -j4 rustc-stage1 &&
4444
make check-stage1-std check-stage1-rpass check-stage1-cfail check-stage1-rfail check-stage1-doc
4545
4646
env:

branches/try2/AUTHORS.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ Rust was written by these fine people:
33
Aaron Laursen <aaronlaursen@gmail.com>
44
Aaron Todd <github@opprobrio.us>
55
Adam Bozanich <adam.boz@gmail.com>
6-
Adolfo Ochagavía <aochagavia92@gmail.com>
76
Adrien Tétar <adri-from-59@hotmail.fr>
87
Alan Andrade <alan.andradec@gmail.com>
98
Aleksander Balicki <balicki.aleksander@gmail.com>
@@ -26,6 +25,7 @@ Andrew Chin <achin@eminence32.net>
2625
Andrew Dunham <andrew@du.nham.ca>
2726
Andrew Paseltiner <apaseltiner@gmail.com>
2827
Anthony Juckel <ajuckel@gmail.com>
28+
aochagavia <aochagavia92@gmail.com>
2929
Arcterus <Arcterus@mail.com>
3030
Arkaitz Jimenez <arkaitzj@gmail.com>
3131
Armin Ronacher <armin.ronacher@active-4.com>

branches/try2/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@ do
11361136
CXXFLAGS=$LLVM_CXXFLAGS
11371137
LDFLAGS=$LLVM_LDFLAGS
11381138

1139-
if [ -z "$CFG_DISABLE_LIBCPP" ] && [ -n "$CFG_USING_CLANG" ]; then
1139+
if [ "$CFG_DISABLE_LIBCPP" != 1 ] && [ "$CFG_USING_CLANG" == 1 ]; then
11401140
LLVM_OPTS="$LLVM_OPTS --enable-libcpp"
11411141
fi
11421142

branches/try2/mk/crates.mk

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,36 +60,36 @@ DEPS_core :=
6060
DEPS_rlibc :=
6161
DEPS_alloc := core libc native:jemalloc
6262
DEPS_debug := std
63-
DEPS_std := core rand libc alloc collections native:rustrt native:backtrace
63+
DEPS_std := core rand libc alloc native:rustrt native:backtrace
6464
DEPS_graphviz := std
6565
DEPS_green := std native:context_switch
6666
DEPS_rustuv := std native:uv native:uv_support
6767
DEPS_native := std
68-
DEPS_syntax := std term serialize log fmt_macros debug
68+
DEPS_syntax := std term serialize collections log fmt_macros debug
6969
DEPS_rustc := syntax native:rustllvm flate arena serialize sync getopts \
70-
time log graphviz debug
71-
DEPS_rustdoc := rustc native:hoedown serialize sync getopts \
70+
collections time log graphviz debug
71+
DEPS_rustdoc := rustc native:hoedown serialize sync getopts collections \
7272
test time debug
7373
DEPS_flate := std native:miniz
74-
DEPS_arena := std
74+
DEPS_arena := std collections
7575
DEPS_graphviz := std
7676
DEPS_glob := std
77-
DEPS_serialize := std log
78-
DEPS_term := std log
77+
DEPS_serialize := std collections log
78+
DEPS_term := std collections log
7979
DEPS_semver := std
8080
DEPS_uuid := std serialize
8181
DEPS_sync := std alloc
8282
DEPS_getopts := std
83-
DEPS_collections := core alloc
83+
DEPS_collections := std debug
8484
DEPS_fourcc := syntax std
8585
DEPS_hexfloat := syntax std
8686
DEPS_num := std
87-
DEPS_test := std getopts serialize term time regex native:rust_test_helpers
87+
DEPS_test := std collections getopts serialize term time regex
8888
DEPS_time := std serialize sync
8989
DEPS_rand := core
90-
DEPS_url := std
90+
DEPS_url := std collections
9191
DEPS_log := std sync
92-
DEPS_regex := std
92+
DEPS_regex := std collections
9393
DEPS_regex_macros = syntax std regex
9494
DEPS_fmt_macros = std
9595

@@ -105,7 +105,6 @@ ONLY_RLIB_libc := 1
105105
ONLY_RLIB_rlibc := 1
106106
ONLY_RLIB_alloc := 1
107107
ONLY_RLIB_rand := 1
108-
ONLY_RLIB_collections := 1
109108

110109
################################################################################
111110
# You should not need to edit below this line

branches/try2/mk/rt.mk

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@
3535
# that's per-target so you're allowed to conditionally add files based on the
3636
# target.
3737
################################################################################
38-
NATIVE_LIBS := rustrt hoedown uv_support morestack miniz context_switch \
39-
rust_test_helpers
38+
NATIVE_LIBS := rustrt hoedown uv_support morestack miniz context_switch
4039

4140
# $(1) is the target triple
4241
define NATIVE_LIBRARIES
@@ -54,9 +53,9 @@ NATIVE_DEPS_uv_support_$(1) := rust_uv.c
5453
NATIVE_DEPS_miniz_$(1) = miniz.c
5554
NATIVE_DEPS_rustrt_$(1) := rust_builtin.c \
5655
rust_android_dummy.c \
56+
rust_test_helpers.c \
5757
rust_try.ll \
5858
arch/$$(HOST_$(1))/record_sp.S
59-
NATIVE_DEPS_rust_test_helpers_$(1) := rust_test_helpers.c
6059
NATIVE_DEPS_morestack_$(1) := arch/$$(HOST_$(1))/morestack.S
6160
NATIVE_DEPS_context_switch_$(1) := \
6261
arch/$$(HOST_$(1))/_context.S

branches/try2/src/compiletest/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub fn load_errors(re: &Regex, testfile: &Path) -> Vec<ExpectedError> {
3131
fn parse_expected(line_num: uint, line: &str, re: &Regex) -> Option<ExpectedError> {
3232
re.captures(line).and_then(|caps| {
3333
let adjusts = caps.name("adjusts").len();
34-
let kind = caps.name("kind").to_ascii().to_lower().into_str();
34+
let kind = caps.name("kind").to_ascii().to_lower().into_str().to_string();
3535
let msg = caps.name("msg").trim().to_string();
3636

3737
debug!("line={} kind={} msg={}", line_num, kind, msg);

branches/try2/src/compiletest/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub fn make_new_path(path: &str) -> String {
4141
Some(curr) => {
4242
format!("{}{}{}", path, path_div(), curr)
4343
}
44-
None => path.to_str()
44+
None => path.to_str().to_string()
4545
}
4646
}
4747

branches/try2/src/doc/complement-cheatsheet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Use [`ToStr`](std/to_str/trait.ToStr.html).
88

99
~~~
1010
let x: int = 42;
11-
let y: String = x.to_str();
11+
let y: String = x.to_str().to_string();
1212
~~~
1313

1414
**String to int**

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ Despite their complete safety, a reference's representation at runtime
1414
is the same as that of an ordinary pointer in a C program. They introduce zero
1515
overhead. The compiler does all safety checks at compile time.
1616

17-
Although references have rather elaborate theoretical underpinnings
18-
(e.g. region pointers), the core concepts will be familiar to anyone
19-
who has worked with C or C++. The best way to explain how they are
17+
Although references have rather elaborate theoretical underpinnings usually
18+
introduced as (e.g. region pointers), the core concepts will be familiar to
19+
anyone who has worked with C or C++. The best way to explain how they are
2020
used—and their limitations—is probably just to work through several examples.
2121

2222
# By example

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ fn stringifier(channel: &sync::DuplexStream<String, uint>) {
467467
let mut value: uint;
468468
loop {
469469
value = channel.recv();
470-
channel.send(value.to_str());
470+
channel.send(value.to_str().to_string());
471471
if value == 0 { break; }
472472
}
473473
}
@@ -492,7 +492,7 @@ extern crate sync;
492492
# let mut value: uint;
493493
# loop {
494494
# value = channel.recv();
495-
# channel.send(value.to_str());
495+
# channel.send(value.to_str().to_string());
496496
# if value == 0u { break; }
497497
# }
498498
# }

branches/try2/src/doc/rust.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2524,10 +2524,10 @@ Note that for a given *unit-like* structure type, this will always be the same v
25242524

25252525
A structure expression can terminate with the syntax `..` followed by an expression to denote a functional update.
25262526
The expression following `..` (the base) must have the same structure type as the new structure type being formed.
2527-
The entire expression denotes the result of allocating a new structure
2527+
The entire expression denotes the result of constructing a new structure
25282528
(with the same type as the base expression)
25292529
with the given values for the fields that were explicitly specified
2530-
and the values in the base record for all other fields.
2530+
and the values in the base expression for all other fields.
25312531

25322532
~~~~
25332533
# struct Point3d { x: int, y: int, z: int }
@@ -2575,15 +2575,15 @@ when not immediately followed by a parenthesized expression-list (the latter is
25752575
A field expression denotes a field of a [structure](#structure-types).
25762576

25772577
~~~~ {.ignore .field}
2578-
myrecord.myfield;
2578+
mystruct.myfield;
25792579
foo().x;
25802580
(Struct {a: 10, b: 20}).a;
25812581
~~~~
25822582

2583-
A field access on a record is an [lvalue](#lvalues-rvalues-and-temporaries) referring to the value of that field.
2584-
When the field is mutable, it can be [assigned](#assignment-expressions) to.
2583+
A field access is an [lvalue](#lvalues-rvalues-and-temporaries) referring to the value of that field.
2584+
When the type providing the field inherits mutabilty, it can be [assigned](#assignment-expressions) to.
25852585

2586-
When the type of the expression to the left of the dot is a pointer to a record or structure,
2586+
Also, if the type of the expression to the left of the dot is a pointer,
25872587
it is automatically dereferenced to make the field access possible.
25882588

25892589
### Vector expressions
@@ -3038,7 +3038,7 @@ match_pat : pat [ '|' pat ] * [ "if" expr ] ? ;
30383038

30393039
A `match` expression branches on a *pattern*. The exact form of matching that
30403040
occurs depends on the pattern. Patterns consist of some combination of
3041-
literals, destructured vectors or enum constructors, structures, records and
3041+
literals, destructured vectors or enum constructors, structures and
30423042
tuples, variable binding specifications, wildcards (`..`), and placeholders
30433043
(`_`). A `match` expression has a *head expression*, which is the value to
30443044
compare to the patterns. The type of the patterns must equal the type of the
@@ -3315,17 +3315,16 @@ such as `&str` or `String`.
33153315

33163316
### Tuple types
33173317

3318-
The tuple type-constructor forms a new heterogeneous product of values similar
3319-
to the record type-constructor. The differences are as follows:
3320-
3321-
* tuple elements cannot be mutable, unlike record fields
3322-
* tuple elements are not named and can be accessed only by pattern-matching
3318+
A tuple *type* is a heterogeneous product of other types, called the *elements*
3319+
of the tuple. It has no nominal name and is instead structurally typed.
33233320

33243321
Tuple types and values are denoted by listing the types or values of their
33253322
elements, respectively, in a parenthesized, comma-separated
33263323
list.
33273324

3328-
The members of a tuple are laid out in memory contiguously, like a record, in
3325+
Because tuple elements don't have a name, they can only be accessed by pattern-matching.
3326+
3327+
The members of a tuple are laid out in memory contiguously, in
33293328
order specified by the tuple type.
33303329

33313330
An example of a tuple type and its use:
@@ -3377,12 +3376,13 @@ of the type.[^structtype]
33773376

33783377
New instances of a `struct` can be constructed with a [struct expression](#structure-expressions).
33793378

3380-
The memory order of fields in a `struct` is given by the item defining it.
3381-
Fields may be given in any order in a corresponding struct *expression*;
3382-
the resulting `struct` value will always be laid out in memory in the order specified by the corresponding *item*.
3379+
The memory layout of a `struct` is undefined by default to allow for compiler optimziations like
3380+
field reordering, but it can be fixed with the `#[repr(...)]` attribute.
3381+
In either case, fields may be given in any order in a corresponding struct *expression*;
3382+
the resulting `struct` value will always have the same memory layout.
33833383

33843384
The fields of a `struct` may be qualified by [visibility modifiers](#re-exporting-and-visibility),
3385-
to restrict access to implementation-private data in a structure.
3385+
to allow access to data in a structure outside a module.
33863386

33873387
A _tuple struct_ type is just like a structure type, except that the fields are anonymous.
33883388

@@ -3579,7 +3579,7 @@ trait Printable {
35793579
}
35803580
35813581
impl Printable for int {
3582-
fn to_string(&self) -> String { self.to_str() }
3582+
fn to_string(&self) -> String { self.to_str().to_string() }
35833583
}
35843584
35853585
fn print(a: Box<Printable>) {
@@ -3933,7 +3933,7 @@ The runtime provides C and Rust code to assist with various built-in types,
39333933
such as vectors, strings, and the low level communication system (ports,
39343934
channels, tasks).
39353935

3936-
Support for other built-in types such as simple types, tuples, records, and
3936+
Support for other built-in types such as simple types, tuples and
39373937
enums is open-coded by the Rust compiler.
39383938

39393939
### Task scheduling and communication

branches/try2/src/doc/tutorial.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2058,7 +2058,8 @@ illegal to copy and pass by value.
20582058
Generic `type`, `struct`, and `enum` declarations follow the same pattern:
20592059

20602060
~~~~
2061-
type Set<T> = std::collections::HashMap<T, ()>;
2061+
extern crate collections;
2062+
type Set<T> = collections::HashMap<T, ()>;
20622063
20632064
struct Stack<T> {
20642065
elements: Vec<T>

branches/try2/src/etc/licenseck.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
"libstd/sync/spsc_queue.rs", # BSD
4343
"libstd/sync/mpmc_bounded_queue.rs", # BSD
4444
"libsync/mpsc_intrusive.rs", # BSD
45-
"test/bench/shootout-meteor.rs", # BSD
4645
]
4746

4847
def check_license(name, contents):

branches/try2/src/libarena/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
html_root_url = "http://doc.rust-lang.org/")]
2929
#![allow(missing_doc)]
3030

31+
extern crate collections;
32+
3133
use std::cell::{Cell, RefCell};
3234
use std::cmp;
3335
use std::intrinsics::{TyDesc, get_tydesc};

branches/try2/src/libcollections/bitv.rs

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,14 @@
1010

1111
#![allow(missing_doc)]
1212

13-
use core::prelude::*;
1413

15-
use core::cmp;
16-
use core::fmt;
17-
use core::iter::{Enumerate, Repeat, Map, Zip};
18-
use core::ops;
19-
use core::slice;
20-
use core::uint;
21-
22-
use vec::Vec;
14+
use std::cmp;
15+
use std::fmt;
16+
use std::iter::RandomAccessIterator;
17+
use std::iter::{Enumerate, Repeat, Map, Zip};
18+
use std::ops;
19+
use std::slice;
20+
use std::uint;
2321

2422
#[deriving(Clone)]
2523
struct SmallBitv {
@@ -979,26 +977,26 @@ impl<'a> Iterator<uint> for BitPositions<'a> {
979977

980978
#[cfg(test)]
981979
mod tests {
982-
use std::prelude::*;
983-
use std::uint;
984-
use std::rand;
985-
use std::rand::Rng;
986-
use test::Bencher;
980+
extern crate test;
981+
use self::test::Bencher;
987982

988983
use bitv::{Bitv, SmallBitv, BigBitv, BitvSet, from_bools, from_fn,
989984
from_bytes};
990985
use bitv;
991-
use vec::Vec;
986+
987+
use std::uint;
988+
use std::rand;
989+
use std::rand::Rng;
992990

993991
static BENCH_BITS : uint = 1 << 14;
994992

995993
#[test]
996994
fn test_to_str() {
997995
let zerolen = Bitv::new(0u, false);
998-
assert_eq!(zerolen.to_str().as_slice(), "");
996+
assert_eq!(zerolen.to_str(), "".to_string());
999997

1000998
let eightbits = Bitv::new(8u, false);
1001-
assert_eq!(eightbits.to_str().as_slice(), "00000000")
999+
assert_eq!(eightbits.to_str(), "00000000".to_string());
10021000
}
10031001

10041002
#[test]
@@ -1021,7 +1019,7 @@ mod tests {
10211019
let mut b = bitv::Bitv::new(2, false);
10221020
b.set(0, true);
10231021
b.set(1, false);
1024-
assert_eq!(b.to_str().as_slice(), "10");
1022+
assert_eq!(b.to_str(), "10".to_string());
10251023
}
10261024

10271025
#[test]
@@ -1332,7 +1330,7 @@ mod tests {
13321330
fn test_from_bytes() {
13331331
let bitv = from_bytes([0b10110110, 0b00000000, 0b11111111]);
13341332
let str = format!("{}{}{}", "10110110", "00000000", "11111111");
1335-
assert_eq!(bitv.to_str().as_slice(), str.as_slice());
1333+
assert_eq!(bitv.to_str(), str);
13361334
}
13371335

13381336
#[test]
@@ -1349,8 +1347,8 @@ mod tests {
13491347

13501348
#[test]
13511349
fn test_from_bools() {
1352-
assert!(from_bools([true, false, true, true]).to_str().as_slice() ==
1353-
"1011");
1350+
assert!(from_bools([true, false, true, true]).to_str() ==
1351+
"1011".to_string());
13541352
}
13551353

13561354
#[test]

0 commit comments

Comments
 (0)