Skip to content

Commit 98da553

Browse files
committed
---
yaml --- r: 139819 b: refs/heads/try2 c: fdb4ef3 h: refs/heads/master i: 139817: 93079e5 139815: 13c0309 v: v3
1 parent dcee834 commit 98da553

Some content is hidden

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

115 files changed

+4413
-4025
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: a5ddc009829bef149a9e2f127e80609589604443
8+
refs/heads/try2: fdb4ef321ed5eee681c2b723dcb157c280aa72f2
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/AUTHORS.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Bilal Husain <[email protected]>
3131
Bill Fallon <[email protected]>
3232
Brendan Eich <[email protected]>
3333
Brendan Zabarauskas <[email protected]>
34+
Brett Cannon <[email protected]>
3435
Brian Anderson <[email protected]>
3536
Brian J. Burg <[email protected]>
3637
Brian Leibig <[email protected]>
@@ -50,6 +51,7 @@ Dave Herman <[email protected]>
5051
David Forsythe <[email protected]>
5152
David Klein <[email protected]>
5253
David Rajchenbach-Teller <[email protected]>
54+
Diggory Hardy <[email protected]>
5355
Dimitri Krassovski <[email protected]>
5456
Donovan Preston <[email protected]>
5557
Drew Willcoxon <[email protected]>
@@ -76,9 +78,11 @@ Ian D. Bollinger <[email protected]>
7678
Ilyong Cho <[email protected]>
7779
Isaac Aggrey <[email protected]>
7880
Ivano Coppola <[email protected]>
81+
Jack Moffitt <[email protected]>
7982
Jacob Harris Cryer Kragh <[email protected]>
8083
Jacob Parker <[email protected]>
8184
Jakub Wieczorek <[email protected]>
85+
James Miller <[email protected]>
8286
Jason Orendorff <[email protected]>
8387
Jed Davis <[email protected]>
8488
Jeff Balogh <[email protected]>

branches/try2/RELEASES.txt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
1+
Version 0.7 (July 2013)
2+
-----------------------
3+
4+
* ??? changes, numerous bugfixes
5+
6+
* Semantic changes
7+
* The `self` parameter no longer implicitly means `&'self self`, and can be explicitly marked
8+
with a lifetime.
9+
10+
* Libraries
11+
* New `core::iterator` module for external iterator objects
12+
113
Version 0.6 (April 2013)
2-
---------------------------
14+
------------------------
315

416
* ~2100 changes, numerous bugfixes
517

branches/try2/src/compiletest/errors.rs

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -30,36 +30,34 @@ pub fn load_errors(testfile: &Path) -> ~[ExpectedError] {
3030
}
3131

3232
fn parse_expected(line_num: uint, line: ~str) -> ~[ExpectedError] {
33-
unsafe {
34-
let error_tag = ~"//~";
35-
let mut idx;
36-
match str::find_str(line, error_tag) {
37-
None => return ~[],
38-
Some(nn) => { idx = (nn as uint) + str::len(error_tag); }
39-
}
33+
let error_tag = ~"//~";
34+
let mut idx;
35+
match str::find_str(line, error_tag) {
36+
None => return ~[],
37+
Some(nn) => { idx = (nn as uint) + str::len(error_tag); }
38+
}
4039

41-
// "//~^^^ kind msg" denotes a message expected
42-
// three lines above current line:
43-
let mut adjust_line = 0u;
44-
let len = str::len(line);
45-
while idx < len && line[idx] == ('^' as u8) {
46-
adjust_line += 1u;
47-
idx += 1u;
48-
}
40+
// "//~^^^ kind msg" denotes a message expected
41+
// three lines above current line:
42+
let mut adjust_line = 0u;
43+
let len = str::len(line);
44+
while idx < len && line[idx] == ('^' as u8) {
45+
adjust_line += 1u;
46+
idx += 1u;
47+
}
4948

50-
// Extract kind:
51-
while idx < len && line[idx] == (' ' as u8) { idx += 1u; }
52-
let start_kind = idx;
53-
while idx < len && line[idx] != (' ' as u8) { idx += 1u; }
54-
let kind = str::to_lower(str::slice(line, start_kind, idx).to_owned());
49+
// Extract kind:
50+
while idx < len && line[idx] == (' ' as u8) { idx += 1u; }
51+
let start_kind = idx;
52+
while idx < len && line[idx] != (' ' as u8) { idx += 1u; }
53+
let kind = str::to_lower(str::slice(line, start_kind, idx).to_owned());
5554

56-
// Extract msg:
57-
while idx < len && line[idx] == (' ' as u8) { idx += 1u; }
58-
let msg = str::slice(line, idx, len).to_owned();
55+
// Extract msg:
56+
while idx < len && line[idx] == (' ' as u8) { idx += 1u; }
57+
let msg = str::slice(line, idx, len).to_owned();
5958

60-
debug!("line=%u kind=%s msg=%s", line_num - adjust_line, kind, msg);
59+
debug!("line=%u kind=%s msg=%s", line_num - adjust_line, kind, msg);
6160

62-
return ~[ExpectedError{line: line_num - adjust_line, kind: kind,
63-
msg: msg}];
64-
}
61+
return ~[ExpectedError{line: line_num - adjust_line, kind: kind,
62+
msg: msg}];
6563
}

