Skip to content

Commit 8b260cd

Browse files
committed
---
yaml --- r: 21085 b: refs/heads/snap-stage3 c: bc6eaf2 h: refs/heads/master i: 21083: 2141c05 v: v3
1 parent b0bc902 commit 8b260cd

File tree

4 files changed

+19
-7
lines changed

4 files changed

+19
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: e430a699f2c60890d9b86069fd0c68a70ece7120
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 5394e34aa43687e36fb94656faf075b125c43bb5
4+
refs/heads/snap-stage3: bc6eaf2acba7f71422e0540b0abbb7828f00b68f
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libcore/f32.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// NB: transitionary, de-mode-ing.
2+
#[forbid(deprecated_mode)];
3+
#[forbid(deprecated_pattern)];
4+
15
//! Operations and constants for `f32`
26
37
// PORT

branches/snap-stage3/src/libcore/f64.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// NB: transitionary, de-mode-ing.
2+
#[forbid(deprecated_mode)];
3+
#[forbid(deprecated_pattern)];
4+
15
//! Operations and constants for `f64`
26
37
// PORT

branches/snap-stage3/src/libcore/float.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// NB: transitionary, de-mode-ing.
2+
#[forbid(deprecated_mode)];
3+
#[forbid(deprecated_pattern)];
4+
15
//! Operations and constants for `float`
26
37
// Even though this module exports everything defined in it,
@@ -238,12 +242,12 @@ fn to_str(num: float, digits: uint) -> ~str {
238242
* `none` if the string did not represent a valid number. Otherwise,
239243
* `some(n)` where `n` is the floating-point number represented by `[num]`.
240244
*/
241-
fn from_str(num: ~str) -> option<float> {
242-
if num == ~"inf" {
245+
fn from_str(num: &str) -> option<float> {
246+
if num == "inf" {
243247
return some(infinity as float);
244-
} else if num == ~"-inf" {
248+
} else if num == "-inf" {
245249
return some(neg_infinity as float);
246-
} else if num == ~"NaN" {
250+
} else if num == "NaN" {
247251
return some(NaN as float);
248252
}
249253

@@ -516,7 +520,7 @@ fn test_to_str_inf() {
516520

517521
#[test]
518522
fn test_traits() {
519-
fn test<U:num::Num>(ten: U) {
523+
fn test<U:num::Num>(ten: &U) {
520524
assert (ten.to_int() == 10);
521525

522526
let two = ten.from_int(2);
@@ -529,7 +533,7 @@ fn test_traits() {
529533
assert (ten.modulo(two) == ten.from_int(0));
530534
}
531535

532-
test(10.0);
536+
test(&10.0);
533537
}
534538

535539

0 commit comments

Comments
 (0)