Skip to content

Commit 2df8799

Browse files
committed
rustc: Warning police
1 parent 1a5f11a commit 2df8799

File tree

4 files changed

+8
-11
lines changed

4 files changed

+8
-11
lines changed

src/librustc/metadata/loader.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ fn get_metadata_section(os: os,
196196
while llvm::LLVMIsSectionIteratorAtEnd(of.llof, si.llsi) == False {
197197
let name_buf = llvm::LLVMGetSectionName(si.llsi);
198198
let name = unsafe { str::raw::from_c_str(name_buf) };
199-
debug!("get_matadata_section: name %s", name);
199+
debug!("get_metadata_section: name %s", name);
200200
if name == read_meta_section_name(os) {
201201
let cbuf = llvm::LLVMGetSectionContents(si.llsi);
202202
let csz = llvm::LLVMGetSectionSize(si.llsi) as uint;

src/librustc/middle/trans/base.rs

+6-8
Original file line numberDiff line numberDiff line change
@@ -2096,8 +2096,7 @@ pub fn trans_tuple_struct(ccx: @CrateContext,
20962096
}
20972097
20982098
pub fn trans_enum_def(ccx: @CrateContext, enum_definition: &ast::enum_def,
2099-
id: ast::node_id,
2100-
path: @ast_map::path, vi: @~[ty::VariantInfo],
2099+
id: ast::node_id, vi: @~[ty::VariantInfo],
21012100
i: &mut uint) {
21022101
for vec::each(enum_definition.variants) |variant| {
21032102
let disr_val = vi[*i].disr_val;
@@ -2172,8 +2171,7 @@ pub fn trans_item(ccx: @CrateContext, item: &ast::item) {
21722171
if !generics.is_type_parameterized() {
21732172
let vi = ty::enum_variants(ccx.tcx, local_def(item.id));
21742173
let mut i = 0;
2175-
trans_enum_def(ccx, enum_definition, item.id,
2176-
path, vi, &mut i);
2174+
trans_enum_def(ccx, enum_definition, item.id, vi, &mut i);
21772175
}
21782176
}
21792177
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 {
24302428
Some(&v) => v,
24312429
None => {
24322430
let mut exprt = false;
2433-
let val = match *ccx.tcx.items.get(&id) {
2431+
let val = match *tcx.items.get(&id) {
24342432
ast_map::node_item(i, pth) => {
24352433
let my_path = vec::append(/*bad*/copy *pth,
24362434
~[path_name(i.ident)]);
24372435
match i.node {
24382436
ast::item_const(_, expr) => {
2439-
let typ = ty::node_id_to_type(ccx.tcx, i.id);
2437+
let typ = ty::node_id_to_type(tcx, i.id);
24402438
let s = mangle_exported_name(ccx, my_path, typ);
24412439
// We need the translated value here, because for enums the
24422440
// 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 {
24952493
ni.attrs)
24962494
}
24972495
ast::foreign_item_const(*) => {
2498-
let typ = ty::node_id_to_type(ccx.tcx, ni.id);
2496+
let typ = ty::node_id_to_type(tcx, ni.id);
24992497
let ident = ccx.sess.parse_sess.interner.get(ni.ident);
25002498
let g = do str::as_c_str(*ident) |buf| {
25012499
unsafe {
@@ -2536,7 +2534,7 @@ pub fn get_item_val(ccx: @CrateContext, id: ast::node_id) -> ValueRef {
25362534
// Only register the constructor if this is a tuple-like struct.
25372535
match struct_def.ctor_id {
25382536
None => {
2539-
ccx.tcx.sess.bug(~"attempt to register a constructor of \
2537+
tcx.sess.bug(~"attempt to register a constructor of \
25402538
a non-tuple-like struct")
25412539
}
25422540
Some(ctor_id) => {

src/librustc/middle/ty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ use core::to_bytes;
3333
use core::hashmap::{HashMap, HashSet};
3434
use std::smallintmap::SmallIntMap;
3535
use syntax::ast::*;
36-
use syntax::ast_util::{is_local, local_def};
36+
use syntax::ast_util::is_local;
3737
use syntax::ast_util;
3838
use syntax::attr;
3939
use syntax::codemap::span;

src/librustc/rustc.rc

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#[allow(non_implicitly_copyable_typarams)];
2121
#[allow(non_camel_case_types)];
2222
#[deny(deprecated_pattern)];
23-
#[deny(deprecated_mode)];
2423

2524
extern mod std(vers = "0.7-pre");
2625
extern mod syntax(vers = "0.7-pre");

0 commit comments

Comments
 (0)