Skip to content

Commit b71eacd

Browse files
committed
---
yaml --- r: 149423 b: refs/heads/try2 c: e2f99b9 h: refs/heads/master i: 149421: d124fbc 149419: 1224b9f 149415: 4702309 149407: 07fea0b v: v3
1 parent cd263e8 commit b71eacd

File tree

109 files changed

+1621
-1905
lines changed

Some content is hidden

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

109 files changed

+1621
-1905
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: c6aaf2c7bd69af2a3fc9a109a8c3a6c3004616f2
8+
refs/heads/try2: e2f99b93cd0f9bdbaf126ce3eb5b9a8f2be354f4
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/compiletest/runtest.rs

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -258,12 +258,15 @@ actual:\n\
258258
}
259259

260260
fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
261-
let mut config = config {
262-
target_rustcflags: cleanup_debug_info_options(&config.target_rustcflags),
263-
host_rustcflags: cleanup_debug_info_options(&config.host_rustcflags),
264-
.. config.clone()
265-
};
266261

262+
// do not optimize debuginfo tests
263+
let mut config = match config.target_rustcflags {
264+
Some(ref flags) => config {
265+
target_rustcflags: Some(flags.replace("-O", "")),
266+
.. (*config).clone()
267+
},
268+
None => (*config).clone()
269+
};
267270
let config = &mut config;
268271
let check_lines = &props.check_lines;
269272
let mut cmds = props.debugger_cmds.connect("\n");
@@ -433,20 +436,6 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
433436
check_lines[i]), &ProcRes);
434437
}
435438
}
436-
437-
fn cleanup_debug_info_options(options: &Option<~str>) -> Option<~str> {
438-
if options.is_none() {
439-
return None;
440-
}
441-
442-
// Remove options that are either unwanted (-O) or may lead to duplicates due to RUSTFLAGS.
443-
let options_to_remove = [~"-O", ~"-g", ~"--debuginfo"];
444-
let new_options = split_maybe_args(options).move_iter()
445-
.filter(|x| !options_to_remove.contains(x))
446-
.to_owned_vec()
447-
.connect(" ");
448-
Some(new_options)
449-
}
450439
}
451440

