Skip to content

Commit 69d1c6a

Browse files
committed
---
yaml --- r: 46203 b: refs/heads/auto c: d67e144 h: refs/heads/master i: 46201: 005d132 46199: d1776a1 v: v3
1 parent 795fd8a commit 69d1c6a

File tree

18 files changed

+419
-760
lines changed

18 files changed

+419
-760
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: 7393fde763484ec504399667c1808dc8c5a3559f
17+
refs/heads/auto: d67e144f685783503c1406cb4f28ea19d91d1fec

branches/auto/src/compiletest/compiletest.rc

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ mod errors;
3333
use std::getopts;
3434
use std::test;
3535

36-
use core::{result, either};
36+
use core::result;
3737
use result::{Ok, Err};
3838

3939
use common::config;
@@ -158,11 +158,7 @@ pub fn test_opts(config: config) -> test::TestOpts {
158158
test::TestOpts {
159159
filter: config.filter,
160160
run_ignored: config.run_ignored,
161-
logfile: copy config.logfile,
162-
run_tests: true,
163-
run_benchmarks: false,
164-
save_results: option::None,
165-
compare_results: option::None
161+
logfile: config.logfile.map(|s| s.to_str()),
166162
}
167163
}
168164

@@ -214,15 +210,13 @@ pub fn make_test(config: config, testfile: &Path) -> test::TestDescAndFn {
214210
}
215211
}
216212

217-
pub fn make_test_name(config: config, testfile: &Path) -> test::TestName {
218-
test::DynTestName(fmt!("[%s] %s",
219-
mode_str(config.mode),
220-
testfile.to_str()))
213+
pub fn make_test_name(config: config, testfile: &Path) -> ~str {
214+
fmt!("[%s] %s", mode_str(config.mode), testfile.to_str())
221215
}
222216

223217
pub fn make_test_closure(config: config, testfile: &Path) -> test::TestFn {
224218
let testfile = testfile.to_str();
225-
test::DynTestFn(fn~() { runtest::run(config, testfile) })
219+
fn~() { runtest::run(config, testfile) }
226220
}
227221

228222
// Local Variables:

branches/auto/src/libcore/cmp.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,3 @@ pub pure fn gt<T: Ord>(v1: &T, v2: &T) -> bool {
8585
(*v1).gt(v2)
8686
}
8787

88-
#[inline(always)]
89-
pub pure fn min<T: Ord>(v1: T, v2: T) -> T {
90-
if v1 < v2 { v1 } else { v2 }
91-
}
92-
93-
#[inline(always)]
94-
pub pure fn max<T: Ord>(v1: T, v2: T) -> T {
95-
if v1 > v2 { v1 } else { v2 }
96-
}

branches/auto/src/libcore/either.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ pub pure fn unwrap_right<T,U>(eith: Either<T,U>) -> U {
145145
}
146146
}
147147

148-
pub impl<T, U> Either<T, U> {
148+
impl<T, U> Either<T, U> {
149149
#[inline(always)]
150150
fn either<V>(&self, f_left: fn(&T) -> V, f_right: fn(&U) -> V) -> V {
151151
either(f_left, f_right, self)

branches/auto/src/libcore/num/f64.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ use to_str;
2121
use from_str;
2222

2323
pub use cmath::c_double_targ_consts::*;
24-
pub use cmp::{min, max};
2524

2625
macro_rules! delegate(
2726
(

branches/auto/src/libcore/num/int-template.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,18 @@ use vec;
2424
use i8;
2525
use i16;
2626
use i32;
27-
pub use cmp::{min, max};
2827

2928
pub const bits : uint = inst::bits;
3029
pub const bytes : uint = (inst::bits / 8);
3130

3231
pub const min_value: T = (-1 as T) << (bits - 1);
3332
pub const max_value: T = min_value - 1 as T;
3433

34+
#[inline(always)]
35+
pub pure fn min(x: T, y: T) -> T { if x < y { x } else { y } }
36+
#[inline(always)]
37+
pub pure fn max(x: T, y: T) -> T { if x > y { x } else { y } }
38+
3539
#[inline(always)]
3640
pub pure fn add(x: T, y: T) -> T { x + y }
3741
#[inline(always)]

branches/auto/src/libcore/num/num.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ pub trait One {
3939
static pure fn one() -> Self;
4040
}
4141

42-
pub pure fn abs<T: Ord Num Zero>(v: T) -> T {
43-
if v < Zero::zero() { v.neg() } else { v }
44-
}
45-
4642
pub trait Round {
4743
pure fn round(&self, mode: RoundMode) -> Self;
4844

branches/auto/src/libcore/num/uint-template.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,17 @@ use u8;
2727
use u16;
2828
use u32;
2929

30-
pub use cmp::{min, max};
31-
3230
pub const bits : uint = inst::bits;
3331
pub const bytes : uint = (inst::bits / 8);
3432

3533
pub const min_value: T = 0 as T;
3634
pub const max_value: T = 0 as T - 1 as T;
3735

36+
#[inline(always)]
37+
pub pure fn min(x: T, y: T) -> T { if x < y { x } else { y } }
38+
#[inline(always)]
39+
pub pure fn max(x: T, y: T) -> T { if x > y { x } else { y } }
40+
3841
#[inline(always)]
3942
pub pure fn add(x: T, y: T) -> T { x + y }
4043
#[inline(always)]

0 commit comments

Comments
 (0)