mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
fix various warnings
This commit is contained in:
parent
6a225951e3
commit
91d6c60bed
@ -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);
|
||||
|
@ -12,6 +12,7 @@
|
||||
|
||||
use cast;
|
||||
use clone::Clone;
|
||||
#[cfg(not(test))]
|
||||
use cmp::Equiv;
|
||||
use iterator::{range, Iterator};
|
||||
use option::{Option, Some, None};
|
||||
|
@ -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] {
|
||||
|
@ -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 {
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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 }
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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 () {
|
||||
|
@ -10,8 +10,6 @@
|
||||
|
||||
// xfail-fast
|
||||
|
||||
use std::int;
|
||||
|
||||
trait vec_monad<A> {
|
||||
fn bind<B>(&self, f: &fn(&A) -> ~[B]) -> ~[B];
|
||||
}
|
||||
|
@ -10,7 +10,6 @@
|
||||
|
||||
// xfail-fast
|
||||
|
||||
use std::int;
|
||||
use std::libc::c_void;
|
||||
use std::ptr;
|
||||
use std::sys;
|
||||
|
@ -10,8 +10,6 @@
|
||||
|
||||
// xfail-fast
|
||||
|
||||
use std::uint;
|
||||
|
||||
pub trait plus {
|
||||
fn plus(&self) -> int;
|
||||
}
|
||||
|
@ -10,8 +10,6 @@
|
||||
|
||||
// xfail-fast
|
||||
|
||||
use std::int;
|
||||
|
||||
trait to_str {
|
||||
fn to_string(&self) -> ~str;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user