branches/try2/src/compiletest/header.rs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -171,16 +171,14 @@ fn parse_name_directive(line: ~str, directive: ~str) -> bool {
171171

172172
fn parse_name_value_directive(line: ~str,
173173
directive: ~str) -> Option<~str> {
174-
unsafe {
175-
let keycolon = directive + ~":";
176-
match str::find_str(line, keycolon) {
177-
Some(colon) => {
178-
let value = str::slice(line, colon + str::len(keycolon),
179-
str::len(line)).to_owned();
180-
debug!("%s: %s", directive, value);
181-
Some(value)
182-
}
183-
None => None
174+
let keycolon = directive + ~":";
175+
match str::find_str(line, keycolon) {
176+
Some(colon) => {
177+
let value = str::slice(line, colon + str::len(keycolon),
178+
str::len(line)).to_owned();
179+
debug!("%s: %s", directive, value);
180+
Some(value)
184181
}
182+
None => None
185183
}
186184
}

branches/try2/src/etc/x86.supp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,6 @@
612612
llvm-optimization-reads-uninitialized-memory-9
613613
Memcheck:Cond
614614
fun:_ZN5parse6parser14__extensions__10meth_*parse_item_foreign_fn*
615-
fun:_ZN5parse6parser14__extensions__10meth_*parse_item_or_view_item*
616615
...
617616
}
618617

@@ -628,15 +627,13 @@
628627
llvm-optimization-reads-uninitialized-memory-12
629628
Memcheck:Cond
630629
fun:_ZN5parse6parser14__extensions__10meth_*parse_item_struct*
631-
fun:_ZN5parse6parser14__extensions__10meth_*parse_item_or_view_item*
632630
...
633631
}
634632

635633
{
636634
llvm-optimization-reads-uninitialized-memory-13
637635
Memcheck:Cond
638636
fun:_ZN5parse6parser14__extensions__10meth_*parse_item_type*
639-
fun:_ZN5parse6parser14__extensions__10meth_*parse_item_or_view_item*
640637
...
641638
}
642639

@@ -657,3 +654,11 @@
657654
fun:_ZN5visit30visit_struct_dtor_helper_*
658655
...
659656
}
657+
658+
{
659+
llvm-optimization-reads-uninitialized-memory-16
660+
Memcheck:Cond
661+
fun:_ZN7ast_map6map_fn*
662+
fun:_ZN5visit30visit_struct_dtor_helper*
663+
...
664+
}

branches/try2/src/libcore/at_vec.rs

Lines changed: 38 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -277,45 +277,49 @@ pub mod raw {
277277
pub unsafe fn reserve_at_least<T>(v: &mut @[T], n: uint) {
278278
reserve(v, uint::next_power_of_two(n));
279279
}
280-
281280
}
282281

