Skip to content

Commit 6dd5c7f

Browse files
committed
---
yaml --- r: 61253 b: refs/heads/try c: 4e1fac8 h: refs/heads/master i: 61251: 253d88a v: v3
1 parent 42c8a7f commit 6dd5c7f

39 files changed

+108
-553
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 2d28d645422c1617be58c8ca7ad9a457264ca850
5-
refs/heads/try: 84745b483f322671f894b9e8d0a462c46275a9d3
5+
refs/heads/try: 4e1fac89bb3e757801735ba6220ddf756054e071
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/libcore/at_vec.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@
1111
//! Managed vectors
1212
1313
use cast::transmute;
14-
use container::Container;
1514
use kinds::Copy;
1615
use old_iter;
17-
use old_iter::BaseIter;
1816
use option::Option;
1917
use sys;
2018
use uint;

branches/try/src/libcore/comm.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,12 @@ Message passing
1313
*/
1414

1515
use cast::{transmute, transmute_mut};
16-
use container::Container;
1716
use either::{Either, Left, Right};
1817
use kinds::Owned;
1918
use option::{Option, Some, None};
2019
use uint;
20+
use unstable;
2121
use vec;
22-
use vec::OwnedVector;
2322
use util::replace;
2423
use unstable::sync::{Exclusive, exclusive};
2524

