diff options
| author | David Rajchenbach-Teller <dteller@mozilla.com> | 2011-10-12 10:25:39 +0200 |
|---|---|---|
| committer | David Rajchenbach-Teller <dteller@mozilla.com> | 2011-10-12 10:56:05 +0200 |
| commit | 8c9dd54dedecd0ba94b96c8a79f2e62582afdf77 (patch) | |
| tree | 6bcebb13988d0c343f27415de42f2aed8b174460 /src/comp | |
| parent | 7faed3d87ca4f20b2da41cf5410598b48438c04b (diff) | |
[Renaming] str_to_float is now float::from_str, float_to_str is now float::to_str
Diffstat (limited to 'src/comp')
| -rw-r--r-- | src/comp/driver/rustc.rs | 2 | ||||
| -rw-r--r-- | src/comp/middle/typeck.rs | 4 | ||||
| -rw-r--r-- | src/comp/util/common.rs | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/comp/driver/rustc.rs b/src/comp/driver/rustc.rs index 9c7923a2ffe..4dc58c04fe5 100644 --- a/src/comp/driver/rustc.rs +++ b/src/comp/driver/rustc.rs @@ -94,7 +94,7 @@ fn time<@T>(do_it: bool, what: str, thunk: fn() -> T) -> T { let rv = thunk(); let end = std::time::precise_time_s(); log_err #fmt["time: %s took %s s", what, - std::float::float_to_str(end - start, 3u)]; + std::float::to_str(end - start, 3u)]; ret rv; } diff --git a/src/comp/middle/typeck.rs b/src/comp/middle/typeck.rs index 94ac0cf3ed1..695000f7cf9 100644 --- a/src/comp/middle/typeck.rs +++ b/src/comp/middle/typeck.rs @@ -1303,8 +1303,8 @@ fn valid_range_bounds(l1: @ast::lit, l2: @ast::lit) -> bool { alt l1.node { ast::lit_float(s1) | ast::lit_mach_float(_, s1) { let s2 = lit_as_float(l2); - let f1 = std::float::str_to_float(s1); - let f2 = std::float::str_to_float(s2); + let f1 = std::float::from_str(s1); + let f2 = std::float::from_str(s2); ret *util::common::min(f1, f2) == f1 } ast::lit_uint(_) | ast::lit_char(_) { diff --git a/src/comp/util/common.rs b/src/comp/util/common.rs index a0cd519641b..60f35816d90 100644 --- a/src/comp/util/common.rs +++ b/src/comp/util/common.rs @@ -156,8 +156,8 @@ fn lit_in_range(l: @ast::lit, m1: @ast::lit, m2: @ast::lit) -> bool { frange(f1, f2) { alt l.node { ast::lit_float(f3) | ast::lit_mach_float(_, f3) { - std::float::str_to_float(f3) >= *min(f1, f2) && - std::float::str_to_float(f3) <= *max(f1, f2) + std::float::from_str(f3) >= *min(f1, f2) && + std::float::from_str(f3) <= *max(f1, f2) } _ { fail } } @@ -232,7 +232,7 @@ fn lits_to_range(l: @ast::lit, r: @ast::lit) -> range { } ast::lit_float(f1) | ast::lit_mach_float(_, f1) { alt r.node { ast::lit_float(f2) | ast::lit_mach_float(_, f2) { - frange(std::float::str_to_float(f1), std::float::str_to_float(f2)) + frange(std::float::from_str(f1), std::float::from_str(f2)) } _ { fail } } } |