283-
#[test]
284-
pub fn test() {
285-
// Some code that could use that, then:
286-
fn seq_range(lo: uint, hi: uint) -> @[uint] {
287-
do build |push| {
288-
for uint::range(lo, hi) |i| {
289-
push(i);
282+
#[cfg(test)]
283+
mod test {
284+
use super::*;
285+
use prelude::*;
286+
287+
#[test]
288+
fn test() {
289+
// Some code that could use that, then:
290+
fn seq_range(lo: uint, hi: uint) -> @[uint] {
291+
do build |push| {
292+
for uint::range(lo, hi) |i| {
293+
push(i);
294+
}
290295
}
291296
}
292-
}
293297

294-
assert_eq!(seq_range(10, 15), @[10, 11, 12, 13, 14]);
295-
assert!(from_fn(5, |x| x+1) == @[1, 2, 3, 4, 5]);
296-
assert!(from_elem(5, 3.14) == @[3.14, 3.14, 3.14, 3.14, 3.14]);
297-
}
298-
299-
#[test]
300-
pub fn append_test() {
301-
assert!(@[1,2,3] + @[4,5,6] == @[1,2,3,4,5,6]);
302-
}
298+
assert_eq!(seq_range(10, 15), @[10, 11, 12, 13, 14]);
299+
assert!(from_fn(5, |x| x+1) == @[1, 2, 3, 4, 5]);
300+
assert!(from_elem(5, 3.14) == @[3.14, 3.14, 3.14, 3.14, 3.14]);
301+
}
303302

304-
#[test]
305-
pub fn test_from_owned() {
306-
assert!(from_owned::<int>(~[]) == @[]);
307-
assert!(from_owned(~[true]) == @[true]);
308-
assert!(from_owned(~[1, 2, 3, 4, 5]) == @[1, 2, 3, 4, 5]);
309-
assert!(from_owned(~[~"abc", ~"123"]) == @[~"abc", ~"123"]);
310-
assert!(from_owned(~[~[42]]) == @[~[42]]);
311-
}
303+
#[test]
304+
fn append_test() {
305+
assert!(@[1,2,3] + @[4,5,6] == @[1,2,3,4,5,6]);
306+
}
312307

313-
#[test]
314-
pub fn test_from_slice() {
315-
assert!(from_slice::<int>([]) == @[]);
316-
assert!(from_slice([true]) == @[true]);
317-
assert!(from_slice([1, 2, 3, 4, 5]) == @[1, 2, 3, 4, 5]);
318-
assert!(from_slice([@"abc", @"123"]) == @[@"abc", @"123"]);
319-
assert!(from_slice([@[42]]) == @[@[42]]);
320-
}
308+
#[test]
309+
fn test_from_owned() {
310+
assert!(from_owned::<int>(~[]) == @[]);
311+
assert!(from_owned(~[true]) == @[true]);
312+
assert!(from_owned(~[1, 2, 3, 4, 5]) == @[1, 2, 3, 4, 5]);
313+
assert!(from_owned(~[~"abc", ~"123"]) == @[~"abc", ~"123"]);
314+
assert!(from_owned(~[~[42]]) == @[~[42]]);
315+
}
321316
317+
#[test]
318+
fn test_from_slice() {
319+
assert!(from_slice::<int>([]) == @[]);
320+
assert!(from_slice([true]) == @[true]);
321+
assert!(from_slice([1, 2, 3, 4, 5]) == @[1, 2, 3, 4, 5]);
322+
assert!(from_slice([@"abc", @"123"]) == @[@"abc", @"123"]);
323+
assert!(from_slice([@[42]]) == @[@[42]]);
324+
}
325+
}

branches/try2/src/libcore/cast.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,16 @@ pub unsafe fn copy_lifetime_vec<'a,S,T>(_ptr: &'a [S], ptr: &T) -> &'a T {
111111
****************************************************************************/
112112

113113
#[cfg(test)]
114-
pub mod tests {
114+
mod tests {
115115
use cast::{bump_box_refcount, reinterpret_cast, transmute};
116116

117117
#[test]
118-
pub fn test_reinterpret_cast() {
118+
fn test_reinterpret_cast() {
119119
assert!(1u == unsafe { reinterpret_cast(&1) });
120120
}
121121

122122
#[test]
123-
pub fn test_bump_box_refcount() {
123+
fn test_bump_box_refcount() {
124124
unsafe {
125125
let box = @~"box box box"; // refcount 1
126126
bump_box_refcount(box); // refcount 2
@@ -135,7 +135,7 @@ pub mod tests {
135135
}
136136
137137
#[test]
138-
pub fn test_transmute() {
138+
fn test_transmute() {
139139
use managed::raw::BoxRepr;
140140
unsafe {
141141
let x = @100u8;
@@ -146,7 +146,7 @@ pub mod tests {
146146
}
147147
148148
#[test]
149-
pub fn test_transmute2() {
149+
fn test_transmute2() {
150150
unsafe {
151151
assert!(~[76u8, 0u8] == transmute(~"L"));
152152
}

branches/try2/src/libcore/comm.rs

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -188,16 +188,14 @@ impl<T: Owned> Peekable<T> for Port<T> {
188188
189189
#[inline(always)]
190190
fn port_peek<T:Owned>(self: &Port<T>) -> bool {
191-
unsafe {
192-
let mut endp = None;
193-
endp <-> self.endp;
194-
let peek = match &endp {
195-
&Some(ref endp) => peek(endp),
196-
&None => fail!(~"peeking empty stream")
197-
};
198-
self.endp <-> endp;
199-
peek
200-
}
191+
let mut endp = None;
192+
endp <-> self.endp;
193+
let peek = match &endp {
194+
&Some(ref endp) => peek(endp),
195+
&None => fail!(~"peeking empty stream")
196+
};
197+
self.endp <-> endp;
198+
peek
201199
}
202200
203201
impl<T: Owned> Selectable for Port<T> {
@@ -428,12 +426,12 @@ pub fn try_send_one<T: Owned>(chan: ChanOne<T>, data: T)
428426
}
429427
430428
#[cfg(test)]
431-
pub mod test {
429+
mod test {
432430
use either::Right;
433431
use super::{Chan, Port, oneshot, recv_one, stream};
434432
435433
#[test]
436-
pub fn test_select2() {
434+
fn test_select2() {
437435
let (p1, c1) = stream();
438436
let (p2, c2) = stream();
439437
@@ -448,7 +446,7 @@ pub mod test {
448446
}
449447

450448
#[test]
451-
pub fn test_oneshot() {
449+
fn test_oneshot() {
452450
let (c, p) = oneshot::init();
453451

454452
oneshot::client::send(c, ());

0 commit comments

Comments
 (0)