Skip to content
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

Deny warnings in stage1+ libsyntax/librustc/librustdoc/librusti/librust #8441

Closed
wants to merge 4 commits into from
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions mk/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBSYNTAX_$(3)): \
| $$(TLIB$(1)_T_$(2)_H_$(3))/
@$$(call E, compile_and_link: $$@)
$$(call REMOVE_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBSYNTAX_GLOB_$(2)),$$(notdir $$@))
$$(STAGE$(1)_T_$(2)_H_$(3)) $(BORROWCK) --out-dir $$(@D) $$< && touch $$@
$$(STAGE$(1)_T_$(2)_H_$(3)) $$(WFLAGS_ST$(1)) $(BORROWCK) --out-dir $$(@D) $$< && touch $$@
$$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBSYNTAX_GLOB_$(2)),$$(notdir $$@))

# Only build the compiler for host triples
Expand All @@ -90,7 +90,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(3)): \
| $$(TLIB$(1)_T_$(2)_H_$(3))/
@$$(call E, compile_and_link: $$@)
$$(call REMOVE_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTC_GLOB_$(2)),$$(notdir $$@))
$$(STAGE$(1)_T_$(2)_H_$(3)) --out-dir $$(@D) $$< && touch $$@
$$(STAGE$(1)_T_$(2)_H_$(3)) $$(WFLAGS_ST$(1)) --out-dir $$(@D) $$< && touch $$@
$$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTC_GLOB_$(2)),$$(notdir $$@))

$$(TBIN$(1)_T_$(2)_H_$(3))/rustc$$(X_$(3)): \
Expand Down
6 changes: 3 additions & 3 deletions mk/tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTDOC_$(4)): \
| $$(TLIB$(1)_T_$(4)_H_$(3))/
@$$(call E, compile_and_link: $$@)
$$(call REMOVE_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTDOC_GLOB_$(4)),$$(notdir $$@))
$$(STAGE$(1)_T_$(4)_H_$(3)) --out-dir $$(@D) $$< && touch $$@
$$(STAGE$(1)_T_$(4)_H_$(3)) $$(WFLAGS_ST$(1)) --out-dir $$(@D) $$< && touch $$@
$$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTDOC_GLOB_$(4)),$$(notdir $$@))

$$(TBIN$(1)_T_$(4)_H_$(3))/rustdoc$$(X_$(4)): \
Expand All @@ -85,7 +85,7 @@ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTI_$(4)): \
| $$(TLIB$(1)_T_$(4)_H_$(3))/
@$$(call E, compile_and_link: $$@)
$$(call REMOVE_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTI_GLOB_$(4)),$$(notdir $$@))
$$(STAGE$(1)_T_$(4)_H_$(3)) --out-dir $$(@D) $$< && touch $$@
$$(STAGE$(1)_T_$(4)_H_$(3)) $$(WFLAGS_ST$(1)) --out-dir $$(@D) $$< && touch $$@
$$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTI_GLOB_$(4)),$$(notdir $$@))

$$(TBIN$(1)_T_$(4)_H_$(3))/rusti$$(X_$(4)): \
Expand All @@ -106,7 +106,7 @@ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUST_$(4)): \
| $$(TLIB$(1)_T_$(4)_H_$(3))/
@$$(call E, compile_and_link: $$@)
$$(call REMOVE_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUST_GLOB_$(4)),$$(notdir $$@))
$$(STAGE$(1)_T_$(4)_H_$(3)) --out-dir $$(@D) $$< && touch $$@
$$(STAGE$(1)_T_$(4)_H_$(3)) $$(WFLAGS_ST$(1)) --out-dir $$(@D) $$< && touch $$@
$$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUST_GLOB_$(4)),$$(notdir $$@))

