Skip to content

Commit d9d1dfc

Browse files
committed
std: Replace num::IntConvertible with {To,From}Primitive
1 parent 1754837 commit d9d1dfc

File tree

14 files changed

+582
-323
lines changed

14 files changed

+582
-323
lines changed

src/libextra/num/bigint.rs

Lines changed: 212 additions & 211 deletions
Large diffs are not rendered by default.

src/libextra/num/rational.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ impl<T: FromStrRadix + Clone + Integer + Ord>
306306
mod test {
307307

308308
use super::*;
309-
use std::num::{Zero,One,FromStrRadix,IntConvertible};
309+
use std::num::{Zero,One,FromStrRadix,FromPrimitive};
310310
use std::from_str::FromStr;
311311

312312
pub static _0 : Rational = Ratio { numer: 0, denom: 1};
@@ -318,8 +318,8 @@ mod test {
318318

319319
pub fn to_big(n: Rational) -> BigRational {
320320
Ratio::new(
321-
IntConvertible::from_int(n.numer),
322-
IntConvertible::from_int(n.denom)
321+
FromPrimitive::from_int(n.numer).unwrap(),
322+
FromPrimitive::from_int(n.denom).unwrap()
323323
)
324324
}
325325

src/librustc/middle/trans/debuginfo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ use std::hashmap::HashMap;
107107
use std::libc::{c_uint, c_ulonglong, c_longlong};
108108
use std::ptr;
109109
use std::vec;
110-
use syntax::codemap::Span;
110+
use syntax::codemap::{Span, Pos};
111111
use syntax::{ast, codemap, ast_util, ast_map, opt_vec, visit};
112112
use syntax::parse::token;
113113
use syntax::parse::token::special_idents;

src/librustc/util/ppaux.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use middle::ty;
2626
use middle::typeck;
2727
use syntax::abi::AbiSet;
2828
use syntax::ast_map;
29-
use syntax::codemap::Span;
29+
use syntax::codemap::{Span, Pos};
3030
use syntax::parse::token;
3131
use syntax::print::pprust;
3232
use syntax::{ast, ast_util};

0 commit comments

Comments
 (0)