File tree Expand file tree Collapse file tree 6 files changed +14
-1
lines changed
branches/try2/src/libstd/num Expand file tree Collapse file tree 6 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
5
5
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
- refs/heads/try2: 50fde8c024a30d01ed54a2d40eab7399bf1e7a3c
8
+ refs/heads/try2: 41f9deb2ee660cf45bc583171cc7c43a4b3ef4d5
9
9
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
10
10
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
11
11
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
Original file line number Diff line number Diff line change @@ -590,6 +590,9 @@ impl Primitive for f32 {
590
590
591
591
#[ inline]
592
592
fn bytes ( _: Option < f32 > ) -> uint { Primitive :: bits ( Some ( 0f32 ) ) / 8 }
593
+
594
+ #[ inline]
595
+ fn is_signed ( _: Option < f32 > ) -> bool { true }
593
596
}
594
597
595
598
impl Float for f32 {
Original file line number Diff line number Diff line change @@ -638,6 +638,9 @@ impl Primitive for f64 {
638
638
639
639
#[ inline]
640
640
fn bytes ( _: Option < f64 > ) -> uint { Primitive :: bits ( Some ( 0f64 ) ) / 8 }
641
+
642
+ #[ inline]
643
+ fn is_signed ( _: Option < f64 > ) -> bool { true }
641
644
}
642
645
643
646
impl Float for f64 {
Original file line number Diff line number Diff line change @@ -380,6 +380,9 @@ impl Primitive for $T {
380
380
381
381
#[ inline]
382
382
fn bytes( _: Option <$T>) -> uint { bits / 8 }
383
+
384
+ #[ inline]
385
+ fn is_signed( _: Option <$T>) -> bool { true }
383
386
}
384
387
385
388
// String conversion functions and impl str -> num
Original file line number Diff line number Diff line change @@ -286,6 +286,7 @@ pub trait Primitive: Clone
286
286
// FIXME (#8888): Removing `unused_self` requires #8888 to be fixed.
287
287
fn bits ( unused_self : Option < Self > ) -> uint ;
288
288
fn bytes ( unused_self : Option < Self > ) -> uint ;
289
+ fn is_signed ( unused_self : Option < Self > ) -> bool ;
289
290
}
290
291
291
292
/// A collection of traits relevant to primitive signed and unsigned integers
Original file line number Diff line number Diff line change @@ -306,6 +306,9 @@ impl Primitive for $T {
306
306
307
307
#[ inline]
308
308
fn bytes( _: Option <$T>) -> uint { bits / 8 }
309
+
310
+ #[ inline]
311
+ fn is_signed( _: Option <$T>) -> bool { false }
309
312
}
310
313
311
314
impl BitCount for $T {
You can’t perform that action at this time.
0 commit comments