Skip to content

Commit 96d7f83

Browse files
committed
Merge pull request #1350 from boggle/kmath
removed math leftovers from std
2 parents 93fef2e + b957916 commit 96d7f83

File tree

11 files changed

+8
-850
lines changed

11 files changed

+8
-850
lines changed

src/comp/back/rpath.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import std::fs;
33
import std::os_fs;
44
import vec;
55
import std::map;
6-
import std::math;
76
import str;
87
import uint;
98
import metadata::cstore;
@@ -129,7 +128,7 @@ fn get_relative_to(abs1: fs::path, abs2: fs::path) -> fs::path {
129128
assert len1 > 0u;
130129
assert len2 > 0u;
131130

132-
let max_common_path = math::min(len1, len2) - 1u;
131+
let max_common_path = float::min(len1, len2) - 1u;
133132
let start_idx = 0u;
134133
while start_idx < max_common_path
135134
&& split1[start_idx] == split2[start_idx] {

src/comp/middle/ty.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import uint;
44
import std::ufind;
55
import std::map;
66
import std::map::hashmap;
7-
import std::math;
87
import option;
98
import option::none;
109
import option::some;
@@ -1755,7 +1754,7 @@ mod unify {
17551754
// Unifies two sets.
17561755
fn union(cx: @ctxt, set_a: uint, set_b: uint,
17571756
variance: variance) -> union_result {
1758-
ufind::grow(cx.vb.sets, math::max(set_a, set_b) + 1u);
1757+
ufind::grow(cx.vb.sets, float::max(set_a, set_b) + 1u);
17591758
let root_a = ufind::find(cx.vb.sets, set_a);
17601759
let root_b = ufind::find(cx.vb.sets, set_b);
17611760

src/comp/util/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import core::{str, option};
2-
import std::math::{max, min};
2+
import core::float::{max, min};
33
import std::map::hashmap;
44
import option::{some};
55
import syntax::ast;

src/fuzzer/fuzzer.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import core::{vec, str, int, uint, option, result};
2-
import std::{fs, io, math};
2+
import std::{fs, io};
33

44
import rustc::syntax::{ast, ast_util, fold, visit, codemap};
55
import rustc::syntax::parse::parser;
@@ -241,9 +241,9 @@ fn check_variants_T<copy T>(
241241
let L = vec::len(things);
242242

243243
if L < 100u {
244-
under(math::min(L, 20u)) {|i|
244+
under(float::min(L, 20u)) {|i|
245245
log_err "Replacing... #" + uint::str(i);
246-
under(math::min(L, 30u)) {|j|
246+
under(float::min(L, 30u)) {|j|
247247
log_err "With... " + stringifier(@things[j]);
248248
let crate2 = @replacer(crate, i, things[j], cx.mode);
249249
// It would be best to test the *crate* for stability, but testing the

src/libstd/cmath.rs

Lines changed: 0 additions & 71 deletions
This file was deleted.

src/libstd/ctypes.rs

Lines changed: 0 additions & 146 deletions
This file was deleted.

0 commit comments

Comments
 (0)