@@ -578,7 +577,7 @@ impl<T:Owned,
578577
#[cfg(test)]
579578
mod test {
580579
use either::Right;
581-
use super::{Chan, Port, oneshot, stream};
580+
use super::{Chan, Port, oneshot, recv_one, stream};
582581
583582
#[test]
584583
fn test_select2() {

branches/try/src/libcore/core.rc

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,48 @@ they contained the following prologue:
6868
#[cfg(test)] pub use ops = realcore::ops;
6969
#[cfg(test)] pub use cmp = realcore::cmp;
7070

71+
/* Reexported core operators */
72+
73+
pub use kinds::{Const, Copy, Owned};
74+
pub use ops::{Drop};
75+
pub use ops::{Add, Sub, Mul, Div, Rem, Neg, Not};
76+
pub use ops::{BitAnd, BitOr, BitXor};
77+
pub use ops::{Shl, Shr, Index};
78+
79+
80+
/* Reexported types and traits */
81+
82+
pub use option::{Option, Some, None};
83+
pub use result::{Result, Ok, Err};
84+
85+
pub use path::Path;
86+
pub use path::GenericPath;
87+
pub use path::WindowsPath;
88+
pub use path::PosixPath;
89+
90+
pub use tuple::{CopyableTuple, ImmutableTuple, ExtendedTupleOps};
91+
pub use str::{StrSlice};
92+
pub use container::{Container, Mutable};
93+
pub use vec::{CopyableVector, ImmutableVector};
94+
pub use vec::{ImmutableEqVector, ImmutableCopyableVector};
95+
pub use vec::{OwnedVector, OwnedCopyableVector, MutableVector};
96+
pub use old_iter::{BaseIter, ExtendedIter, EqIter, CopyableIter};
97+
pub use old_iter::{CopyableOrderedIter, CopyableNonstrictIter};
98+
pub use old_iter::{ExtendedMutableIter};
99+
pub use iter::Times;
100+
101+
pub use num::{Num, NumCast};
102+
pub use num::{Orderable, Signed, Unsigned, Round};
103+
pub use num::{Algebraic, Trigonometric, Exponential, Hyperbolic};
104+
pub use num::{Integer, Fractional, Real, RealExt};
105+
pub use num::{Bitwise, BitCount, Bounded};
106+
pub use num::{Primitive, Int, Float};
107+
108+
pub use ptr::Ptr;
109+
pub use from_str::FromStr;
110+
pub use to_str::ToStr;
111+
pub use clone::Clone;
112+
71113
// On Linux, link to the runtime with -lrt.
72114
#[cfg(target_os = "linux")]
73115
#[doc(hidden)]

branches/try/src/libcore/either.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,11 @@
1010

1111
//! A type that represents one of two alternatives
1212
13-
use container::Container;
1413
use cmp::Eq;
1514
use kinds::Copy;
16-
use old_iter::BaseIter;
1715
use result::Result;
1816
use result;
1917
use vec;
20-
use vec::OwnedVector;
2118

2219
/// The either type
2320
#[deriving(Clone, Eq)]

branches/try/src/libcore/hash.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121

2222
#[cfg(stage0)]
2323
use cast;
24-
use container::Container;
25-
use old_iter::BaseIter;
2624
use rt::io::Writer;
2725
use to_bytes::IterBytes;
2826
use uint;

branches/try/src/libcore/io.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ Basic input/output
1616

1717
use result::Result;
1818

19-
use container::Container;
2019
use int;
2120
use libc;
2221
use libc::{c_int, c_long, c_void, size_t, ssize_t};
@@ -25,15 +24,11 @@ use os;
2524
use cast;
2625
use path::Path;
2726
use ops::Drop;
28-
use old_iter::{BaseIter, CopyableIter};
2927
use ptr;
3028
use result;
3129
use str;
32-
use str::StrSlice;
33-
use to_str::ToStr;
3430
use uint;
3531
use vec;
36-
use vec::{OwnedVector, OwnedCopyableVector};
3732

3833
#[allow(non_camel_case_types)] // not sure what to do about this
3934
pub type fd_t = c_int;

branches/try/src/libcore/iter.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ much easier to implement.
4242

4343
#[cfg(not(stage0))] use cmp::Ord;
4444
#[cfg(not(stage0))] use option::{Option, Some, None};
45-
#[cfg(not(stage0))] use vec::OwnedVector;
4645

4746
#[cfg(stage0)]
4847
pub trait Times {

branches/try/src/libcore/logging.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ pub fn console_off() {
4545
#[cfg(not(test))]
4646
#[lang="log_type"]
4747
pub fn log_type<T>(level: u32, object: &T) {
48-
use container::Container;
4948
use cast::transmute;
5049
use io;
5150
use libc;

branches/try/src/libcore/num/f32.rs

Lines changed: 0 additions & 148 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
//! Operations and constants for `f32`
1212
13-
use libc::c_int;
1413
use num::{Zero, One, strconv};
1514
use num::{FPCategory, FPNaN, FPInfinite , FPZero, FPSubnormal, FPNormal};
1615
use prelude::*;
@@ -451,57 +450,6 @@ impl Hyperbolic for f32 {
451450

452451
#[inline(always)]
453452
fn tanh(&self) -> f32 { tanh(*self) }
454-
455-
///
456-
/// Inverse hyperbolic sine
457-
///
458-
/// # Returns
459-
///
460-
/// - on success, the inverse hyperbolic sine of `self` will be returned
461-
/// - `self` if `self` is `0.0`, `-0.0`, `infinity`, or `neg_infinity`
462-
/// - `NaN` if `self` is `NaN`
463-
///
464-
#[inline(always)]
465-
fn asinh(&self) -> f32 {
466-
match *self {
467-
neg_infinity => neg_infinity,
468-
x => (x + ((x * x) + 1.0).sqrt()).ln(),
469-
}
470-
}
471-
472-
///
473-
/// Inverse hyperbolic cosine
474-
///
475-
/// # Returns
476-
///
477-
/// - on success, the inverse hyperbolic cosine of `self` will be returned
478-
/// - `infinity` if `self` is `infinity`
479-
/// - `NaN` if `self` is `NaN` or `self < 1.0` (including `neg_infinity`)
480-
///
481-
#[inline(always)]
482-
fn acosh(&self) -> f32 {
483-
match *self {
484-
x if x < 1.0 => Float::NaN(),
485-
x => (x + ((x * x) - 1.0).sqrt()).ln(),
486-
}
487-
}
488-
489-
///
490-
/// Inverse hyperbolic tangent
491-
///
492-
/// # Returns
493-
///
494-
/// - on success, the inverse hyperbolic tangent of `self` will be returned
495-
/// - `self` if `self` is `0.0` or `-0.0`
496-
/// - `infinity` if `self` is `1.0`
497-
/// - `neg_infinity` if `self` is `-1.0`
498-
/// - `NaN` if the `self` is `NaN` or outside the domain of `-1.0 <= self <= 1.0`
499-
/// (including `infinity` and `neg_infinity`)
500-
///
501-
#[inline(always)]
502-
fn atanh(&self) -> f32 {
503-
0.5 * ((2.0 * *self) / (1.0 - *self)).ln_1p()
504-
}
505453
}
506454

507455
impl Real for f32 {
@@ -672,25 +620,6 @@ impl Float for f32 {
672620
#[inline(always)]
673621
fn max_10_exp() -> int { 38 }
674622

675-
/// Constructs a floating point number by multiplying `x` by 2 raised to the power of `exp`
676-
#[inline(always)]
677-
fn ldexp(x: f32, exp: int) -> f32 {
678-
ldexp(x, exp as c_int)
679-
}
680-
681-
///
682-
/// Breaks the number into a normalized fraction and a base-2 exponent, satisfying:
683-
///
684-
/// - `self = x * pow(2, exp)`
685-
/// - `0.5 <= abs(x) < 1.0`
686-
///
687-
#[inline(always)]
688-
fn frexp(&self) -> (f32, int) {
689-
let mut exp = 0;
690-
let x = frexp(*self, &mut exp);
691-
(x, exp as int)
692-
}
693-
694623
///
695624
/// Returns the exponential of the number, minus `1`, in a way that is accurate
696625
/// even if the number is close to zero
@@ -1043,43 +972,6 @@ mod tests {
1043972
assert_approx_eq!((-1.7f32).fract(), -0.7f32);
1044973
}
1045974

1046-
#[test]
1047-
fn test_asinh() {
1048-
assert_eq!(0.0f32.asinh(), 0.0f32);
1049-
assert_eq!((-0.0f32).asinh(), -0.0f32);
1050-
assert_eq!(Float::infinity::<f32>().asinh(), Float::infinity::<f32>());
1051-
assert_eq!(Float::neg_infinity::<f32>().asinh(), Float::neg_infinity::<f32>());
1052-
assert!(Float::NaN::<f32>().asinh().is_NaN());
1053-
assert_approx_eq!(2.0f32.asinh(), 1.443635475178810342493276740273105f32);
1054-
assert_approx_eq!((-2.0f32).asinh(), -1.443635475178810342493276740273105f32);
1055-
}
1056-
1057-
#[test]
1058-
fn test_acosh() {
1059-
assert_eq!(1.0f32.acosh(), 0.0f32);
1060-
assert!(0.999f32.acosh().is_NaN());
1061-
assert_eq!(Float::infinity::<f32>().acosh(), Float::infinity::<f32>());
1062-
assert!(Float::neg_infinity::<f32>().acosh().is_NaN());
1063-
assert!(Float::NaN::<f32>().acosh().is_NaN());
1064-
assert_approx_eq!(2.0f32.acosh(), 1.31695789692481670862504634730796844f32);
1065-
assert_approx_eq!(3.0f32.acosh(), 1.76274717403908605046521864995958461f32);
1066-
}
1067-
1068-
#[test]
1069-
fn test_atanh() {
1070-
assert_eq!(0.0f32.atanh(), 0.0f32);
1071-
assert_eq!((-0.0f32).atanh(), -0.0f32);
1072-
assert_eq!(1.0f32.atanh(), Float::infinity::<f32>());
1073-
assert_eq!((-1.0f32).atanh(), Float::neg_infinity::<f32>());
1074-
assert!(2f64.atanh().atanh().is_NaN());
1075-
assert!((-2f64).atanh().atanh().is_NaN());
1076-
assert!(Float::infinity::<f64>().atanh().is_NaN());
1077-
assert!(Float::neg_infinity::<f64>().atanh().is_NaN());
1078-
assert!(Float::NaN::<f32>().atanh().is_NaN());
1079-
assert_approx_eq!(0.5f32.atanh(), 0.54930614433405484569762261846126285f32);
1080-
assert_approx_eq!((-0.5f32).atanh(), -0.54930614433405484569762261846126285f32);
1081-
}
1082-
1083975
#[test]
1084976
fn test_real_consts() {
1085977
assert_approx_eq!(Real::two_pi::<f32>(), 2f32 * Real::pi::<f32>());
@@ -1199,44 +1091,4 @@ mod tests {
11991091
assert_eq!(1e-37f32.classify(), FPNormal);
12001092
assert_eq!(1e-38f32.classify(), FPSubnormal);
12011093
}
1202-
1203-
#[test]
1204-
fn test_ldexp() {
1205-
// We have to use from_str until base-2 exponents
1206-
// are supported in floating-point literals
1207-
let f1: f32 = from_str_hex("1p-123").unwrap();
1208-
let f2: f32 = from_str_hex("1p-111").unwrap();
1209-
assert_eq!(Float::ldexp(1f32, -123), f1);
1210-
assert_eq!(Float::ldexp(1f32, -111), f2);
1211-
1212-
assert_eq!(Float::ldexp(0f32, -123), 0f32);
1213-
assert_eq!(Float::ldexp(-0f32, -123), -0f32);
1214-
assert_eq!(Float::ldexp(Float::infinity::<f32>(), -123),
1215-
Float::infinity::<f32>());
1216-
assert_eq!(Float::ldexp(Float::neg_infinity::<f32>(), -123),
1217-
Float::neg_infinity::<f32>());
1218-
assert!(Float::ldexp(Float::NaN::<f32>(), -123).is_NaN());
1219-
}
1220-
1221-
#[test]
1222-
fn test_frexp() {
1223-
// We have to use from_str until base-2 exponents
1224-
// are supported in floating-point literals
1225-
let f1: f32 = from_str_hex("1p-123").unwrap();
1226-
let f2: f32 = from_str_hex("1p-111").unwrap();
1227-
let (x1, exp1) = f1.frexp();
1228-
let (x2, exp2) = f2.frexp();
1229-
assert_eq!((x1, exp1), (0.5f32, -122));
1230-
assert_eq!((x2, exp2), (0.5f32, -110));
1231-
assert_eq!(Float::ldexp(x1, exp1), f1);
1232-
assert_eq!(Float::ldexp(x2, exp2), f2);
1233-
1234-
assert_eq!(0f32.frexp(), (0f32, 0));
1235-
assert_eq!((-0f32).frexp(), (-0f32, 0));
1236-
assert_eq!(match Float::infinity::<f32>().frexp() { (x, _) => x },
1237-
Float::infinity::<f32>())
1238-
assert_eq!(match Float::neg_infinity::<f32>().frexp() { (x, _) => x },
1239-
Float::neg_infinity::<f32>())
1240-
assert!(match Float::NaN::<f32>().frexp() { (x, _) => x.is_NaN() })
1241-
}
12421094
}

0 commit comments

Comments
 (0)