Skip to content

Commit bd7eb7e

Browse files
committed
auto merge of #5653 : brson/rust/warnings, r=brson
2 parents be79258 + e3327d3 commit bd7eb7e

File tree

18 files changed

+21
-30
lines changed

18 files changed

+21
-30
lines changed

src/librustc/metadata/creader.rs

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ use metadata::decoder;
1818
use metadata::filesearch::FileSearch;
1919
use metadata::loader;
2020

21-
use core::either;
2221
use core::hashmap::linear::LinearMap;
2322
use core::vec;
2423
use syntax::attr;

src/librustc/middle/lint.rs

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ use util::ppaux::{ty_to_str};
1818
use core::hashmap::linear::LinearMap;
1919
use core::char;
2020
use core::cmp;
21-
use core::either;
2221
use core::i8;
2322
use core::i16;
2423
use core::i32;

src/librustc/middle/moves.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -718,8 +718,8 @@ pub impl VisitContext {
718718
}
719719

720720
fn use_receiver(&self,
721-
expr_id: node_id,
722-
span: span,
721+
_expr_id: node_id,
722+
_span: span,
723723
receiver_expr: @expr,
724724
visitor: vt<VisitContext>)
725725
{

src/librustc/middle/resolve.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1358,7 +1358,7 @@ pub impl Resolver {
13581358
item_id: def_id,
13591359
+parent_privacy: Privacy,
13601360
parent: ReducedGraphParent,
1361-
&&visitor: vt<ReducedGraphParent>) {
1361+
&&_visitor: vt<ReducedGraphParent>) {
13621362
let ident = variant.node.name;
13631363
let (child, _) = self.add_child(ident, parent, ForbidDuplicateValues,
13641364
variant.span);

src/librustc/middle/trans/consts.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use core::prelude::*;
1212

1313
use back::abi;
14-
use lib::llvm::{llvm, SetLinkage, InternalLinkage, PrivateLinkage,
14+
use lib::llvm::{llvm, SetLinkage, PrivateLinkage,
1515
ValueRef, TypeRef, Bool, True, False};
1616
use metadata::csearch;
1717
use middle::const_eval;

src/librustc/middle/trans/foreign.rs

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use core::prelude::*;
1212

1313
use back::{link, abi};
14-
use driver::session;
1514
use lib::llvm::{SequentiallyConsistent, Acquire, Release, Xchg};
1615
use lib::llvm::{TypeRef, ValueRef};
1716
use lib;

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

+3-4
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ use util::common::{block_query, indenter, loop_query};
110110
use util::ppaux::{bound_region_to_str, expr_repr, pat_repr};
111111
use util::ppaux;
112112

113-
use core::either;
114113
use core::hashmap::linear::LinearMap;
115114
use core::ptr;
116115
use core::result::{Result, Ok, Err};
@@ -119,7 +118,7 @@ use core::str;
119118
use core::vec;
120119
use std::list::Nil;
121120
use syntax::abi::AbiSet;
122-
use syntax::ast::{provided, required, ty_i};
121+
use syntax::ast::{provided, required};
123122
use syntax::ast;
124123
use syntax::ast_map;
125124
use syntax::ast_util::local_def;
@@ -3021,7 +3020,7 @@ pub fn check_enum_variants(ccx: @mut CrateCtxt,
30213020
vs: &[ast::variant],
30223021
id: ast::node_id) {
30233022
fn do_check(ccx: @mut CrateCtxt,
3024-
sp: span,
3023+
_sp: span,
30253024
vs: &[ast::variant],
30263025
id: ast::node_id,
30273026
disr_vals: &mut ~[int],
@@ -3303,7 +3302,7 @@ pub fn type_is_c_like_enum(fcx: @mut FnCtxt, sp: span, typ: ty::t) -> bool {
33033302

33043303
pub fn ast_expr_vstore_to_vstore(fcx: @mut FnCtxt,
33053304
e: @ast::expr,
3306-
n: uint,
3305+
_n: uint,
33073306
v: ast::expr_vstore)
33083307
-> ty::vstore {
33093308
match v {

src/librustc/middle/typeck/collect.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ are represented as `ty_param()` instances.
3333
use core::prelude::*;
3434

3535
use metadata::csearch;
36-
use middle::ty::{InstantiatedTraitRef, arg};
36+
use middle::ty::InstantiatedTraitRef;
3737
use middle::ty::{substs, ty_param_bounds_and_ty, ty_param_substs_and_ty};
3838
use middle::ty;
3939
use middle::typeck::astconv::{AstConv, ty_of_arg};
@@ -860,7 +860,7 @@ pub fn ty_of_item(ccx: &CrateCtxt, it: @ast::item)
860860
tcx.tcache.insert(local_def(it.id), tpt);
861861
return tpt;
862862
}
863-
ast::item_fn(ref decl, purity, abi, ref generics, _) => {
863+
ast::item_fn(ref decl, purity, _, ref generics, _) => {
864864
let bounds = ty_param_bounds(ccx, generics);
865865
let tofd = astconv::ty_of_bare_fn(ccx,
866866
&empty_rscope,

src/librustc/middle/typeck/infer/coercion.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -66,20 +66,19 @@ we may want to adjust precisely when coercions occur.
6666

6767
use core::prelude::*;
6868

69-
use middle::ty::{TyVar, AutoPtr, AutoBorrowVec, AutoBorrowFn};
70-
use middle::ty::{AutoAdjustment, AutoDerefRef, AutoRef};
71-
use middle::ty::{vstore_slice, vstore_box, vstore_uniq, vstore_fixed};
69+
use middle::ty::{AutoPtr, AutoBorrowVec, AutoBorrowFn};
70+
use middle::ty::{AutoDerefRef, AutoRef};
71+
use middle::ty::{vstore_slice, vstore_box, vstore_uniq};
7272
use middle::ty::{mt};
7373
use middle::ty;
7474
use middle::typeck::infer::{CoerceResult, resolve_type};
7575
use middle::typeck::infer::combine::CombineFields;
7676
use middle::typeck::infer::sub::Sub;
7777
use middle::typeck::infer::to_str::InferStr;
7878
use middle::typeck::infer::resolve::try_resolve_tvar_shallow;
79-
use util::common::{indent, indenter};
79+
use util::common::indenter;
8080

81-
use syntax::abi::AbiSet;
82-
use syntax::ast::{m_const, m_imm, m_mutbl};
81+
use syntax::ast::m_imm;
8382
use syntax::ast;
8483

8584
// Note: Coerce is not actually a combiner, in that it does not

src/librustc/middle/typeck/infer/glb.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use middle::typeck::infer::{cres, InferCtxt};
2121
use middle::typeck::isr_alist;
2222
use syntax::ast;
2323
use syntax::ast::{Many, Once, extern_fn, impure_fn, m_const, m_imm, m_mutbl};
24-
use syntax::ast::{noreturn, pure_fn, ret_style, return_val, unsafe_fn};
24+
use syntax::ast::{pure_fn, unsafe_fn};
2525
use syntax::ast::{Onceness, purity};
2626
use syntax::abi::AbiSet;
2727
use syntax::codemap::span;

src/libstd/net_tcp.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ use uv;
2020
use uv::iotask;
2121
use uv::iotask::IoTask;
2222

23-
use core::io::{Reader, ReaderUtil, Writer};
2423
use core::io;
2524
use core::libc::size_t;
2625
use core::libc;
@@ -1439,7 +1438,7 @@ struct TcpBufferedSocketData {
14391438
mut buf_off: uint
14401439
}
14411440

1442-
//#[cfg(test)]
1441+
#[cfg(test)]
14431442
pub mod test {
14441443
use net::ip;
14451444
use net::tcp::{GenericListenErr, TcpConnectErrData, TcpListenErrData};

src/libsyntax/ast.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// The Rust abstract syntax tree.
1212

13-
use codemap::{span, FileName, spanned};
13+
use codemap::{span, spanned};
1414
use abi::AbiSet;
1515
use opt_vec::OptVec;
1616

src/libsyntax/ast_map.rs

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ use ast::*;
1515
use ast;
1616
use ast_util::{inlined_item_utils, stmt_id};
1717
use ast_util;
18-
use attr;
1918
use codemap;
2019
use codemap::spanned;
2120
use diagnostic::span_handler;

src/libsyntax/attr.rs

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ use codemap::BytePos;
1919
use diagnostic::span_handler;
2020
use parse::comments::{doc_comment_style, strip_doc_comment_decoration};
2121

22-
use core::either::Either;
2322
use core::vec;
2423
use core::hashmap::linear::LinearSet;
2524
use std;

src/libsyntax/ext/deriving/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ pub fn create_enum_variant_pattern(cx: @ext_ctxt,
286286
}
287287
}
288288

289-
pub fn variant_arg_count(cx: @ext_ctxt, span: span, variant: &variant) -> uint {
289+
pub fn variant_arg_count(_cx: @ext_ctxt, _span: span, variant: &variant) -> uint {
290290
match variant.node.kind {
291291
tuple_variant_kind(ref args) => args.len(),
292292
struct_variant_kind(ref struct_def) => struct_def.fields.len(),

src/libsyntax/ext/pipes/ast_builder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use core::prelude::*;
1717

1818
use abi::AbiSet;
19-
use ast::{ident, node_id};
19+
use ast::ident;
2020
use ast;
2121
use ast_util;
2222
use codemap::{span, respan, dummy_sp, spanned};

src/libsyntax/parse/parser.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3777,7 +3777,7 @@ pub impl Parser {
37773777
};
37783778
}
37793779

3780-
fn parse_enum_def(&self, generics: &ast::Generics) -> enum_def {
3780+
fn parse_enum_def(&self, _generics: &ast::Generics) -> enum_def {
37813781
let mut variants = ~[];
37823782
let mut all_nullary = true, have_disr = false;
37833783
while *self.token != token::RBRACE {

src/libsyntax/print/pprust.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use core::prelude::*;
1212

1313
use abi::AbiSet;
14-
use abi;
1514
use ast::{RegionTyParamBound, TraitTyParamBound, required, provided};
1615
use ast;
1716
use ast_util;
@@ -2180,7 +2179,7 @@ pub fn print_opt_sigil(s: @ps, opt_sigil: Option<ast::Sigil>) {
21802179
}
21812180

21822181
pub fn print_fn_header_info(s: @ps,
2183-
opt_sty: Option<ast::self_ty_>,
2182+
_opt_sty: Option<ast::self_ty_>,
21842183
opt_purity: Option<ast::purity>,
21852184
abis: AbiSet,
21862185
onceness: ast::Onceness,

0 commit comments

Comments
 (0)