Skip to content

Warning police #6229

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 4 commits into from
May 4, 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
2 changes: 1 addition & 1 deletion src/libcore/task/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions src/libcore/unstable/lang.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/metadata/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
14 changes: 6 additions & 8 deletions src/librustc/middle/trans/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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) => {
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/librustc/rustc.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
3 changes: 1 addition & 2 deletions src/libstd/arena.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/future.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 0 additions & 2 deletions src/libstd/net_tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions src/libstd/net_url.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 1 addition & 3 deletions src/libstd/workcache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@
// 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};
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;
Expand Down
6 changes: 3 additions & 3 deletions src/libsyntax/parse/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion src/libsyntax/syntax.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down