auto merge of #6229 : catamorphism/rust/warning-police, r=catamorphism

This commit is contained in:
bors 2013-05-03 23:48:36 -07:00
commit a47e4cb22f
13 changed files with 17 additions and 26 deletions

View File

@ -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;

View File

@ -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)]

View File

@ -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;

View File

@ -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) => {

View File

@ -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;

View File

@ -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");

View File

@ -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,

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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,

View File

@ -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");