452441
fn check_error_patterns(props: &TestProps,

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

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ which both pattern-match on their input and both return early in one case,
1111
doing nothing otherwise:
1212

1313
~~~~
14-
# enum T { SpecialA(uint), SpecialB(uint) };
14+
# enum t { special_a(uint), special_b(uint) };
1515
# fn f() -> uint {
16-
# let input_1 = SpecialA(0);
17-
# let input_2 = SpecialA(0);
16+
# let input_1 = special_a(0);
17+
# let input_2 = special_a(0);
1818
match input_1 {
19-
SpecialA(x) => { return x; }
19+
special_a(x) => { return x; }
2020
_ => {}
2121
}
2222
// ...
2323
match input_2 {
24-
SpecialB(x) => { return x; }
24+
special_b(x) => { return x; }
2525
_ => {}
2626
}
2727
# return 0u;
@@ -37,22 +37,22 @@ lightweight custom syntax extensions, themselves defined using the
3737
the pattern in the above code:
3838

3939
~~~~
40-
# enum T { SpecialA(uint), SpecialB(uint) };
40+
# enum t { special_a(uint), special_b(uint) };
4141
# fn f() -> uint {
42-
# let input_1 = SpecialA(0);
43-
# let input_2 = SpecialA(0);
42+
# let input_1 = special_a(0);
43+
# let input_2 = special_a(0);
4444
macro_rules! early_return(
45-
($inp:expr $sp:ident) => ( // invoke it like `(input_5 SpecialE)`
45+
($inp:expr $sp:ident) => ( // invoke it like `(input_5 special_e)`
4646
match $inp {
4747
$sp(x) => { return x; }
4848
_ => {}
4949
}
5050
);
5151
)
5252
// ...
53-
early_return!(input_1 SpecialA);
53+
early_return!(input_1 special_a);
5454
// ...
55-
early_return!(input_2 SpecialB);
55+
early_return!(input_2 special_b);
5656
# return 0;
5757
# }
5858
~~~~
@@ -155,10 +155,10 @@ separator token (a comma-separated list could be written `$(...),*`), and `+`
155155
instead of `*` to mean "at least one".
156156

157157
~~~~
158-
# enum T { SpecialA(uint),SpecialB(uint),SpecialC(uint),SpecialD(uint)};
158+
# enum t { special_a(uint),special_b(uint),special_c(uint),special_d(uint)};
159159
# fn f() -> uint {
160-
# let input_1 = SpecialA(0);
161-
# let input_2 = SpecialA(0);
160+
# let input_1 = special_a(0);
161+
# let input_2 = special_a(0);
162162
macro_rules! early_return(
163163
($inp:expr, [ $($sp:ident)|+ ]) => (
164164
match $inp {
@@ -170,9 +170,9 @@ macro_rules! early_return(
170170
);
171171
)
172172
// ...
173-
early_return!(input_1, [SpecialA|SpecialC|SpecialD]);
173+
early_return!(input_1, [special_a|special_c|special_d]);
174174
// ...
175-
early_return!(input_2, [SpecialB]);
175+
early_return!(input_2, [special_b]);
176176
# return 0;
177177
# }
178178
~~~~
@@ -215,14 +215,14 @@ solves the problem.
215215
Now consider code like the following:
216216

217217
~~~~
218-
# enum T1 { Good1(T2, uint), Bad1};
219-
# struct T2 { body: T3 }
220-
# enum T3 { Good2(uint), Bad2};
221-
# fn f(x: T1) -> uint {
218+
# enum t1 { good_1(t2, uint), bad_1 };
219+
# struct t2 { body: t3 }
220+
# enum t3 { good_2(uint), bad_2};
221+
# fn f(x: t1) -> uint {
222222
match x {
223-
Good1(g1, val) => {
223+
good_1(g1, val) => {
224224
match g1.body {
225-
Good2(result) => {
225+
good_2(result) => {
226226
// complicated stuff goes here
227227
return result + val;
228228
},
@@ -261,13 +261,13 @@ macro_rules! biased_match (
261261
)
262262
)
263263
264-
# enum T1 { Good1(T2, uint), Bad1};
265-
# struct T2 { body: T3 }
266-
# enum T3 { Good2(uint), Bad2};
267-
# fn f(x: T1) -> uint {
268-
biased_match!((x) ~ (Good1(g1, val)) else { return 0 };
264+
# enum t1 { good_1(t2, uint), bad_1 };
265+
# struct t2 { body: t3 }
266+
# enum t3 { good_2(uint), bad_2};
267+
# fn f(x: t1) -> uint {
268+
biased_match!((x) ~ (good_1(g1, val)) else { return 0 };
269269
binds g1, val )
270-
biased_match!((g1.body) ~ (Good2(result) )
270+
biased_match!((g1.body) ~ (good_2(result) )
271271
else { fail!("Didn't get good_2") };
272272
binds result )
273273
// complicated stuff goes here
@@ -365,13 +365,13 @@ macro_rules! biased_match (
365365
)
366366
367367
368-
# enum T1 { Good1(T2, uint), Bad1};
369-
# struct T2 { body: T3 }
370-
# enum T3 { Good2(uint), Bad2};
371-
# fn f(x: T1) -> uint {
368+
# enum t1 { good_1(t2, uint), bad_1 };
369+
# struct t2 { body: t3 }
370+
# enum t3 { good_2(uint), bad_2};
371+
# fn f(x: t1) -> uint {
372372
biased_match!(
373-
(x) ~ (Good1(g1, val)) else { return 0 };
374-
(g1.body) ~ (Good2(result) ) else { fail!("Didn't get Good2") };
373+
(x) ~ (good_1(g1, val)) else { return 0 };
374+
(g1.body) ~ (good_2(result) ) else { fail!("Didn't get good_2") };
375375
binds val, result )
376376
// complicated stuff goes here
377377
return result + val;

branches/try2/src/doc/rust.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ Two examples of paths with type arguments:
470470
# use std::hashmap::HashMap;
471471
# fn f() {
472472
# fn id<T>(t: T) -> T { t }
473-
type T = HashMap<int,~str>; // Type arguments used in a type expression
473+
type t = HashMap<int,~str>; // Type arguments used in a type expression
474474
let x = id::<int>(10); // Type arguments used in a call expression
475475
# }
476476
~~~~
@@ -701,7 +701,7 @@ An example of a module:
701701

702702
~~~~
703703
mod math {
704-
type Complex = (f64, f64);
704+
type complex = (f64, f64);
705705
fn sin(f: f64) -> f64 {
706706
...
707707
# fail!();
@@ -2824,13 +2824,13 @@ provided by an implementation of `std::iter::Iterator`.
28242824
An example of a for loop over the contents of a vector:
28252825

28262826
~~~~
2827-
# type Foo = int;
2828-
# fn bar(f: Foo) { }
2827+
# type foo = int;
2828+
# fn bar(f: foo) { }
28292829
# let a = 0;
28302830
# let b = 0;
28312831
# let c = 0;
28322832
2833-
let v: &[Foo] = &[a, b, c];
2833+
let v: &[foo] = &[a, b, c];
28342834
28352835
for e in v.iter() {
28362836
bar(*e);

branches/try2/src/doc/tutorial.md

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -582,32 +582,6 @@ loop {
582582
This code prints out a weird sequence of numbers and stops as soon as
583583
it finds one that can be divided by five.
584584

585-
There is also a for-loop that can be used to iterate over a range of numbers:
586-
587-
~~~~
588-
for n in range(0, 5) {
589-
println!("{}", n);
590-
}
591-
~~~~
592-
593-
The snippet above prints integer numbers under 5 starting at 0.
594-
595-
More generally, a for loop works with anything implementing the `Iterator` trait.
596-
Data structures can provide one or more methods that return iterators over
597-
their contents. For example, strings support iteration over their contents in
598-
various ways:
599-
600-
~~~~
601-
let s = "Hello";
602-
for c in s.chars() {
603-
println!("{}", c);
604-
}
605-
~~~~
606-
607-
The snippet above prints the characters in "Hello" vertically, adding a new
608-
line after each character.
609-
610-
611585
# Data structures
612586

613587
## Structs

branches/try2/src/libcollections/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ pub use bitv::Bitv;
2626
pub use btree::BTree;
2727
pub use deque::Deque;
2828
pub use dlist::DList;
29-
pub use enum_set::EnumSet;
3029
pub use list::List;
3130
pub use lru_cache::LruCache;
3231
pub use priority_queue::PriorityQueue;
@@ -38,7 +37,6 @@ pub mod bitv;
3837
pub mod btree;
3938
pub mod deque;
4039
pub mod dlist;
41-
pub mod enum_set;
4240
pub mod list;
4341
pub mod lru_cache;
4442
pub mod priority_queue;

branches/try2/src/libcollections/enum_set.rs renamed to branches/try2/src/libextra/enum_set.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ mod test {
139139

140140
use std::cast;
141141

142-
use enum_set::{EnumSet, CLike};
142+
use enum_set::*;
143143

144144
#[deriving(Eq)]
145145
#[repr(uint)]

0 commit comments

Comments
 (0)