Skip to content

Commit 7cdb615

Browse files
committed
---
yaml --- r: 56534 b: refs/heads/auto c: 500078e h: refs/heads/master v: v3
1 parent 66155c7 commit 7cdb615

File tree

7 files changed

+12
-6
lines changed

7 files changed

+12
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ 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: d3f494f5c3ce96da2e0c8090fc17a8738e4396c1
17+
refs/heads/auto: 500078e147e1e5f5cf9bd57459ebbdda652d97ed
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/src/libcore/core.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ pub use iter::{ExtendedMutableIter};
105105

106106
pub use num::{Num, NumCast};
107107
pub use num::{Orderable, Signed, Unsigned, Round};
108-
pub use num::{Algebraic, Trigonometric, Exponential};
108+
pub use num::{Algebraic, Trigonometric, Exponential, Hyperbolic};
109109
pub use num::{Integer, Fractional, Real, RealExt};
110110
pub use num::{Bitwise, BitCount, Bounded};
111111
pub use num::{Primitive, Int, Float};

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,9 @@ impl Exponential for f32 {
425425

426426
#[inline(always)]
427427
fn log10(&self) -> f32 { log10(*self) }
428+
}
428429

430+
impl Hyperbolic for f32 {
429431
#[inline(always)]
430432
fn sinh(&self) -> f32 { sinh(*self) }
431433

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,9 @@ impl Exponential for f64 {
437437

438438
#[inline(always)]
439439
fn log10(&self) -> f64 { log10(*self) }
440+
}
440441

442+
impl Hyperbolic for f64 {
441443
#[inline(always)]
442444
fn sinh(&self) -> f64 { sinh(*self) }
443445

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,9 @@ impl Exponential for float {
547547
fn log10(&self) -> float {
548548
(*self as f64).log10() as float
549549
}
550+
}
550551
552+
impl Hyperbolic for float {
551553
#[inline(always)]
552554
fn sinh(&self) -> float {
553555
(*self as f64).sinh() as float

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ pub trait Exponential {
131131
fn log(&self) -> Self;
132132
fn log2(&self) -> Self;
133133
fn log10(&self) -> Self;
134+
}
134135

135-
// The Hyperbolic Functions are trivially implemented in terms of `exp`, so it's simpler
136-
// to group them within this trait. In the future these would have default implementations.
136+
pub trait Hyperbolic: Exponential {
137137
fn sinh(&self) -> Self;
138138
fn cosh(&self) -> Self;
139139
fn tanh(&self) -> Self;
@@ -146,7 +146,7 @@ pub trait Real: Signed
146146
+ Fractional
147147
+ Algebraic
148148
+ Trigonometric
149-
+ Exponential {
149+
+ Hyperbolic {
150150
// Common Constants
151151
// FIXME (#5527): These should be associated constants
152152
fn pi() -> Self;

branches/auto/src/libcore/prelude.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pub use iter::{CopyableIter, CopyableOrderedIter, CopyableNonstrictIter};
3939
pub use iter::{Times, ExtendedMutableIter};
4040
pub use num::{Num, NumCast};
4141
pub use num::{Orderable, Signed, Unsigned, Round};
42-
pub use num::{Algebraic, Trigonometric, Exponential};
42+
pub use num::{Algebraic, Trigonometric, Exponential, Hyperbolic};
4343
pub use num::{Integer, Fractional, Real, RealExt};
4444
pub use num::{Bitwise, BitCount, Bounded};
4545
pub use num::{Primitive, Int, Float};

0 commit comments

Comments
 (0)