From e9688fcfe3d345ae34e25c3bd51f878be4410d96 Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Tue, 30 Apr 2013 22:47:09 -0700 Subject: [PATCH] remove some warnings --- src/compiletest/header.rs | 3 +-- src/compiletest/runtest.rs | 2 +- src/libsyntax/ast_util.rs | 2 +- src/libsyntax/parse/mod.rs | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/compiletest/header.rs b/src/compiletest/header.rs index b0d04c6739b..b29e1c77be3 100644 --- a/src/compiletest/header.rs +++ b/src/compiletest/header.rs @@ -82,14 +82,13 @@ pub fn load_props(testfile: &Path) -> TestProps { } pub fn is_test_ignored(config: config, testfile: &Path) -> bool { - let mut found = false; for iter_header(testfile) |ln| { if parse_name_directive(ln, ~"xfail-test") { return true; } if parse_name_directive(ln, xfail_target()) { return true; } if config.mode == common::mode_pretty && parse_name_directive(ln, ~"xfail-pretty") { return true; } }; - return found; + return true; fn xfail_target() -> ~str { ~"xfail-" + str::from_slice(os::SYSNAME) diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs index fef4cabf7fd..5805c173029 100644 --- a/src/compiletest/runtest.rs +++ b/src/compiletest/runtest.rs @@ -106,7 +106,7 @@ fn run_rpass_test(config: config, props: TestProps, testfile: &Path) { fatal_ProcRes(~"test run failed!", ProcRes); } } else { - let mut ProcRes = jit_test(config, props, testfile); + let ProcRes = jit_test(config, props, testfile); if ProcRes.status != 0 { fatal_ProcRes(~"jit failed!", ProcRes); } } diff --git a/src/libsyntax/ast_util.rs b/src/libsyntax/ast_util.rs index bf5381831d0..283c232fb3f 100644 --- a/src/libsyntax/ast_util.rs +++ b/src/libsyntax/ast_util.rs @@ -11,7 +11,7 @@ use ast::*; use ast; use ast_util; -use codemap::{span, dummy_sp, spanned}; +use codemap::{span, spanned}; use parse::token; use visit; use opt_vec; diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index 7e7931bbb60..5d51a54d770 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -24,7 +24,7 @@ use core::io; use core::option::{None, Option, Some}; use core::path::Path; -use core::result::{Err, Ok, Result}; +use core::result::{Err, Ok}; pub mod lexer; pub mod parser; -- 2.44.0