fix various warnings

This commit is contained in:
Erick Tryzelaar 2013-08-30 15:06:11 -07:00
parent 6a225951e3
commit 91d6c60bed
13 changed files with 11 additions and 30 deletions

View File

@ -595,7 +595,6 @@ impl<'self> Parser<'self> {
mod tests {
use super::*;
use prelude::*;
use realstd::fmt::{String};
fn same(fmt: &'static str, p: ~[Piece<'static>]) {
let mut parser = Parser::new(fmt);

View File

@ -12,6 +12,7 @@
use cast;
use clone::Clone;
#[cfg(not(test))]
use cmp::Equiv;
use iterator::{range, Iterator};
use option::{Option, Some, None};

View File

@ -340,7 +340,7 @@ mod test {
use parse::token::{str_to_ident};
use util::parser_testing::{string_to_tts_and_sess, string_to_parser};
use util::parser_testing::{string_to_expr, string_to_item};
use util::parser_testing::{string_to_stmt, strs_to_idents};
use util::parser_testing::string_to_stmt;
// map a string to tts, return the tt without its parsesess
fn string_to_tts_only(source_str : @str) -> ~[ast::token_tree] {

View File

@ -28,7 +28,6 @@ use std::io;
use std::os;
use std::result::{Ok, Err};
use std::task;
use std::u64;
use std::uint;
fn fib(n: int) -> int {

View File

@ -13,11 +13,8 @@
extern mod cci_const;
use cci_const::bar;
use std::cast::transmute;
static foo: extern "C" fn() = bar;
pub fn main() {
unsafe {
assert_eq!(foo, bar);
}
assert_eq!(foo, bar);
}

View File

@ -18,8 +18,6 @@ struct S {
}
pub fn main() {
unsafe {
assert_eq!(foopy, f);
assert_eq!(f, s.f);
}
assert_eq!(foopy, f);
assert_eq!(f, s.f);
}

View File

@ -15,7 +15,7 @@ extern fn voidret2() {}
extern fn uintret() -> uint { 22 }
extern fn uintvoidret(x: uint) {}
extern fn uintvoidret(_x: uint) {}
extern fn uintuintuintuintret(x: uint, y: uint, z: uint) -> uint { x+y+z }

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::cast::transmute;
extern fn f() {
}
@ -17,12 +15,10 @@ extern fn g() {
}
pub fn main() {
unsafe {
let a: extern "C" fn() = f;
let b: extern "C" fn() = f;
let c: extern "C" fn() = g;
let a: extern "C" fn() = f;
let b: extern "C" fn() = f;
let c: extern "C" fn() = g;
assert_eq!(a, b);
assert!(a != c);
}
assert_eq!(a, b);
assert!(a != c);
}

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::io;
struct T (&'static [int]);
static t : T = T (&'static [5, 4, 3]);
fn main () {

View File

@ -10,8 +10,6 @@
// xfail-fast
use std::int;
trait vec_monad<A> {
fn bind<B>(&self, f: &fn(&A) -> ~[B]) -> ~[B];
}

View File

@ -10,7 +10,6 @@
// xfail-fast
use std::int;
use std::libc::c_void;
use std::ptr;
use std::sys;

View File

@ -10,8 +10,6 @@
// xfail-fast
use std::uint;
pub trait plus {
fn plus(&self) -> int;
}

View File

@ -10,8 +10,6 @@
// xfail-fast
use std::int;
trait to_str {
fn to_string(&self) -> ~str;
}