Skip to content

Commit 3cee676

Browse files
committed
auto merge of #5336 : ILyoan/rust/remove_unused, r=sanxiyn
Remove unused imports to get rid of warnings.
2 parents 900a0c8 + 688c4c4 commit 3cee676

File tree

6 files changed

+2
-12
lines changed

6 files changed

+2
-12
lines changed

src/libcore/at_vec.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
use cast::transmute;
1414
use kinds::Copy;
1515
use iter;
16-
use libc;
1716
use option::Option;
1817
use ptr::addr_of;
1918
use sys;

src/libcore/num/cmath.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010

1111
#[doc(hidden)]; // FIXME #3538
1212

13-
use libc::c_int;
14-
use libc::c_float;
15-
use libc::c_double;
16-
1713
// function names are almost identical to C's libmath, a few have been
1814
// renamed, grep for "rename:"
1915

src/libcore/vec.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ use iter::BaseIter;
1919
use iter;
2020
use kinds::Copy;
2121
use libc;
22-
use libc::size_t;
2322
use option::{None, Option, Some};
2423
use unstable::intrinsics;
2524
use ptr;
@@ -76,9 +75,9 @@ pub fn reserve<T>(v: &mut ~[T], n: uint) {
7675
let td = sys::get_type_desc::<T>();
7776
if ((**ptr).box_header.ref_count ==
7877
managed::raw::RC_MANAGED_UNIQUE) {
79-
rustrt::vec_reserve_shared_actual(td, ptr, n as size_t);
78+
rustrt::vec_reserve_shared_actual(td, ptr, n as libc::size_t);
8079
} else {
81-
rustrt::vec_reserve_shared(td, ptr, n as size_t);
80+
rustrt::vec_reserve_shared(td, ptr, n as libc::size_t);
8281
}
8382
}
8483
}
@@ -2071,7 +2070,6 @@ pub mod raw {
20712070
use kinds::Copy;
20722071
use managed;
20732072
use option::{None, Some};
2074-
use option;
20752073
use unstable::intrinsics;
20762074
use ptr::addr_of;
20772075
use ptr;

src/librustc/middle/trans/controlflow.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ use syntax::ast::ident;
3030
use syntax::ast_map::path_mod;
3131
use syntax::ast_util;
3232
use syntax::codemap::span;
33-
use syntax::print::pprust::expr_to_str;
3433

3534
pub fn trans_block(bcx: block, b: &ast::blk, dest: expr::Dest) -> block {
3635
let _icx = bcx.insn_ctxt("trans_block");

src/librustc/middle/typeck/check/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1706,7 +1706,6 @@ pub fn check_expr_with_unifier(fcx: @mut FnCtxt,
17061706
let expr_t = structurally_resolved_type(fcx, expr.span,
17071707
fcx.expr_ty(base));
17081708
let (base_t, derefs) = do_autoderef(fcx, expr.span, expr_t);
1709-
let n_tys = tys.len();
17101709

17111710
match structure_of(fcx, expr.span, base_t) {
17121711
ty::ty_struct(base_id, ref substs) => {

src/libstd/test.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ use core::either::Either;
2626
use core::either;
2727
use core::io::WriterUtil;
2828
use core::io;
29-
use core::libc::size_t;
3029
use core::comm::{stream, Chan, Port, SharedChan};
3130
use core::option;
3231
use core::prelude::*;

0 commit comments

Comments
 (0)