From 1095bbe5eb0bee8d005ea3387829a3d4087868db Mon Sep 17 00:00:00 2001 From: ILyoan Date: Tue, 12 Mar 2013 20:35:54 +0900 Subject: [PATCH 1/4] Remove unused variable --- src/librustc/middle/typeck/check/mod.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/librustc/middle/typeck/check/mod.rs b/src/librustc/middle/typeck/check/mod.rs index 9baea38bd7c50..17595913f9423 100644 --- a/src/librustc/middle/typeck/check/mod.rs +++ b/src/librustc/middle/typeck/check/mod.rs @@ -1706,7 +1706,6 @@ pub fn check_expr_with_unifier(fcx: @mut FnCtxt, let expr_t = structurally_resolved_type(fcx, expr.span, fcx.expr_ty(base)); let (base_t, derefs) = do_autoderef(fcx, expr.span, expr_t); - let n_tys = tys.len(); match structure_of(fcx, expr.span, base_t) { ty::ty_struct(base_id, ref substs) => { From ef0364e9e47458e6835dfb37c029a35de6c1c5ed Mon Sep 17 00:00:00 2001 From: ILyoan Date: Tue, 12 Mar 2013 20:36:33 +0900 Subject: [PATCH 2/4] Remove unused import in core --- src/libcore/at_vec.rs | 1 - src/libcore/num/cmath.rs | 4 ---- src/libcore/vec.rs | 6 ++---- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/libcore/at_vec.rs b/src/libcore/at_vec.rs index fa19e24aa0830..8cd8b297e2f3b 100644 --- a/src/libcore/at_vec.rs +++ b/src/libcore/at_vec.rs @@ -13,7 +13,6 @@ use cast::transmute; use kinds::Copy; use iter; -use libc; use option::Option; use ptr::addr_of; use sys; diff --git a/src/libcore/num/cmath.rs b/src/libcore/num/cmath.rs index 342a02c836a7e..2f9d4304cba70 100644 --- a/src/libcore/num/cmath.rs +++ b/src/libcore/num/cmath.rs @@ -10,10 +10,6 @@ #[doc(hidden)]; // FIXME #3538 -use libc::c_int; -use libc::c_float; -use libc::c_double; - // function names are almost identical to C's libmath, a few have been // renamed, grep for "rename:" diff --git a/src/libcore/vec.rs b/src/libcore/vec.rs index 68dca608a480d..2c447b3e4ae38 100644 --- a/src/libcore/vec.rs +++ b/src/libcore/vec.rs @@ -19,7 +19,6 @@ use iter::BaseIter; use iter; use kinds::Copy; use libc; -use libc::size_t; use option::{None, Option, Some}; use unstable::intrinsics; use ptr; @@ -76,9 +75,9 @@ pub fn reserve(v: &mut ~[T], n: uint) { let td = sys::get_type_desc::(); if ((**ptr).box_header.ref_count == managed::raw::RC_MANAGED_UNIQUE) { - rustrt::vec_reserve_shared_actual(td, ptr, n as size_t); + rustrt::vec_reserve_shared_actual(td, ptr, n as libc::size_t); } else { - rustrt::vec_reserve_shared(td, ptr, n as size_t); + rustrt::vec_reserve_shared(td, ptr, n as libc::size_t); } } } @@ -2071,7 +2070,6 @@ pub mod raw { use kinds::Copy; use managed; use option::{None, Some}; - use option; use unstable::intrinsics; use ptr::addr_of; use ptr; From 278a4dbb0fb4b5e56eface31dcb9996c72d740d4 Mon Sep 17 00:00:00 2001 From: ILyoan Date: Tue, 12 Mar 2013 20:37:23 +0900 Subject: [PATCH 3/4] Remove unused imports in std --- src/libstd/test.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libstd/test.rs b/src/libstd/test.rs index 7286ce5e2bdff..3f363b613d7da 100644 --- a/src/libstd/test.rs +++ b/src/libstd/test.rs @@ -26,7 +26,6 @@ use core::either::Either; use core::either; use core::io::WriterUtil; use core::io; -use core::libc::size_t; use core::comm::{stream, Chan, Port, SharedChan}; use core::option; use core::prelude::*; From 688c4c403d087245464e2bf0c5a8c2c760c50fc6 Mon Sep 17 00:00:00 2001 From: ILyoan Date: Tue, 12 Mar 2013 20:37:40 +0900 Subject: [PATCH 4/4] Remove unused import in librustc --- src/librustc/middle/trans/controlflow.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/librustc/middle/trans/controlflow.rs b/src/librustc/middle/trans/controlflow.rs index 3a0968d750adb..40394391f1adb 100644 --- a/src/librustc/middle/trans/controlflow.rs +++ b/src/librustc/middle/trans/controlflow.rs @@ -30,7 +30,6 @@ use syntax::ast::ident; use syntax::ast_map::path_mod; use syntax::ast_util; use syntax::codemap::span; -use syntax::print::pprust::expr_to_str; pub fn trans_block(bcx: block, b: &ast::blk, dest: expr::Dest) -> block { let _icx = bcx.insn_ctxt("trans_block");