Skip to content

Commit 6da0885

Browse files
committed
---
yaml --- r: 145746 b: refs/heads/try2 c: 41f9deb h: refs/heads/master v: v3
1 parent 28d070e commit 6da0885

File tree

6 files changed

+14
-1
lines changed

6 files changed

+14
-1
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: 50fde8c024a30d01ed54a2d40eab7399bf1e7a3c
8+
refs/heads/try2: 41f9deb2ee660cf45bc583171cc7c43a4b3ef4d5
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libstd/num/f32.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,9 @@ impl Primitive for f32 {
590590

591591
#[inline]
592592
fn bytes(_: Option<f32>) -> uint { Primitive::bits(Some(0f32)) / 8 }
593+
594+
#[inline]
595+
fn is_signed(_: Option<f32>) -> bool { true }
593596
}
594597

595598
impl Float for f32 {

branches/try2/src/libstd/num/f64.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,9 @@ impl Primitive for f64 {
638638

639639
#[inline]
640640
fn bytes(_: Option<f64>) -> uint { Primitive::bits(Some(0f64)) / 8 }
641+
642+
#[inline]
643+
fn is_signed(_: Option<f64>) -> bool { true }
641644
}
642645

643646
impl Float for f64 {

branches/try2/src/libstd/num/int_macros.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,9 @@ impl Primitive for $T {
380380

381381
#[inline]
382382
fn bytes(_: Option<$T>) -> uint { bits / 8 }
383+
384+
#[inline]
385+
fn is_signed(_: Option<$T>) -> bool { true }
383386
}
384387

385388
// String conversion functions and impl str -> num

branches/try2/src/libstd/num/num.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ pub trait Primitive: Clone
286286
// FIXME (#8888): Removing `unused_self` requires #8888 to be fixed.
287287
fn bits(unused_self: Option<Self>) -> uint;
288288
fn bytes(unused_self: Option<Self>) -> uint;
289+
fn is_signed(unused_self: Option<Self>) -> bool;
289290
}
290291

291292
/// A collection of traits relevant to primitive signed and unsigned integers

branches/try2/src/libstd/num/uint_macros.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,9 @@ impl Primitive for $T {
306306

307307
#[inline]
308308
fn bytes(_: Option<$T>) -> uint { bits / 8 }
309+
310+
#[inline]
311+
fn is_signed(_: Option<$T>) -> bool { false }
309312
}
310313

311314
impl BitCount for $T {

0 commit comments

Comments
 (0)