Skip to content

Commit 3be1cf6

Browse files
committed
---
yaml --- r: 82164 b: refs/heads/master c: 41f9deb h: refs/heads/master v: v3
1 parent 92051b4 commit 3be1cf6

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
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 50fde8c024a30d01ed54a2d40eab7399bf1e7a3c
2+
refs/heads/master: 41f9deb2ee660cf45bc583171cc7c43a4b3ef4d5
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6c08cc2db4f98e9f07ae7d50338396c4123c2f0a
55
refs/heads/try: 70152ff55722878cde684ee6462c14c65f2c4729

trunk/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 {

trunk/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 {

trunk/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

trunk/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

trunk/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)