$$(TBIN$(1)_T_$(4)_H_$(3))/rust$$(X_$(4)): \
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/middle/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ impl Context {
(orig.visit_item)(it, (self, stopping));
}
NewVisitor(new_visitor) => {
let mut new_visitor = new_visitor;
let new_visitor = new_visitor;
new_visitor.visit_item(it, ());
}
}
Expand Down Expand Up @@ -520,7 +520,7 @@ impl Context {
let fk = visit::fk_method(m.ident,
&m.generics,
m);
let mut new_visitor = new_visitor;
let new_visitor = new_visitor;
new_visitor.visit_fn(&fk,
&m.decl,
&m.body,
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ pub mod ptr_tests {
one, two, three
];

do arr.as_imm_buf |arr_ptr, arr_len| {
do arr.as_imm_buf |arr_ptr, _| {
let mut ctr = 0;
let mut iteration_count = 0;
do array_each(arr_ptr) |e| {
Expand Down
1 change: 0 additions & 1 deletion src/libsyntax/parse/attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

use ast;
use codemap::{spanned, mk_sp};
use codemap::BytePos;
use parse::common::*; //resolve bug?
use parse::token;
use parse::parser::Parser;
Expand Down
1 change: 0 additions & 1 deletion src/test/auxiliary/cci_capture_clause.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use std::comm::*;
use std::task;

pub fn foo<T:Send + Clone>(x: T) -> Port<T> {
Expand Down
3 changes: 0 additions & 3 deletions src/test/auxiliary/cci_class_5.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
// except according to those terms.

pub mod kitties {
use std::uint;

pub struct cat {
priv meows : uint,
how_hungry : int,
Expand All @@ -26,5 +24,4 @@ pub mod kitties {
how_hungry: in_y
}
}

}
2 changes: 0 additions & 2 deletions src/test/auxiliary/cci_class_cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use std::to_str::*;

pub mod kitty {
pub struct cat {
priv meows : uint,
Expand Down
2 changes: 1 addition & 1 deletion src/test/auxiliary/crate-method-reexport-grrrrrrr2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub mod name_pool {
}

impl add for name_pool {
fn add(&self, s: ~str) {
fn add(&self, _s: ~str) {
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/auxiliary/crateresolve5-1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub enum e {

pub fn nominal() -> e { e_val }

pub fn nominal_eq(e1: e, e2: e) -> bool { true }
pub fn nominal_eq(_e1: e, _e2: e) -> bool { true }

impl Eq for e {
fn eq(&self, other: &e) -> bool { nominal_eq(*self, *other) }
Expand Down
2 changes: 1 addition & 1 deletion src/test/auxiliary/crateresolve5-2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ impl Eq for e {

pub fn nominal() -> e { e_val }

pub fn nominal_neq(e1: e, e2: e) -> bool { false }
pub fn nominal_neq(_e1: e, _e2: e) -> bool { false }

pub fn f() -> int { 20 }
4 changes: 1 addition & 3 deletions src/test/auxiliary/issue-2526.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ fn arc<T:Freeze>(_data: T) -> arc_destruct<T> {
}

fn init() -> arc_destruct<context_res> {
unsafe {
arc(context_res())
}
arc(context_res())
}

struct context_res {
Expand Down
2 changes: 1 addition & 1 deletion src/test/auxiliary/issue2378a.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
enum maybe<T> { just(T), nothing }

impl <T:Clone> Index<uint,T> for maybe<T> {
fn index(&self, idx: &uint) -> T {
fn index(&self, _idx: &uint) -> T {
match self {
&just(ref t) => (*t).clone(),
&nothing => { fail!(); }
Expand Down
2 changes: 2 additions & 0 deletions src/test/auxiliary/issue_2316_b.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#[allow(unused_imports)];

extern mod issue_2316_a;

pub mod cloth {
Expand Down
2 changes: 1 addition & 1 deletion src/test/auxiliary/moves_based_on_type_lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ impl Drop for S {
pub fn f() {
let x = S { x: 1 };
let y = x;
let z = y;
let _z = y;
}
2 changes: 1 addition & 1 deletion src/test/auxiliary/trait_default_method_xc_aux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ impl A for Something {

trait B<T> {
fn thing<U>(&self, x: T, y: U) -> (T, U) { (x, y) }
fn staticthing<U>(z: &Self, x: T, y: U) -> (T, U) { (x, y) }
fn staticthing<U>(_z: &Self, x: T, y: U) -> (T, U) { (x, y) }
}

impl<T> B<T> for int { }
Expand Down
3 changes: 0 additions & 3 deletions src/test/bench/core-std.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,11 @@
extern mod extra;

use extra::time::precise_time_s;
use std::int;
use std::io;
use std::os;
use std::rand::RngUtil;
use std::rand;
use std::result;
use std::str;
use std::uint;
use std::util;
use std::vec;

Expand Down
1 change: 0 additions & 1 deletion src/test/bench/msgsend-ring-mutex-arcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ use extra::arc;
use extra::future;
use extra::time;
use std::cell::Cell;
use std::io;
use std::os;
use std::uint;

Expand Down
1 change: 0 additions & 1 deletion src/test/bench/msgsend-ring-rw-arcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ use extra::arc;
use extra::future;
use extra::time;
use std::cell::Cell;
use std::io;
use std::os;
use std::uint;

Expand Down
1 change: 0 additions & 1 deletion src/test/bench/noise.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Perlin noise benchmark from https://gist.github.com/1170424

use std::float;
use std::int;
use std::rand::{Rng, RngUtil};
use std::rand;

Expand Down
1 change: 0 additions & 1 deletion src/test/bench/rt-messaging-ping-pong.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

extern mod extra;

use std::task::spawn;
use std::os;
use std::uint;
use std::rt::test::spawntask_later;
Expand Down
1 change: 0 additions & 1 deletion src/test/bench/rt-parfib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

extern mod extra;

use std::task::spawn;
use std::os;
use std::uint;
use std::rt::test::spawntask_later;
Expand Down
1 change: 0 additions & 1 deletion src/test/bench/shootout-ackermann.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
extern mod extra;

use std::int;
use std::io;
use std::os;

fn ack(m: int, n: int) -> int {
Expand Down
2 changes: 0 additions & 2 deletions src/test/bench/shootout-fasta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ use std::io;
use std::os;
use std::rand::Rng;
use std::rand;
use std::result;
use std::str;
use std::uint;

static LINE_LENGTH: uint = 60u;

Expand Down
1 change: 0 additions & 1 deletion src/test/bench/shootout-fibo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
extern mod extra;

use std::int;
use std::io;
use std::os;

fn fib(n: int) -> int {
Expand Down
1 change: 0 additions & 1 deletion src/test/bench/shootout-k-nucleotide-pipes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ use std::io::ReaderUtil;
use std::io;
use std::option;
use std::os;
use std::result;
use std::str;
use std::task;
use std::util;
Expand Down
1 change: 0 additions & 1 deletion src/test/bench/sudoku.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ extern mod extra;
use std::io::{ReaderUtil, WriterUtil};
use std::io;
use std::os;
use std::u8;
use std::uint;
use std::unstable::intrinsics::cttz16;
use std::vec;
Expand Down
2 changes: 1 addition & 1 deletion src/test/codegen/scalar-function-call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ fn foo(x: int) -> int {

#[no_mangle]
fn test() {
let x = foo(10);
let _x = foo(10);
}
2 changes: 2 additions & 0 deletions src/test/debug-info/basic-types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
// debugger:print f64
// check:$15 = 3.5

#[allow(unused_variable)];

fn main() {
let b: bool = false;
let i: int = -1;
Expand Down
4 changes: 3 additions & 1 deletion src/test/debug-info/borrowed-basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
// debugger:print *f64_ref
// check:$15 = 3.5

#[allow(unused_variable)];

fn main() {
let bool_val: bool = true;
let bool_ref: &bool = &bool_val;
Expand Down Expand Up @@ -110,4 +112,4 @@ fn main() {
zzz();
}

fn zzz() {()}
fn zzz() {()}
4 changes: 3 additions & 1 deletion src/test/debug-info/borrowed-c-style-enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
// debugger:print *the_c_ref
// check:$3 = TheC

#[allow(unused_variable)];

enum ABC { TheA, TheB, TheC }

fn main() {
Expand All @@ -39,4 +41,4 @@ fn main() {
zzz();
}

fn zzz() {()}
fn zzz() {()}
4 changes: 3 additions & 1 deletion src/test/debug-info/borrowed-enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
// debugger:print *univariant_ref
// check:$3 = {4820353753753434}

#[allow(unused_variable)];

// The first element is to ensure proper alignment, irrespective of the machines word size. Since
// the size of the discriminant value is machine dependent, this has be taken into account when
// datatype layout should be predictable as in this case.
Expand Down Expand Up @@ -59,4 +61,4 @@ fn main() {
zzz();
}

fn zzz() {()}
fn zzz() {()}
3 changes: 2 additions & 1 deletion src/test/debug-info/borrowed-managed-basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
// debugger:print *f64_ref
// check:$15 = 3.5

#[allow(unused_variable)];

fn main() {
let bool_box: @bool = @true;
Expand Down Expand Up @@ -111,4 +112,4 @@ fn main() {
zzz();
}

fn zzz() {()}
fn zzz() {()}
4 changes: 2 additions & 2 deletions src/test/debug-info/borrowed-struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
// debugger:print *unique_val_interior_ref_2
// check:$10 = 26.5


#[allow(unused_variable)];

struct SomeStruct {
x: int,
Expand All @@ -72,4 +72,4 @@ fn main() {
zzz();
}

fn zzz() {()}
fn zzz() {()}
4 changes: 3 additions & 1 deletion src/test/debug-info/borrowed-tuple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
// debugger:print *unique_val_ref
// check:$4 = {-17, -22}

#[allow(unused_variable)];

fn main() {
let stack_val: (i16, f32) = (-14, -19f32);
let stack_val_ref: &(i16, f32) = &stack_val;
Expand All @@ -41,4 +43,4 @@ fn main() {
zzz();
}

fn zzz() {()}
fn zzz() {()}
Loading