Skip to content

Commit 91d6c60

Browse files
committed
fix various warnings
1 parent 6a22595 commit 91d6c60

13 files changed

+11
-30
lines changed

src/libstd/fmt/parse.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,6 @@ impl<'self> Parser<'self> {
595595
mod tests {
596596
use super::*;
597597
use prelude::*;
598-
use realstd::fmt::{String};
599598

600599
fn same(fmt: &'static str, p: ~[Piece<'static>]) {
601600
let mut parser = Parser::new(fmt);

src/libstd/ptr.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
1313
use cast;
1414
use clone::Clone;
15+
#[cfg(not(test))]
1516
use cmp::Equiv;
1617
use iterator::{range, Iterator};
1718
use option::{Option, Some, None};

src/libsyntax/parse/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ mod test {
340340
use parse::token::{str_to_ident};
341341
use util::parser_testing::{string_to_tts_and_sess, string_to_parser};
342342
use util::parser_testing::{string_to_expr, string_to_item};
343-
use util::parser_testing::{string_to_stmt, strs_to_idents};
343+
use util::parser_testing::string_to_stmt;
344344

345345
// map a string to tts, return the tt without its parsesess
346346
fn string_to_tts_only(source_str : @str) -> ~[ast::token_tree] {

src/test/bench/shootout-pfib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ use std::io;
2828
use std::os;
2929
use std::result::{Ok, Err};
3030
use std::task;
31-
use std::u64;
3231
use std::uint;
3332

3433
fn fib(n: int) -> int {

src/test/run-pass/const-cross-crate-extern.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@
1313

1414
extern mod cci_const;
1515
use cci_const::bar;
16-
use std::cast::transmute;
1716
static foo: extern "C" fn() = bar;
1817

1918
pub fn main() {
20-
unsafe {
21-
assert_eq!(foo, bar);
22-
}
19+
assert_eq!(foo, bar);
2320
}

src/test/run-pass/const-extern-function.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ struct S {
1818
}
1919

2020
pub fn main() {
21-
unsafe {
22-
assert_eq!(foopy, f);
23-
assert_eq!(f, s.f);
24-
}
21+
assert_eq!(foopy, f);
22+
assert_eq!(f, s.f);
2523
}

src/test/run-pass/extern-compare-with-return-type.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extern fn voidret2() {}
1515

1616
extern fn uintret() -> uint { 22 }
1717

18-
extern fn uintvoidret(x: uint) {}
18+
extern fn uintvoidret(_x: uint) {}
1919

2020
extern fn uintuintuintuintret(x: uint, y: uint, z: uint) -> uint { x+y+z }
2121

src/test/run-pass/extern-take-value.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,17 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use std::cast::transmute;
12-
1311
extern fn f() {
1412
}
1513

1614
extern fn g() {
1715
}
1816

1917
pub fn main() {
20-
unsafe {
21-
let a: extern "C" fn() = f;
22-
let b: extern "C" fn() = f;
23-
let c: extern "C" fn() = g;
18+
let a: extern "C" fn() = f;
19+
let b: extern "C" fn() = f;
20+
let c: extern "C" fn() = g;
2421

25-
assert_eq!(a, b);
26-
assert!(a != c);
27-
}
22+
assert_eq!(a, b);
23+
assert!(a != c);
2824
}

src/test/run-pass/issue-5917.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use std::io;
12-
1311
struct T (&'static [int]);
1412
static t : T = T (&'static [5, 4, 3]);
1513
fn main () {

src/test/run-pass/monad.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
// xfail-fast
1212

13-
use std::int;
14-
1513
trait vec_monad<A> {
1614
fn bind<B>(&self, f: &fn(&A) -> ~[B]) -> ~[B];
1715
}

src/test/run-pass/reflect-visit-data.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
// xfail-fast
1212

13-
use std::int;
1413
use std::libc::c_void;
1514
use std::ptr;
1615
use std::sys;

src/test/run-pass/static-impl.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
// xfail-fast
1212

13-
use std::uint;
14-
1513
pub trait plus {
1614
fn plus(&self) -> int;
1715
}

src/test/run-pass/trait-generic.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
// xfail-fast
1212

13-
use std::int;
14-
1513
trait to_str {
1614
fn to_string(&self) -> ~str;
1715
}

0 commit comments

Comments
 (0)