about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-05-03 23:48:36 -0700
committerbors <bors@rust-lang.org>2013-05-03 23:48:36 -0700
commita47e4cb22fbced2391845f7bfc7a458bca8c8273 (patch)
tree18f32cd44b67bf0678e5990ad199c566be5a0dfc /src
parentc3ab74b8b933a1bc2c5f207ae5c023cf3e7aeb58 (diff)
parent2df8799f766c3a4871fe12761843ef9a5bc83659 (diff)
downloadrust-a47e4cb22fbced2391845f7bfc7a458bca8c8273.tar.gz
rust-a47e4cb22fbced2391845f7bfc7a458bca8c8273.zip
auto merge of #6229 : catamorphism/rust/warning-police, r=catamorphism
Diffstat (limited to 'src')
-rw-r--r--src/libcore/task/mod.rs2
-rw-r--r--src/libcore/unstable/lang.rs2
-rw-r--r--src/librustc/metadata/loader.rs2
-rw-r--r--src/librustc/middle/trans/base.rs14
-rw-r--r--src/librustc/middle/ty.rs2
-rw-r--r--src/librustc/rustc.rc1
-rw-r--r--src/libstd/arena.rs3
-rw-r--r--src/libstd/future.rs2
-rw-r--r--src/libstd/net_tcp.rs2
-rw-r--r--src/libstd/net_url.rs2
-rw-r--r--src/libstd/workcache.rs4
-rw-r--r--src/libsyntax/parse/parser.rs6
-rw-r--r--src/libsyntax/syntax.rc1
13 files changed, 17 insertions, 26 deletions
diff --git a/src/libcore/task/mod.rs b/src/libcore/task/mod.rs
index ebf2494c8ee..fd695c16ea7 100644
--- a/src/libcore/task/mod.rs
+++ b/src/libcore/task/mod.rs
@@ -39,7 +39,7 @@ use result::Result;
 use comm::{stream, Chan, GenericChan, GenericPort, Port};
 use prelude::*;
 use result;
-use task::rt::{task_id, sched_id, rust_task};
+use task::rt::{task_id, sched_id};
 use util;
 use util::replace;
 use unstable::finally::Finally;
diff --git a/src/libcore/unstable/lang.rs b/src/libcore/unstable/lang.rs
index a8a0d40db1f..7cd218639c0 100644
--- a/src/libcore/unstable/lang.rs
+++ b/src/libcore/unstable/lang.rs
@@ -17,7 +17,9 @@ use str;
 use sys;
 use unstable::exchange_alloc;
 use cast::transmute;
+#[cfg(not(stage0))]
 use rt::{context, OldTaskContext};
+#[cfg(not(stage0))]
 use rt::local_services::borrow_local_services;
 
 #[allow(non_camel_case_types)]
