Skip to content

Fix warnings #5653

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 1, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/librustc/metadata/creader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ use metadata::decoder;
use metadata::filesearch::FileSearch;
use metadata::loader;

use core::either;
use core::hashmap::linear::LinearMap;
use core::vec;
use syntax::attr;
Expand Down
1 change: 0 additions & 1 deletion src/librustc/middle/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ use util::ppaux::{ty_to_str};
use core::hashmap::linear::LinearMap;
use core::char;
use core::cmp;
use core::either;
use core::i8;
use core::i16;
use core::i32;
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/middle/moves.rs
Original file line number Diff line number Diff line change
Expand Up @@ -718,8 +718,8 @@ pub impl VisitContext {
}

fn use_receiver(&self,
expr_id: node_id,
span: span,
_expr_id: node_id,
_span: span,
receiver_expr: @expr,
visitor: vt<VisitContext>)
{
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1358,7 +1358,7 @@ pub impl Resolver {
item_id: def_id,
+parent_privacy: Privacy,
parent: ReducedGraphParent,
&&visitor: vt<ReducedGraphParent>) {
&&_visitor: vt<ReducedGraphParent>) {
let ident = variant.node.name;
let (child, _) = self.add_child(ident, parent, ForbidDuplicateValues,
variant.span);
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/trans/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use core::prelude::*;

use back::abi;
use lib::llvm::{llvm, SetLinkage, InternalLinkage, PrivateLinkage,
use lib::llvm::{llvm, SetLinkage, PrivateLinkage,
ValueRef, TypeRef, Bool, True, False};
use metadata::csearch;
use middle::const_eval;
Expand Down
1 change: 0 additions & 1 deletion src/librustc/middle/trans/foreign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
use core::prelude::*;

use back::{link, abi};
use driver::session;
use lib::llvm::{SequentiallyConsistent, Acquire, Release, Xchg};
use lib::llvm::{TypeRef, ValueRef};
use lib;
Expand Down
7 changes: 3 additions & 4 deletions src/librustc/middle/typeck/check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ use util::common::{block_query, indenter, loop_query};
use util::ppaux::{bound_region_to_str, expr_repr, pat_repr};
use util::ppaux;

use core::either;
use core::hashmap::linear::LinearMap;
use core::ptr;
use core::result::{Result, Ok, Err};
Expand All @@ -119,7 +118,7 @@ use core::str;
use core::vec;
use std::list::Nil;
use syntax::abi::AbiSet;
use syntax::ast::{provided, required, ty_i};
use syntax::ast::{provided, required};
use syntax::ast;
use syntax::ast_map;
use syntax::ast_util::local_def;
Expand Down Expand Up @@ -3021,7 +3020,7 @@ pub fn check_enum_variants(ccx: @mut CrateCtxt,
vs: &[ast::variant],
id: ast::node_id) {
fn do_check(ccx: @mut CrateCtxt,
sp: span,
_sp: span,
vs: &[ast::variant],
id: ast::node_id,
disr_vals: &mut ~[int],
Expand Down Expand Up @@ -3303,7 +3302,7 @@ pub fn type_is_c_like_enum(fcx: @mut FnCtxt, sp: span, typ: ty::t) -> bool {

pub fn ast_expr_vstore_to_vstore(fcx: @mut FnCtxt,
e: @ast::expr,
n: uint,
_n: uint,
v: ast::expr_vstore)
-> ty::vstore {
match v {
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/middle/typeck/collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ are represented as `ty_param()` instances.
use core::prelude::*;

use metadata::csearch;
use middle::ty::{InstantiatedTraitRef, arg};
use middle::ty::InstantiatedTraitRef;
use middle::ty::{substs, ty_param_bounds_and_ty, ty_param_substs_and_ty};
use middle::ty;
use middle::typeck::astconv::{AstConv, ty_of_arg};
Expand Down Expand Up @@ -860,7 +860,7 @@ pub fn ty_of_item(ccx: &CrateCtxt, it: @ast::item)
tcx.tcache.insert(local_def(it.id), tpt);
return tpt;
}
ast::item_fn(ref decl, purity, abi, ref generics, _) => {
ast::item_fn(ref decl, purity, _, ref generics, _) => {
let bounds = ty_param_bounds(ccx, generics);
let tofd = astconv::ty_of_bare_fn(ccx,
&empty_rscope,
Expand Down
11 changes: 5 additions & 6 deletions src/librustc/middle/typeck/infer/coercion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,19 @@ we may want to adjust precisely when coercions occur.

use core::prelude::*;

use middle::ty::{TyVar, AutoPtr, AutoBorrowVec, AutoBorrowFn};
use middle::ty::{AutoAdjustment, AutoDerefRef, AutoRef};
use middle::ty::{vstore_slice, vstore_box, vstore_uniq, vstore_fixed};
use middle::ty::{AutoPtr, AutoBorrowVec, AutoBorrowFn};
use middle::ty::{AutoDerefRef, AutoRef};
use middle::ty::{vstore_slice, vstore_box, vstore_uniq};
use middle::ty::{mt};
use middle::ty;
use middle::typeck::infer::{CoerceResult, resolve_type};
use middle::typeck::infer::combine::CombineFields;
use middle::typeck::infer::sub::Sub;
use middle::typeck::infer::to_str::InferStr;
use middle::typeck::infer::resolve::try_resolve_tvar_shallow;
use util::common::{indent, indenter};
use util::common::indenter;

use syntax::abi::AbiSet;
use syntax::ast::{m_const, m_imm, m_mutbl};
use syntax::ast::m_imm;
use syntax::ast;

// Note: Coerce is not actually a combiner, in that it does not
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/typeck/infer/glb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use middle::typeck::infer::{cres, InferCtxt};
use middle::typeck::isr_alist;
use syntax::ast;
use syntax::ast::{Many, Once, extern_fn, impure_fn, m_const, m_imm, m_mutbl};
use syntax::ast::{noreturn, pure_fn, ret_style, return_val, unsafe_fn};
use syntax::ast::{pure_fn, unsafe_fn};
use syntax::ast::{Onceness, purity};
use syntax::abi::AbiSet;
use syntax::codemap::span;
Expand Down
3 changes: 1 addition & 2 deletions src/libstd/net_tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ use uv;
use uv::iotask;
use uv::iotask::IoTask;

use core::io::{Reader, ReaderUtil, Writer};
use core::io;
use core::libc::size_t;
use core::libc;
Expand Down Expand Up @@ -1439,7 +1438,7 @@ struct TcpBufferedSocketData {
mut buf_off: uint
}

//#[cfg(test)]
#[cfg(test)]
pub mod test {
use net::ip;
use net::tcp::{GenericListenErr, TcpConnectErrData, TcpListenErrData};
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

// The Rust abstract syntax tree.

use codemap::{span, FileName, spanned};
use codemap::{span, spanned};
use abi::AbiSet;
use opt_vec::OptVec;

Expand Down
1 change: 0 additions & 1 deletion src/libsyntax/ast_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ use ast::*;
use ast;
use ast_util::{inlined_item_utils, stmt_id};
use ast_util;
use attr;
use codemap;
use codemap::spanned;
use diagnostic::span_handler;
Expand Down
1 change: 0 additions & 1 deletion src/libsyntax/attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ use codemap::BytePos;
use diagnostic::span_handler;
use parse::comments::{doc_comment_style, strip_doc_comment_decoration};

use core::either::Either;
use core::vec;
use core::hashmap::linear::LinearSet;
use std;
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/ext/deriving/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ pub fn create_enum_variant_pattern(cx: @ext_ctxt,
}
}

pub fn variant_arg_count(cx: @ext_ctxt, span: span, variant: &variant) -> uint {
pub fn variant_arg_count(_cx: @ext_ctxt, _span: span, variant: &variant) -> uint {
match variant.node.kind {
tuple_variant_kind(ref args) => args.len(),
struct_variant_kind(ref struct_def) => struct_def.fields.len(),
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/ext/pipes/ast_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use core::prelude::*;

use abi::AbiSet;
use ast::{ident, node_id};
use ast::ident;
use ast;
use ast_util;
use codemap::{span, respan, dummy_sp, spanned};
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/parse/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3777,7 +3777,7 @@ pub impl Parser {
};
}

fn parse_enum_def(&self, generics: &ast::Generics) -> enum_def {
fn parse_enum_def(&self, _generics: &ast::Generics) -> enum_def {
let mut variants = ~[];
let mut all_nullary = true, have_disr = false;
while *self.token != token::RBRACE {
Expand Down
3 changes: 1 addition & 2 deletions src/libsyntax/print/pprust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
use core::prelude::*;

use abi::AbiSet;
use abi;
use ast::{RegionTyParamBound, TraitTyParamBound, required, provided};
use ast;
use ast_util;
Expand Down Expand Up @@ -2180,7 +2179,7 @@ pub fn print_opt_sigil(s: @ps, opt_sigil: Option<ast::Sigil>) {
}

pub fn print_fn_header_info(s: @ps,
opt_sty: Option<ast::self_ty_>,
_opt_sty: Option<ast::self_ty_>,
opt_purity: Option<ast::purity>,
abis: AbiSet,
onceness: ast::Onceness,
Expand Down