auto merge of #6229 : catamorphism/rust/warning-police, r=catamorphism
This commit is contained in:
commit
a47e4cb22f
|
@ -39,7 +39,7 @@ use result::Result;
|
||||||
use comm::{stream, Chan, GenericChan, GenericPort, Port};
|
use comm::{stream, Chan, GenericChan, GenericPort, Port};
|
||||||
use prelude::*;
|
use prelude::*;
|
||||||
use result;
|
use result;
|
||||||
use task::rt::{task_id, sched_id, rust_task};
|
use task::rt::{task_id, sched_id};
|
||||||
use util;
|
use util;
|
||||||
use util::replace;
|
use util::replace;
|
||||||
use unstable::finally::Finally;
|
use unstable::finally::Finally;
|
||||||
|
|
|
@ -17,7 +17,9 @@ use str;
|
||||||
use sys;
|
use sys;
|
||||||
use unstable::exchange_alloc;
|
use unstable::exchange_alloc;
|
||||||
use cast::transmute;
|
use cast::transmute;
|
||||||
|
#[cfg(not(stage0))]
|
||||||
use rt::{context, OldTaskContext};
|
use rt::{context, OldTaskContext};
|
||||||
|
#[cfg(not(stage0))]
|
||||||
use rt::local_services::borrow_local_services;
|
use rt::local_services::borrow_local_services;
|
||||||
|
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
|
|
|
@ -196,7 +196,7 @@ fn get_metadata_section(os: os,
|
||||||
while llvm::LLVMIsSectionIteratorAtEnd(of.llof, si.llsi) == False {
|
while llvm::LLVMIsSectionIteratorAtEnd(of.llof, si.llsi) == False {
|
||||||
let name_buf = llvm::LLVMGetSectionName(si.llsi);
|
let name_buf = llvm::LLVMGetSectionName(si.llsi);
|
||||||
let name = unsafe { str::raw::from_c_str(name_buf) };
|
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) {
|
if name == read_meta_section_name(os) {
|
||||||
let cbuf = llvm::LLVMGetSectionContents(si.llsi);
|
let cbuf = llvm::LLVMGetSectionContents(si.llsi);
|
||||||
let csz = llvm::LLVMGetSectionSize(si.llsi) as uint;
|
let csz = llvm::LLVMGetSectionSize(si.llsi) as uint;
|
||||||
|
|
|
@ -2096,8 +2096,7 @@ pub fn trans_tuple_struct(ccx: @CrateContext,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn trans_enum_def(ccx: @CrateContext, enum_definition: &ast::enum_def,
|
pub fn trans_enum_def(ccx: @CrateContext, enum_definition: &ast::enum_def,
|
||||||
id: ast::node_id,
|
id: ast::node_id, vi: @~[ty::VariantInfo],
|
||||||
path: @ast_map::path, vi: @~[ty::VariantInfo],
|
|
||||||
i: &mut uint) {
|
i: &mut uint) {
|
||||||
for vec::each(enum_definition.variants) |variant| {
|
for vec::each(enum_definition.variants) |variant| {
|
||||||
let disr_val = vi[*i].disr_val;
|
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() {
|
if !generics.is_type_parameterized() {
|
||||||
let vi = ty::enum_variants(ccx.tcx, local_def(item.id));
|
let vi = ty::enum_variants(ccx.tcx, local_def(item.id));
|
||||||
let mut i = 0;
|
let mut i = 0;
|
||||||
trans_enum_def(ccx, enum_definition, item.id,
|
trans_enum_def(ccx, enum_definition, item.id, vi, &mut i);
|
||||||
path, vi, &mut i);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ast::item_const(_, expr) => consts::trans_const(ccx, expr, item.id),
|
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,
|
Some(&v) => v,
|
||||||
None => {
|
None => {
|
||||||
let mut exprt = false;
|
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) => {
|
ast_map::node_item(i, pth) => {
|
||||||
let my_path = vec::append(/*bad*/copy *pth,
|
let my_path = vec::append(/*bad*/copy *pth,
|
||||||
~[path_name(i.ident)]);
|
~[path_name(i.ident)]);
|
||||||
match i.node {
|
match i.node {
|
||||||
ast::item_const(_, expr) => {
|
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);
|
let s = mangle_exported_name(ccx, my_path, typ);
|
||||||
// We need the translated value here, because for enums the
|
// We need the translated value here, because for enums the
|
||||||
// LLVM type is not fully determined by the Rust type.
|
// 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)
|
ni.attrs)
|
||||||
}
|
}
|
||||||
ast::foreign_item_const(*) => {
|
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 ident = ccx.sess.parse_sess.interner.get(ni.ident);
|
||||||
let g = do str::as_c_str(*ident) |buf| {
|
let g = do str::as_c_str(*ident) |buf| {
|
||||||
unsafe {
|
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.
|
// Only register the constructor if this is a tuple-like struct.
|
||||||
match struct_def.ctor_id {
|
match struct_def.ctor_id {
|
||||||
None => {
|
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")
|
a non-tuple-like struct")
|
||||||
}
|
}
|
||||||
Some(ctor_id) => {
|
Some(ctor_id) => {
|
||||||
|
|
|
@ -33,7 +33,7 @@ use core::to_bytes;
|
||||||
use core::hashmap::{HashMap, HashSet};
|
use core::hashmap::{HashMap, HashSet};
|
||||||
use std::smallintmap::SmallIntMap;
|
use std::smallintmap::SmallIntMap;
|
||||||
use syntax::ast::*;
|
use syntax::ast::*;
|
||||||
use syntax::ast_util::{is_local, local_def};
|
use syntax::ast_util::is_local;
|
||||||
use syntax::ast_util;
|
use syntax::ast_util;
|
||||||
use syntax::attr;
|
use syntax::attr;
|
||||||
use syntax::codemap::span;
|
use syntax::codemap::span;
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
#[allow(non_implicitly_copyable_typarams)];
|
#[allow(non_implicitly_copyable_typarams)];
|
||||||
#[allow(non_camel_case_types)];
|
#[allow(non_camel_case_types)];
|
||||||
#[deny(deprecated_pattern)];
|
#[deny(deprecated_pattern)];
|
||||||
#[deny(deprecated_mode)];
|
|
||||||
|
|
||||||
extern mod std(vers = "0.7-pre");
|
extern mod std(vers = "0.7-pre");
|
||||||
extern mod syntax(vers = "0.7-pre");
|
extern mod syntax(vers = "0.7-pre");
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
// to waste time running the destructors of POD.
|
// to waste time running the destructors of POD.
|
||||||
|
|
||||||
use list::{MutList, MutCons, MutNil};
|
use list::{MutList, MutCons, MutNil};
|
||||||
use list;
|
|
||||||
|
|
||||||
use core::at_vec;
|
use core::at_vec;
|
||||||
use core::cast::{transmute, transmute_mut_region};
|
use core::cast::{transmute, transmute_mut_region};
|
||||||
|
@ -79,7 +78,7 @@ struct Chunk {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Arena {
|
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
|
// microoptimization, to avoid needing to case on the list to
|
||||||
// access the head.
|
// access the head.
|
||||||
priv head: Chunk,
|
priv head: Chunk,
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
use core::cast;
|
use core::cast;
|
||||||
use core::cell::Cell;
|
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::pipes::recv;
|
||||||
use core::task;
|
use core::task;
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
//! High-level interface to libuv's TCP functionality
|
//! High-level interface to libuv's TCP functionality
|
||||||
// FIXME #4425: Need FFI fixes
|
// FIXME #4425: Need FFI fixes
|
||||||
|
|
||||||
#[allow(deprecated_mode)];
|
|
||||||
|
|
||||||
use future;
|
use future;
|
||||||
use future_spawn = future::spawn;
|
use future_spawn = future::spawn;
|
||||||
use ip = net_ip;
|
use ip = net_ip;
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
|
|
||||||
//! Types/fns concerning URLs (see RFC 3986)
|
//! Types/fns concerning URLs (see RFC 3986)
|
||||||
|
|
||||||
#[allow(deprecated_mode)];
|
|
||||||
|
|
||||||
use core::cmp::Eq;
|
use core::cmp::Eq;
|
||||||
use core::io::{Reader, ReaderUtil};
|
use core::io::{Reader, ReaderUtil};
|
||||||
use core::io;
|
use core::io;
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#[allow(deprecated_mode)];
|
|
||||||
|
|
||||||
use json;
|
use json;
|
||||||
use sha1;
|
use sha1;
|
||||||
use serialize::{Encoder, Encodable, Decoder, Decodable};
|
use serialize::{Encoder, Encodable, Decoder, Decodable};
|
||||||
|
@ -17,7 +15,7 @@ use sort;
|
||||||
|
|
||||||
use core::cell::Cell;
|
use core::cell::Cell;
|
||||||
use core::cmp;
|
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::either::{Either, Left, Right};
|
||||||
use core::hashmap::HashMap;
|
use core::hashmap::HashMap;
|
||||||
use core::io;
|
use core::io;
|
||||||
|
|
|
@ -932,8 +932,8 @@ pub impl Parser {
|
||||||
loop {
|
loop {
|
||||||
match *self.token {
|
match *self.token {
|
||||||
token::MOD_SEP => {
|
token::MOD_SEP => {
|
||||||
match self.look_ahead(1u) {
|
match self.look_ahead(1) {
|
||||||
token::IDENT(id,_) => {
|
token::IDENT(*) => {
|
||||||
self.bump();
|
self.bump();
|
||||||
ids.push(self.parse_ident());
|
ids.push(self.parse_ident());
|
||||||
}
|
}
|
||||||
|
@ -3693,7 +3693,7 @@ pub impl Parser {
|
||||||
items: _,
|
items: _,
|
||||||
foreign_items: foreign_items
|
foreign_items: foreign_items
|
||||||
} = self.parse_foreign_items(first_item_attrs, true);
|
} = self.parse_foreign_items(first_item_attrs, true);
|
||||||
let mut initial_attrs = attrs_remaining;
|
let _initial_attrs = attrs_remaining;
|
||||||
assert!(*self.token == token::RBRACE);
|
assert!(*self.token == token::RBRACE);
|
||||||
ast::foreign_mod {
|
ast::foreign_mod {
|
||||||
sort: sort,
|
sort: sort,
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
|
|
||||||
#[allow(vecs_implicitly_copyable)];
|
#[allow(vecs_implicitly_copyable)];
|
||||||
#[allow(non_camel_case_types)];
|
#[allow(non_camel_case_types)];
|
||||||
#[deny(deprecated_mode)];
|
|
||||||
#[deny(deprecated_pattern)];
|
#[deny(deprecated_pattern)];
|
||||||
|
|
||||||
extern mod std(vers = "0.7-pre");
|
extern mod std(vers = "0.7-pre");
|
||||||
|
|
Loading…
Reference in New Issue