Skip to content

Commit

Permalink
Clean up warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
James Miller committed Jul 7, 2013
1 parent 47eca21 commit 7ce68dc
Show file tree
Hide file tree
Showing 12 changed files with 7 additions and 31 deletions.
3 changes: 0 additions & 3 deletions src/librustc/middle/trans/common.rs
Expand Up @@ -34,9 +34,6 @@ use std::cast::transmute;
use std::cast;
use std::hashmap::{HashMap};
use std::libc::{c_uint, c_longlong, c_ulonglong};
use std::to_bytes;
use std::str;
use std::vec::raw::to_ptr;
use std::vec;
use syntax::ast::ident;
use syntax::ast_map::{path, path_elt};
Expand Down
1 change: 0 additions & 1 deletion src/librustc/middle/trans/meth.rs
Expand Up @@ -548,7 +548,6 @@ pub fn trans_trait_callee_from_llval(bcx: block,

let _icx = push_ctxt("impl::trans_trait_callee");
let ccx = bcx.ccx();
let mut bcx = bcx;

// Load the vtable from the @Trait pair
debug!("(translating trait callee) loading vtable from pair %s",
Expand Down
1 change: 0 additions & 1 deletion src/librustc/middle/trans/uniq.rs
Expand Up @@ -9,7 +9,6 @@
// except according to those terms.


use back;
use lib::llvm::ValueRef;
use middle::trans::base::*;
use middle::trans::build::*;
Expand Down
2 changes: 0 additions & 2 deletions src/librustc/middle/typeck/check/mod.rs
Expand Up @@ -463,7 +463,6 @@ pub fn check_fn(ccx: @mut CrateCtxt,
}

// Check the pattern.
let region = fcx.block_region();
let pcx = pat_ctxt {
fcx: fcx,
map: pat_id_map(tcx.def_map, input.pat),
Expand Down Expand Up @@ -2892,7 +2891,6 @@ pub fn check_decl_local(fcx: @mut FnCtxt, local: @ast::local) {
_ => {}
}

let region = tcx.region_maps.encl_region(local.node.id);
let pcx = pat_ctxt {
fcx: fcx,
map: pat_id_map(tcx.def_map, local.node.pat),
Expand Down
8 changes: 1 addition & 7 deletions src/librustc/middle/typeck/check/regionck.rs
Expand Up @@ -36,11 +36,9 @@ use middle::typeck::check::regionmanip::relate_nested_regions;
use middle::typeck::infer::resolve_and_force_all_but_regions;
use middle::typeck::infer::resolve_type;
use middle::typeck::infer;
use util::ppaux::{note_and_explain_region, ty_to_str,
region_to_str};
use util::ppaux::{ty_to_str, region_to_str};
use middle::pat_util;

use std::result;
use std::uint;
use syntax::ast::{ManagedSigil, OwnedSigil, BorrowedSigil};
use syntax::ast::{def_arg, def_binding, def_local, def_self, def_upvar};
Expand Down Expand Up @@ -419,8 +417,6 @@ fn constrain_callee(rcx: @mut Rcx,
call_expr: @ast::expr,
callee_expr: @ast::expr)
{
let tcx = rcx.fcx.tcx();

let call_region = ty::re_scope(call_expr.id);

let callee_ty = rcx.resolve_node_type(callee_id);
Expand Down Expand Up @@ -559,8 +555,6 @@ fn constrain_index(rcx: @mut Rcx,
* includes the deref expr.
*/

let tcx = rcx.fcx.tcx();

debug!("constrain_index(index_expr=?, indexed_ty=%s",
rcx.fcx.infcx().ty_to_str(indexed_ty));

Expand Down
3 changes: 1 addition & 2 deletions src/librustc/middle/typeck/infer/combine.rs
Expand Up @@ -65,15 +65,14 @@ use middle::typeck::infer::sub::Sub;
use middle::typeck::infer::to_str::InferStr;
use middle::typeck::infer::unify::{InferCtxtMethods};
use middle::typeck::infer::{InferCtxt, cres, ures};
use middle::typeck::infer::{TypeOrigin, TypeTrace};
use middle::typeck::infer::{TypeTrace};
use util::common::indent;

use std::result::{iter_vec2, map_vec2};
use std::vec;
use syntax::ast::{Onceness, purity};
use syntax::ast;
use syntax::opt_vec;
use syntax::codemap::span;
use syntax::abi::AbiSet;

pub trait Combine {
Expand Down
7 changes: 1 addition & 6 deletions src/librustc/middle/typeck/infer/error_reporting.rs
Expand Up @@ -59,23 +59,18 @@ time of error detection.
*/

use std::prelude::*;
use middle::ty;
use middle::ty::Region;
use middle::typeck::infer;
use middle::typeck::infer::InferCtxt;
use middle::typeck::infer::TypeTrace;
use middle::typeck::infer::TypeOrigin;
use middle::typeck::infer::SubregionOrigin;
use middle::typeck::infer::RegionVariableOrigin;
use middle::typeck::infer::Types;
use middle::typeck::infer::TraitRefs;
use middle::typeck::infer::ValuePairs;
use middle::typeck::infer::region_inference::RegionResolutionError;
use middle::typeck::infer::region_inference::ConcreteFailure;
use middle::typeck::infer::region_inference::SubSupConflict;
use middle::typeck::infer::region_inference::SupSupConflict;
use syntax::opt_vec;
use syntax::opt_vec::OptVec;
use util::ppaux::UserString;
use util::ppaux::note_and_explain_region;
Expand Down Expand Up @@ -362,7 +357,7 @@ impl ErrorReporting for InferCtxt {
sup,
"");
}
infer::ReferenceOutlivesReferent(ty, span) => {
infer::ReferenceOutlivesReferent(ty, _) => {
self.tcx.sess.span_err(
origin.span(),
fmt!("in type `%s`, pointer has a longer lifetime than \
Expand Down
3 changes: 1 addition & 2 deletions src/librustc/middle/typeck/infer/glb.rs
Expand Up @@ -26,8 +26,7 @@ use syntax::ast::{Many, Once, extern_fn, impure_fn, m_const, m_imm, m_mutbl};
use syntax::ast::{unsafe_fn};
use syntax::ast::{Onceness, purity};
use syntax::abi::AbiSet;
use syntax::codemap::span;
use util::common::{indent, indenter};
use util::common::{indenter};
use util::ppaux::mt_to_str;

use extra::list;
Expand Down
2 changes: 0 additions & 2 deletions src/librustc/middle/typeck/infer/lub.rs
Expand Up @@ -21,7 +21,6 @@ use middle::typeck::infer::{cres, InferCtxt};
use middle::typeck::infer::fold_regions_in_sig;
use middle::typeck::infer::{TypeTrace, Subtype};
use middle::typeck::isr_alist;
use util::common::indent;
use util::ppaux::mt_to_str;

use extra::list;
Expand All @@ -30,7 +29,6 @@ use syntax::ast;
use syntax::ast::{Many, Once, extern_fn, m_const, impure_fn};
use syntax::ast::{unsafe_fn};
use syntax::ast::{Onceness, purity};
use syntax::codemap::span;

pub struct Lub(CombineFields); // least-upper-bound: common supertype

Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/typeck/infer/mod.rs
Expand Up @@ -328,7 +328,7 @@ pub fn can_mk_subty(cx: @mut InferCtxt, a: ty::t, b: ty::t) -> ures {
}

pub fn mk_subr(cx: @mut InferCtxt,
a_is_expected: bool,
_a_is_expected: bool,
origin: SubregionOrigin,
a: ty::Region,
b: ty::Region) {
Expand Down
3 changes: 1 addition & 2 deletions src/librustc/middle/typeck/infer/region_inference/mod.rs
Expand Up @@ -19,13 +19,12 @@ use middle::typeck::infer::cres;
use middle::typeck::infer::{RegionVariableOrigin, SubregionOrigin};
use middle::typeck::infer;
use util::common::indenter;
use util::ppaux::{note_and_explain_region, Repr, UserString};
use util::ppaux::{Repr};

use std::cell::Cell;
use std::hashmap::{HashMap, HashSet};
use std::uint;
use std::vec;
use syntax::codemap::span;
use syntax::ast;
use syntax::opt_vec;
use syntax::opt_vec::OptVec;
Expand Down
3 changes: 1 addition & 2 deletions src/librustc/middle/typeck/infer/sub.rs
Expand Up @@ -21,15 +21,14 @@ use middle::typeck::infer::lattice::CombineFieldsLatticeMethods;
use middle::typeck::infer::lub::Lub;
use middle::typeck::infer::to_str::InferStr;
use middle::typeck::infer::{TypeTrace, Subtype};
use util::common::{indent, indenter};
use util::common::{indenter};
use util::ppaux::bound_region_to_str;

use extra::list::Nil;
use extra::list;
use syntax::abi::AbiSet;
use syntax::ast;
use syntax::ast::{Onceness, m_const, purity};
use syntax::codemap::span;

pub struct Sub(CombineFields); // "subtype", "subregion" etc

Expand Down

0 comments on commit 7ce68dc

Please sign in to comment.