Removed useless cmp::{min, max} reexports from the integer modules
This commit is contained in:
parent
90f9eb3b1e
commit
0d8ace823b
@ -10,32 +10,31 @@
|
||||
|
||||
|
||||
use back::{link};
|
||||
use std::libc::c_uint;
|
||||
use lib::llvm::{ValueRef, CallConv, StructRetAttribute};
|
||||
use lib::llvm::llvm;
|
||||
use lib::llvm::{ValueRef, CallConv, StructRetAttribute};
|
||||
use lib;
|
||||
use middle::trans::machine;
|
||||
use middle::trans::base;
|
||||
use middle::trans::base::push_ctxt;
|
||||
use middle::trans::cabi;
|
||||
use middle::trans::base;
|
||||
use middle::trans::build::*;
|
||||
use middle::trans::builder::noname;
|
||||
use middle::trans::cabi;
|
||||
use middle::trans::common::*;
|
||||
use middle::trans::machine;
|
||||
use middle::trans::type_::Type;
|
||||
use middle::trans::type_of::*;
|
||||
use middle::trans::type_of;
|
||||
use middle::ty;
|
||||
use middle::ty::FnSig;
|
||||
|
||||
use std::uint;
|
||||
use middle::ty;
|
||||
use std::cmp;
|
||||
use std::libc::c_uint;
|
||||
use std::vec;
|
||||
use syntax::abi::{Cdecl, Aapcs, C, AbiSet, Win64};
|
||||
use syntax::abi::{RustIntrinsic, Rust, Stdcall, Fastcall, System};
|
||||
use syntax::codemap::Span;
|
||||
use syntax::parse::token::special_idents;
|
||||
use syntax::{ast};
|
||||
use syntax::{attr, ast_map};
|
||||
use syntax::parse::token::special_idents;
|
||||
use syntax::abi::{RustIntrinsic, Rust, Stdcall, Fastcall, System,
|
||||
Cdecl, Aapcs, C, AbiSet, Win64};
|
||||
use util::ppaux::{Repr, UserString};
|
||||
use middle::trans::type_::Type;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// Type definitions
|
||||
@ -332,7 +331,7 @@ pub fn trans_native_call(bcx: @mut Block,
|
||||
let llrust_size = machine::llsize_of_store(ccx, llrust_ret_ty);
|
||||
let llforeign_align = machine::llalign_of_min(ccx, llforeign_ret_ty);
|
||||
let llrust_align = machine::llalign_of_min(ccx, llrust_ret_ty);
|
||||
let llalign = uint::min(llforeign_align, llrust_align);
|
||||
let llalign = cmp::min(llforeign_align, llrust_align);
|
||||
debug!("llrust_size={:?}", llrust_size);
|
||||
base::call_memcpy(bcx, llretptr_i8, llscratch_i8,
|
||||
C_uint(ccx, llrust_size), llalign as u32);
|
||||
|
@ -901,7 +901,7 @@ impl<'self> Formatter<'self> {
|
||||
// case where the maximum length will matter.
|
||||
let char_len = s.char_len();
|
||||
if char_len >= max {
|
||||
let nchars = ::uint::min(max, char_len);
|
||||
let nchars = ::cmp::min(max, char_len);
|
||||
self.buf.write(s.slice_chars(0, nchars).as_bytes());
|
||||
return
|
||||
}
|
||||
|
@ -25,8 +25,6 @@ use num::{CheckedDiv, Zero, One, strconv};
|
||||
use prelude::*;
|
||||
use str;
|
||||
|
||||
pub use cmp::{min, max};
|
||||
|
||||
pub static bits : uint = $bits;
|
||||
pub static bytes : uint = ($bits / 8);
|
||||
|
||||
|
@ -26,8 +26,6 @@ use num::{CheckedDiv, Zero, One, strconv};
|
||||
use prelude::*;
|
||||
use str;
|
||||
|
||||
pub use cmp::{min, max};
|
||||
|
||||
pub static bits : uint = $bits;
|
||||
pub static bytes : uint = ($bits / 8);
|
||||
|
||||
|
@ -17,7 +17,6 @@ use io::stdio::StdWriter;
|
||||
use io::buffered::LineBufferedWriter;
|
||||
use rt::crate_map::{ModEntry, CrateMap, iter_crate_map, get_crate_map};
|
||||
use str::StrSlice;
|
||||
use u32;
|
||||
use vec::ImmutableVector;
|
||||
#[cfg(test)] use cast::transmute;
|
||||
|
||||
@ -46,7 +45,7 @@ fn parse_log_level(level: &str) -> Option<u32> {
|
||||
let position = log_level_names.iter().position(|&name| name == level);
|
||||
match position {
|
||||
Some(position) => {
|
||||
log_level = Some(u32::min(MAX_LOG_LEVEL, (position + 1) as u32))
|
||||
log_level = Some(::cmp::min(MAX_LOG_LEVEL, (position + 1) as u32))
|
||||
},
|
||||
_ => {
|
||||
log_level = None;
|
||||
|
Loading…
x
Reference in New Issue
Block a user