diff options
| author | bors <bors@rust-lang.org> | 2013-07-09 13:34:50 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-07-09 13:34:50 -0700 |
| commit | e388a80c234d628c4d1fab77dc3e3f2c04cbefc5 (patch) | |
| tree | 694f659ded49c002e1aee01146eed625ab50c1bc /src/librustc/metadata | |
| parent | 5aa0ca9b2eb28166d9ab2e86557a5b1f84230b46 (diff) | |
| parent | 20a2fbd05557b21b7e3f38d17250388a350d3484 (diff) | |
| download | rust-e388a80c234d628c4d1fab77dc3e3f2c04cbefc5.tar.gz rust-e388a80c234d628c4d1fab77dc3e3f2c04cbefc5.zip | |
auto merge of #7117 : jensnockert/rust/freestanding, r=cmr
The free-standing functions in f32, f64, i8, i16, i32, i64, u8, u16, u32, u64, float, int, and uint are replaced with generic functions in num instead. This means that instead of having to know everywhere what the type is, like ~~~ f64::sin(x) ~~~ You can simply write code that uses the type-generic versions in num instead, this works for all types that implement the corresponding trait in num. ~~~ num::sin(x) ~~~ Note 1: If you were previously using any of those functions, just replace them with the corresponding function with the same name in num. Note 2: If you were using a function that corresponds to an operator, use the operator instead. Note 3: This is just https://github.com/mozilla/rust/pull/7090 reopened against master.
Diffstat (limited to 'src/librustc/metadata')
| -rw-r--r-- | src/librustc/metadata/loader.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc/metadata/loader.rs b/src/librustc/metadata/loader.rs index 9aefb8fdb55..98f7dd766a4 100644 --- a/src/librustc/metadata/loader.rs +++ b/src/librustc/metadata/loader.rs @@ -25,11 +25,11 @@ use syntax::{ast, attr}; use std::cast; use std::io; +use std::num; use std::option; use std::os::consts::{macos, freebsd, linux, android, win32}; use std::ptr; use std::str; -use std::uint; use std::vec; use extra::flate; @@ -213,7 +213,7 @@ fn get_metadata_section(os: os, let vlen = encoder::metadata_encoding_version.len(); debug!("checking %u bytes of metadata-version stamp", vlen); - let minsz = uint::min(vlen, csz); + let minsz = num::min(vlen, csz); let mut version_ok = false; do vec::raw::buf_as_slice(cvbuf, minsz) |buf0| { version_ok = (buf0 == |
