diff --git a/clippy_lints/src/approx_const.rs b/clippy_lints/src/approx_const.rs index 704546a1eb3..0288176f436 100644 --- a/clippy_lints/src/approx_const.rs +++ b/clippy_lints/src/approx_const.rs @@ -1,9 +1,9 @@ +use crate::utils::span_lint; use rustc::hir::*; use rustc::lint::*; use std::f64::consts as f64; use syntax::ast::{FloatTy, Lit, LitKind}; use syntax::symbol; -use crate::utils::span_lint; /// **What it does:** Checks for floating point literals that approximate /// constants which are defined in diff --git a/clippy_lints/src/arithmetic.rs b/clippy_lints/src/arithmetic.rs index ff32fcb7843..a9ccc336a19 100644 --- a/clippy_lints/src/arithmetic.rs +++ b/clippy_lints/src/arithmetic.rs @@ -1,7 +1,7 @@ +use crate::utils::span_lint; use rustc::hir; use rustc::lint::*; use syntax::codemap::Span; -use crate::utils::span_lint; /// **What it does:** Checks for plain integer arithmetic. /// diff --git a/clippy_lints/src/array_indexing.rs b/clippy_lints/src/array_indexing.rs index 6002960fe2c..77aa5e83425 100644 --- a/clippy_lints/src/array_indexing.rs +++ b/clippy_lints/src/array_indexing.rs @@ -1,10 +1,10 @@ use crate::consts::{constant, Constant}; +use crate::utils::higher::Range; +use crate::utils::{self, higher}; use rustc::hir; use rustc::lint::*; use rustc::ty; use syntax::ast::RangeLimits; -use crate::utils::higher::Range; -use crate::utils::{self, higher}; /// **What it does:** Checks for out of bounds array indexing with a constant /// index. diff --git a/clippy_lints/src/assign_ops.rs b/clippy_lints/src/assign_ops.rs index 44398a9710f..ba405610c90 100644 --- a/clippy_lints/src/assign_ops.rs +++ b/clippy_lints/src/assign_ops.rs @@ -1,9 +1,9 @@ +use crate::utils::{get_trait_def_id, implements_trait, snippet_opt, span_lint_and_then, SpanlessEq}; +use crate::utils::{higher, sugg}; use rustc::hir; use rustc::hir::intravisit::{walk_expr, NestedVisitorMap, Visitor}; use rustc::lint::*; use syntax::ast; -use crate::utils::{get_trait_def_id, implements_trait, snippet_opt, span_lint_and_then, SpanlessEq}; -use crate::utils::{higher, sugg}; /// **What it does:** Checks for compound assignment operations (`+=` and /// similar). diff --git a/tests/compile-test.rs b/tests/compile-test.rs index 236cce0dbb7..da5c5bd3227 100644 --- a/tests/compile-test.rs +++ b/tests/compile-test.rs @@ -3,10 +3,10 @@ extern crate compiletest_rs as compiletest; extern crate test; -use std::io; +use std::env::{set_var, var}; use std::ffi::OsStr; use std::fs; -use std::env::{set_var, var}; +use std::io; use std::path::{Path, PathBuf}; fn clippy_driver_path() -> PathBuf { @@ -93,12 +93,11 @@ fn run_ui_toml_tests(config: &compiletest::Config, mut tests: Vec {} + Ok(true) => {}, Ok(false) => panic!("Some tests failed"), Err(e) => { println!("I/O failure during tests: {:?}", e); - } + }, } }