Skip to content

Commit 7f56ff7

Browse files
committed
---
yaml --- r: 27771 b: refs/heads/try c: bc6eaf2 h: refs/heads/master i: 27769: 5917cbf 27767: f627347 v: v3
1 parent 8150196 commit 7f56ff7

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
@@ -2,7 +2,7 @@
22
refs/heads/master: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
5-
refs/heads/try: 5394e34aa43687e36fb94656faf075b125c43bb5
5+
refs/heads/try: bc6eaf2acba7f71422e0540b0abbb7828f00b68f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df

branches/try/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/try/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/try/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)