diff --git a/src/librustc/metadata/loader.rs b/src/librustc/metadata/loader.rs
index d2982e58038..193f6fc8f0a 100644
--- a/src/librustc/metadata/loader.rs
+++ b/src/librustc/metadata/loader.rs
@@ -196,7 +196,7 @@ fn get_metadata_section(os: os,
         while llvm::LLVMIsSectionIteratorAtEnd(of.llof, si.llsi) == False {
             let name_buf = llvm::LLVMGetSectionName(si.llsi);
             let name = unsafe { str::raw::from_c_str(name_buf) };
-            debug!("get_matadata_section: name %s", name);
+            debug!("get_metadata_section: name %s", name);
             if name == read_meta_section_name(os) {
                 let cbuf = llvm::LLVMGetSectionContents(si.llsi);
                 let csz = llvm::LLVMGetSectionSize(si.llsi) as uint;
diff --git a/src/librustc/middle/trans/base.rs b/src/librustc/middle/trans/base.rs
index b5029ee6bd7..b8ab360b9e4 100644
--- a/src/librustc/middle/trans/base.rs
+++ b/src/librustc/middle/trans/base.rs
@@ -2096,8 +2096,7 @@ pub fn trans_tuple_struct(ccx: @CrateContext,
 }
 
 pub fn trans_enum_def(ccx: @CrateContext, enum_definition: &ast::enum_def,
-                      id: ast::node_id,
-                      path: @ast_map::path, vi: @~[ty::VariantInfo],
+                      id: ast::node_id, vi: @~[ty::VariantInfo],
                       i: &mut uint) {
     for vec::each(enum_definition.variants) |variant| {
         let disr_val = vi[*i].disr_val;
@@ -2172,8 +2171,7 @@ pub fn trans_item(ccx: @CrateContext, item: &ast::item) {
         if !generics.is_type_parameterized() {
             let vi = ty::enum_variants(ccx.tcx, local_def(item.id));
             let mut i = 0;
-            trans_enum_def(ccx, enum_definition, item.id,
-                           path, vi, &mut i);
+            trans_enum_def(ccx, enum_definition, item.id, vi, &mut i);
         }
       }
       ast::item_const(_, expr) => consts::trans_const(ccx, expr, item.id),
@@ -2430,13 +2428,13 @@ pub fn get_item_val(ccx: @CrateContext, id: ast::node_id) -> ValueRef {
       Some(&v) => v,
       None => {
         let mut exprt = false;
-        let val = match *ccx.tcx.items.get(&id) {
+        let val = match *tcx.items.get(&id) {
           ast_map::node_item(i, pth) => {
             let my_path = vec::append(/*bad*/copy *pth,
                                       ~[path_name(i.ident)]);
             match i.node {
               ast::item_const(_, expr) => {
-                let typ = ty::node_id_to_type(ccx.tcx, i.id);
+                let typ = ty::node_id_to_type(tcx, i.id);
                 let s = mangle_exported_name(ccx, my_path, typ);
                 // We need the translated value here, because for enums the
                 // LLVM type is not fully determined by the Rust type.
@@ -2495,7 +2493,7 @@ pub fn get_item_val(ccx: @CrateContext, id: ast::node_id) -> ValueRef {
                                 ni.attrs)
                 }
                 ast::foreign_item_const(*) => {
-                    let typ = ty::node_id_to_type(ccx.tcx, ni.id);
+                    let typ = ty::node_id_to_type(tcx, ni.id);
                     let ident = ccx.sess.parse_sess.interner.get(ni.ident);
                     let g = do str::as_c_str(*ident) |buf| {
                         unsafe {
@@ -2536,7 +2534,7 @@ pub fn get_item_val(ccx: @CrateContext, id: ast::node_id) -> ValueRef {
             // Only register the constructor if this is a tuple-like struct.
             match struct_def.ctor_id {
                 None => {
-                    ccx.tcx.sess.bug(~"attempt to register a constructor of \
+                    tcx.sess.bug(~"attempt to register a constructor of \
                                        a non-tuple-like struct")
                 }
                 Some(ctor_id) => {
diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs
index 411c9534343..abf82c511e5 100644
--- a/src/librustc/middle/ty.rs
+++ b/src/librustc/middle/ty.rs
@@ -33,7 +33,7 @@ use core::to_bytes;
 use core::hashmap::{HashMap, HashSet};
 use std::smallintmap::SmallIntMap;
 use syntax::ast::*;
-use syntax::ast_util::{is_local, local_def};
+use syntax::ast_util::is_local;
 use syntax::ast_util;
 use syntax::attr;
 use syntax::codemap::span;
diff --git a/src/librustc/rustc.rc b/src/librustc/rustc.rc
index adb1c2fcc41..7a7dcbb8bfd 100644
--- a/src/librustc/rustc.rc
+++ b/src/librustc/rustc.rc
@@ -20,7 +20,6 @@
 #[allow(non_implicitly_copyable_typarams)];
 #[allow(non_camel_case_types)];
 #[deny(deprecated_pattern)];
-#[deny(deprecated_mode)];
 
 extern mod std(vers = "0.7-pre");
 extern mod syntax(vers = "0.7-pre");
diff --git a/src/libstd/arena.rs b/src/libstd/arena.rs
index 0e9b2ed3da8..67b5e5e654a 100644
--- a/src/libstd/arena.rs
+++ b/src/libstd/arena.rs
@@ -33,7 +33,6 @@
 // to waste time running the destructors of POD.
 
 use list::{MutList, MutCons, MutNil};
-use list;
 
 use core::at_vec;
 use core::cast::{transmute, transmute_mut_region};
@@ -79,7 +78,7 @@ struct Chunk {
 }
 
 pub struct Arena {
-    // The head is seperated out from the list as a unbenchmarked
+    // The head is separated out from the list as a unbenchmarked
     // microoptimization, to avoid needing to case on the list to
     // access the head.
     priv head: Chunk,
diff --git a/src/libstd/future.rs b/src/libstd/future.rs
index f59abfa81ca..a0312849a35 100644
--- a/src/libstd/future.rs
+++ b/src/libstd/future.rs
@@ -23,7 +23,7 @@
 
 use core::cast;
 use core::cell::Cell;
-use core::comm::{ChanOne, PortOne, oneshot, send_one};
+use core::comm::{PortOne, oneshot, send_one};
 use core::pipes::recv;
 use core::task;
 
diff --git a/src/libstd/net_tcp.rs b/src/libstd/net_tcp.rs
index 764152d6812..6278db617c7 100644
--- a/src/libstd/net_tcp.rs
+++ b/src/libstd/net_tcp.rs
@@ -11,8 +11,6 @@
 //! High-level interface to libuv's TCP functionality
 // FIXME #4425: Need FFI fixes
 
-#[allow(deprecated_mode)];
-
 use future;
 use future_spawn = future::spawn;
 use ip = net_ip;
diff --git a/src/libstd/net_url.rs b/src/libstd/net_url.rs
index 21e1733cc30..ba3fd69e344 100644
--- a/src/libstd/net_url.rs
+++ b/src/libstd/net_url.rs
@@ -10,8 +10,6 @@
 
 //! Types/fns concerning URLs (see RFC 3986)
 
-#[allow(deprecated_mode)];
-
 use core::cmp::Eq;
 use core::io::{Reader, ReaderUtil};
 use core::io;
diff --git a/src/libstd/workcache.rs b/src/libstd/workcache.rs
index 2cdf36c71c7..f44d143004e 100644
--- a/src/libstd/workcache.rs
+++ b/src/libstd/workcache.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[allow(deprecated_mode)];
-
 use json;
 use sha1;
 use serialize::{Encoder, Encodable, Decoder, Decodable};
@@ -17,7 +15,7 @@ use sort;
 
 use core::cell::Cell;
 use core::cmp;
-use core::comm::{ChanOne, PortOne, oneshot, send_one};
+use core::comm::{PortOne, oneshot, send_one};
 use core::either::{Either, Left, Right};
 use core::hashmap::HashMap;
 use core::io;
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 5ae101a567c..a6528160398 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -932,8 +932,8 @@ pub impl Parser {
         loop {
             match *self.token {
                 token::MOD_SEP => {
-                    match self.look_ahead(1u) {
-                        token::IDENT(id,_) => {
+                    match self.look_ahead(1) {
+                        token::IDENT(*) => {
                             self.bump();
                             ids.push(self.parse_ident());
                         }
@@ -3693,7 +3693,7 @@ pub impl Parser {
             items: _,
             foreign_items: foreign_items
         } = self.parse_foreign_items(first_item_attrs, true);
-        let mut initial_attrs = attrs_remaining;
+        let _initial_attrs = attrs_remaining;
         assert!(*self.token == token::RBRACE);
         ast::foreign_mod {
             sort: sort,
diff --git a/src/libsyntax/syntax.rc b/src/libsyntax/syntax.rc
index a401d9eb8ac..cea3b20e97e 100644
--- a/src/libsyntax/syntax.rc
+++ b/src/libsyntax/syntax.rc
@@ -22,7 +22,6 @@
 
 #[allow(vecs_implicitly_copyable)];
 #[allow(non_camel_case_types)];
-#[deny(deprecated_mode)];
 #[deny(deprecated_pattern)];
 
 extern mod std(vers = "0.7-pre");