Skip to content

Commit

Permalink
Fix warnings it tests
Browse files Browse the repository at this point in the history
  • Loading branch information
erickt committed Aug 17, 2013
1 parent e20d460 commit ad5c676
Show file tree
Hide file tree
Showing 400 changed files with 701 additions and 581 deletions.
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() {()}
4 changes: 3 additions & 1 deletion src/test/debug-info/borrowed-unique-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_box: ~bool = ~true;
Expand Down Expand Up @@ -111,4 +113,4 @@ fn main() {
zzz();
}

fn zzz() {()}
fn zzz() {()}
2 changes: 2 additions & 0 deletions src/test/debug-info/box.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
// debugger:print d->val
// check:$4 = false

#[allow(unused_variable)];

fn main() {
let a = ~1;
let b = ~(2, 3.5);
Expand Down
4 changes: 3 additions & 1 deletion src/test/debug-info/boxed-struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
// debugger:print managed_dtor->val
// check:$4 = {x = 33, y = 333, z = 3333, w = 33333}

#[allow(unused_variable)];

struct StructWithSomePadding {
x: i16,
y: i32,
Expand Down Expand Up @@ -56,4 +58,4 @@ fn main() {
zzz();
}

fn zzz() {()}
fn zzz() {()}
4 changes: 3 additions & 1 deletion src/test/debug-info/boxed-vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
// debugger:print *((uint64_t[4]*)(unique->elements))
// check:$4 = {10, 11, 12, 13}

#[allow(unused_variable)];

fn main() {

let managed: @[i64] = @[7, 8, 9];
Expand All @@ -33,4 +35,4 @@ fn main() {
zzz();
}

fn zzz() {()}
fn zzz() {()}
4 changes: 3 additions & 1 deletion src/test/debug-info/c-style-enum-in-composite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
// debugger:print struct_with_drop
// check:$7 = {{a = OneHundred, b = Vienna}, 9}

#[allow(unused_variable)];

enum AnEnum {
OneHundred = 100,
OneThousand = 1000,
Expand Down Expand Up @@ -116,4 +118,4 @@ fn main() {
zzz();
}

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

#[allow(unused_variable)];

enum AutoDiscriminant {
One,
Two,
Expand Down Expand Up @@ -67,4 +69,4 @@ fn main() {
zzz();
}

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

0 comments on commit ad5c676

Please sign in to comment.