Skip to content

Commit 340869f

Browse files
committed
---
yaml --- r: 63218 b: refs/heads/snap-stage3 c: 96cd61a h: refs/heads/master v: v3
1 parent 7137237 commit 340869f

File tree

112 files changed

+835
-1000
lines changed

Some content is hidden

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

112 files changed

+835
-1000
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: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: d641b0b575f4de12900a0265e03bc34357b2a77f
4+
refs/heads/snap-stage3: 96cd61ad034cc9e88ab6a7845c3480dbc1ea62f3
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/doc/rust.css

Lines changed: 23 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,39 @@
11
body {
2-
padding: 1em 6em;
3-
margin: 0;
4-
margin-bottom: 4em;
5-
font-family: "Helvetica Neue", Helvetica, sans-serif;
6-
font-size: 12pt;
7-
background-color: white;
8-
color: black;
9-
line-height: 1.6em;
10-
min-width: 45em;
11-
max-width: 60em;
2+
padding: 1em;
3+
margin: 0;
4+
margin-bottom: 4em;
5+
font-family: "Helvetica Neue", Helvetica, sans-serif;
6+
background-color: white;
7+
color: black;
8+
line-height: 1.6em;
129
}
1310

14-
h1 {
15-
font-size: 20pt;
16-
margin-top: 2em;
17-
padding-left: 0.4em;
18-
line-height: 1.6em;
19-
background-color:#FFF2CE;
20-
border-radius: 0.2em;
21-
border: 1px solid rgba(0, 0, 0, 0.15);
11+
body {
12+
padding: 1em 6em;
13+
max-width: 60em;
2214
}
2315

16+
h1 {
17+
font-size: 20pt;
18+
margin-top: 2em;
19+
border-bottom: 1px solid silver;
20+
line-height: 1.6em;
21+
}
2422
h2 {
2523
font-size: 15pt;
2624
margin-top: 2em;
27-
padding-left: 0.4em;
28-
background-color:#FFF2CE;
29-
border-radius: 0.4em;
30-
border: 1px solid rgba(0, 0, 0, 0.15);
31-
}
32-
33-
h2 code {
34-
color: #097334;
35-
font-size: 15pt;
36-
}
37-
38-
h3 {
39-
font-size: 13pt;
40-
color: black;
41-
background-color:#D9E7FF;
42-
border-radius: 0.4em;
43-
border: 1px solid rgba(0, 0, 0, 0.15);
44-
padding: 0 0.4em 0 0.4em;
45-
}
46-
47-
h3 code {
48-
color: #541800;
49-
font-size: 13pt;
50-
font-style: italic;
51-
}
52-
53-
h4 {
54-
font-size: 11pt;
55-
margin-top: 0em;
56-
margin-bottom: 0em;
57-
}
58-
59-
code {
60-
font-size: 11pt;
6125
}
26+
h3 { font-size: 13pt; }
6227

6328
pre {
64-
margin-left: 1.1em;
65-
padding: .4em .4em .4em .8em;
66-
font-size: 10pt;
67-
background-color: #F5F5F5;
68-
border-radius: 0.5em;
69-
border: 1px solid rgba(0, 0, 0, 0.15);
70-
}
71-
72-
pre.rust {
73-
background-color: #F3F6FF;
29+
margin: 1.1em 0;
30+
padding: .4em .4em .4em 2em;
31+
font-size: 120%;
7432
}
7533

7634
a, a:visited, a:link {
77-
text-decoration: none;
78-
color: rgb(0, 105, 214);
35+
text-decoration: none;
36+
color: rgb(0, 105, 214);
7937
}
8038

8139
h1 a:link, h1 a:visited, h2 a:link, h2 a:visited,
@@ -148,12 +106,4 @@ td {
148106
/* Adjust list alignment so rustdoc indexes don't align with blockquotes */
149107
div.index ul {
150108
padding-left: 1em;
151-
}
152-
153-
ul {
154-
margin-top: 0em
155-
}
156-
157-
div.section.level3 {
158-
margin-left: 1.0em;
159-
}
109+
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
use core::prelude::*;
12+
use core::iterator::IteratorUtil;
1213

1314
use core::os;
1415
use core::run;
@@ -58,7 +59,7 @@ pub fn run(lib_path: &str,
5859
err_fd: None
5960
});
6061

61-
for input.each |input| {
62+
for input.iter().advance |input| {
6263
proc.input().write_str(*input);
6364
}
6465
let output = proc.finish_with_output();

branches/snap-stage3/src/libextra/flatpipes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ pub mod flatteners {
450450
T: Decodable<D>>(
451451
buf: &[u8])
452452
-> T {
453-
let buf = vec::to_owned(buf);
453+
let buf = buf.to_owned();
454454
let buf_reader = @BufReader::new(buf);
455455
let reader = buf_reader as @Reader;
456456
let mut deser: D = FromReader::from_reader(reader);

branches/snap-stage3/src/libextra/getopts.rs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ pub fn getopts(args: &[~str], opts: &[Opt]) -> Result {
345345
}
346346
i += 1;
347347
}
348-
return Ok(Matches {opts: vec::to_owned(opts),
348+
return Ok(Matches {opts: opts.to_owned(),
349349
vals: vals,
350350
free: free});
351351
}
@@ -447,7 +447,7 @@ pub fn opt_default(mm: &Matches, nm: &str, def: &str) -> Option<~str> {
447447
let vals = opt_vals(mm, nm);
448448
if vals.is_empty() { return None::<~str>; }
449449
return match vals[0] { Val(ref s) => Some::<~str>(copy *s),
450-
_ => Some::<~str>(str::to_owned(def)) }
450+
_ => Some::<~str>(def.to_owned()) }
451451
}
452452

453453
#[deriving(Eq)]
@@ -487,10 +487,10 @@ pub mod groups {
487487
desc: &str, hint: &str) -> OptGroup {
488488
let len = short_name.len();
489489
assert!(len == 1 || len == 0);
490-
return OptGroup { short_name: str::to_owned(short_name),
491-
long_name: str::to_owned(long_name),
492-
hint: str::to_owned(hint),
493-
desc: str::to_owned(desc),
490+
return OptGroup { short_name: short_name.to_owned(),
491+
long_name: long_name.to_owned(),
492+
hint: hint.to_owned(),
493+
desc: desc.to_owned(),
494494
hasarg: Yes,
495495
occur: Req};
496496
}
@@ -500,10 +500,10 @@ pub mod groups {
500500
desc: &str, hint: &str) -> OptGroup {
501501
let len = short_name.len();
502502
assert!(len == 1 || len == 0);
503-
return OptGroup {short_name: str::to_owned(short_name),
504-
long_name: str::to_owned(long_name),
505-
hint: str::to_owned(hint),
506-
desc: str::to_owned(desc),
503+
return OptGroup {short_name: short_name.to_owned(),
504+
long_name: long_name.to_owned(),
505+
hint: hint.to_owned(),
506+
desc: desc.to_owned(),
507507
hasarg: Yes,
508508
occur: Optional};
509509
}
@@ -513,10 +513,10 @@ pub mod groups {
513513
desc: &str) -> OptGroup {
514514
let len = short_name.len();
515515
assert!(len == 1 || len == 0);
516-
return OptGroup {short_name: str::to_owned(short_name),
517-
long_name: str::to_owned(long_name),
516+
return OptGroup {short_name: short_name.to_owned(),
517+
long_name: long_name.to_owned(),
518518
hint: ~"",
519-
desc: str::to_owned(desc),
519+
desc: desc.to_owned(),
520520
hasarg: No,
521521
occur: Optional};
522522
}
@@ -526,10 +526,10 @@ pub mod groups {
526526
desc: &str, hint: &str) -> OptGroup {
527527
let len = short_name.len();
528528
assert!(len == 1 || len == 0);
529-
return OptGroup {short_name: str::to_owned(short_name),
530-
long_name: str::to_owned(long_name),
531-
hint: str::to_owned(hint),
532-
desc: str::to_owned(desc),
529+
return OptGroup {short_name: short_name.to_owned(),
530+
long_name: long_name.to_owned(),
531+
hint: hint.to_owned(),
532+
desc: desc.to_owned(),
533533
hasarg: Maybe,
534534
occur: Optional};
535535
}
@@ -542,10 +542,10 @@ pub mod groups {
542542
desc: &str, hint: &str) -> OptGroup {
543543
let len = short_name.len();
544544
assert!(len == 1 || len == 0);
545-
return OptGroup {short_name: str::to_owned(short_name),
546-
long_name: str::to_owned(long_name),
547-
hint: str::to_owned(hint),
548-
desc: str::to_owned(desc),
545+
return OptGroup {short_name: short_name.to_owned(),
546+
long_name: long_name.to_owned(),
547+
hint: hint.to_owned(),
548+
desc: desc.to_owned(),
549549
hasarg: Yes,
550550
occur: Multi};
551551
}
@@ -654,7 +654,7 @@ pub mod groups {
654654
row
655655
});
656656

657-
return str::to_owned(brief) +
657+
return brief.to_owned() +
658658
"\n\nOptions:\n" +
659659
rows.connect("\n") +
660660
"\n\n";

branches/snap-stage3/src/libextra/md4.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub fn md4(msg: &[u8]) -> Quad {
3030
let orig_len: u64 = (msg.len() * 8u) as u64;
3131

3232
// pad message
33-
let mut msg = vec::append(vec::to_owned(msg), [0x80u8]);
33+
let mut msg = vec::append(msg.to_owned(), [0x80u8]);
3434
let mut bitlen = orig_len + 8u64;
3535
while (bitlen + 64u64) % 512u64 > 0u64 {
3636
msg.push(0u8);

branches/snap-stage3/src/libextra/num/bigint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ impl BigUint {
564564
/// Creates and initializes an BigUint.
565565
566566
pub fn from_slice(slice: &[BigDigit]) -> BigUint {
567-
return BigUint::new(vec::to_owned(slice));
567+
return BigUint::new(slice.to_owned());
568568
}
569569

570570
/// Creates and initializes an BigUint.

branches/snap-stage3/src/libextra/par.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ pub fn any<A:Copy + Owned>(
139139
fn_factory: &fn() -> ~fn(&A) -> bool) -> bool {
140140
let mapped = map_slices(xs, || {
141141
let f = fn_factory();
142-
let result: ~fn(uint, &[A]) -> bool = |_, slice| slice.iter().any(f);
142+
let result: ~fn(uint, &[A]) -> bool = |_, slice| slice.iter().any_(f);
143143
result
144144
});
145-
mapped.iter().any(|&x| x)
145+
mapped.iter().any_(|&x| x)
146146
}

branches/snap-stage3/src/libextra/stats.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ impl<'self> Stats for &'self [f64] {
5757

5858
fn median(self) -> f64 {
5959
assert!(self.len() != 0);
60-
let mut tmp = vec::to_owned(self);
60+
let mut tmp = self.to_owned();
6161
sort::tim_sort(tmp);
6262
if tmp.len() & 1 == 0 {
6363
let m = tmp.len() / 2;

branches/snap-stage3/src/libextra/time.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,7 @@ mod tests {
10291029
10301030
fn test(s: &str, format: &str) -> bool {
10311031
match strptime(s, format) {
1032-
Ok(ref tm) => tm.strftime(format) == str::to_owned(s),
1032+
Ok(ref tm) => tm.strftime(format) == s.to_owned(),
10331033
Err(e) => fail!(e)
10341034
}
10351035
}

branches/snap-stage3/src/libextra/treemap.rs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ impl<T: TotalOrd> Set<T> for TreeSet<T> {
427427
b = y.next();
428428
}
429429
}
430-
return b.each(|&x| f(x)) && y.advance(f);
430+
b.iter().advance(|&x| f(x)) && y.advance(f)
431431
}
432432

433433
/// Visit the values (in-order) representing the intersection
@@ -485,7 +485,7 @@ impl<T: TotalOrd> Set<T> for TreeSet<T> {
485485
a = x.next();
486486
}
487487
}
488-
return b.each(|&x| f(x)) && y.advance(f);
488+
b.iter().advance(|&x| f(x)) && y.advance(f)
489489
}
490490
}
491491

@@ -527,14 +527,14 @@ impl<K: TotalOrd, V> TreeNode<K, V> {
527527

528528
fn each<'r, K: TotalOrd, V>(node: &'r Option<~TreeNode<K, V>>,
529529
f: &fn(&'r K, &'r V) -> bool) -> bool {
530-
node.each(|x| each(&x.left, f) && f(&x.key, &x.value) &&
531-
each(&x.right, f))
530+
node.iter().advance(|x| each(&x.left, f) && f(&x.key, &x.value) &&
531+
each(&x.right, f))
532532
}
533533

534534
fn each_reverse<'r, K: TotalOrd, V>(node: &'r Option<~TreeNode<K, V>>,
535535
f: &fn(&'r K, &'r V) -> bool) -> bool {
536-
node.each(|x| each_reverse(&x.right, f) && f(&x.key, &x.value) &&
537-
each_reverse(&x.left, f))
536+
node.iter().advance(|x| each_reverse(&x.right, f) && f(&x.key, &x.value) &&
537+
each_reverse(&x.left, f))
538538
}
539539

540540
fn mutate_values<'r, K: TotalOrd, V>(node: &'r mut Option<~TreeNode<K, V>>,
@@ -625,7 +625,7 @@ fn remove<K: TotalOrd, V>(node: &mut Option<~TreeNode<K, V>>,
625625
fn heir_swap<K: TotalOrd, V>(node: &mut ~TreeNode<K, V>,
626626
child: &mut Option<~TreeNode<K, V>>) {
627627
// *could* be done without recursion, but it won't borrow check
628-
for child.each_mut |x| {
628+
for child.mut_iter().advance |x| {
629629
if x.right.is_some() {
630630
heir_swap(node, &mut x.right);
631631
} else {
@@ -680,18 +680,18 @@ fn remove<K: TotalOrd, V>(node: &mut Option<~TreeNode<K, V>>,
680680
save.level -= 1;
681681

682682
if right_level > save.level {
683-
for save.right.each_mut |x| { x.level = save.level }
683+
for save.right.mut_iter().advance |x| { x.level = save.level }
684684
}
685685

686686
skew(save);
687687

688-
for save.right.each_mut |right| {
688+
for save.right.mut_iter().advance |right| {
689689
skew(right);
690-
for right.right.each_mut |x| { skew(x) }
690+
for right.right.mut_iter().advance |x| { skew(x) }
691691
}
692692

693693
split(save);
694-
for save.right.each_mut |x| { split(x) }
694+
for save.right.mut_iter().advance |x| { split(x) }
695695
}
696696

697697
return ret;
@@ -1111,6 +1111,7 @@ mod test_set {
11111111

11121112
let mut n = 0;
11131113
for m.each |x| {
1114+
println(fmt!("%?", x));
11141115
assert_eq!(*x, n);
11151116
n += 1
11161117
}

branches/snap-stage3/src/libfuzzer/fuzzer.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ pub fn check_variants_T<T:Copy>(crate: @ast::crate,
328328
if L < 100 {
329329
do under(uint::min(L, 20)) |i| {
330330
error!("Replacing... #%?", uint::to_str(i));
331-
let fname = str::to_owned(filename.to_str());
331+
let fname = filename.to_str();
332332
do under(uint::min(L, 30)) |j| {
333333
let fname = fname.to_str();
334334
error!("With... %?", stringifier(things[j], intr));

0 commit comments

Comments
 (0)