From 0edb49792f26de7af09e0727fb178ba4240a2632 Mon Sep 17 00:00:00 2001 From: Konrad Borowski Date: Sat, 29 Dec 2018 17:46:25 +0100 Subject: [PATCH 1/2] Apply cargo fix --edition-idioms fixes --- tests/compile-test.rs | 2 +- tests/matches.rs | 2 +- tests/needless_continue_helpers.rs | 2 +- tests/versioncheck.rs | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/compile-test.rs b/tests/compile-test.rs index 8b8ffe86f198..005c2ce33f92 100644 --- a/tests/compile-test.rs +++ b/tests/compile-test.rs @@ -9,7 +9,7 @@ #![feature(test)] -extern crate compiletest_rs as compiletest; +use compiletest_rs as compiletest; extern crate test; use std::env::{set_var, var}; diff --git a/tests/matches.rs b/tests/matches.rs index fb5dbf5d84dc..3fdb65c6a40e 100644 --- a/tests/matches.rs +++ b/tests/matches.rs @@ -9,7 +9,7 @@ #![feature(rustc_private)] -extern crate clippy_lints; +use clippy_lints; extern crate syntax; use std::collections::Bound; diff --git a/tests/needless_continue_helpers.rs b/tests/needless_continue_helpers.rs index 8237ac437ba1..68ccbc7fc033 100644 --- a/tests/needless_continue_helpers.rs +++ b/tests/needless_continue_helpers.rs @@ -10,7 +10,7 @@ // Tests for the various helper functions used by the needless_continue // lint that don't belong in utils. -extern crate clippy_lints; + use clippy_lints::needless_continue::{erode_block, erode_from_back, erode_from_front}; #[test] diff --git a/tests/versioncheck.rs b/tests/versioncheck.rs index cdf97f75ec66..294e5d7d60b1 100644 --- a/tests/versioncheck.rs +++ b/tests/versioncheck.rs @@ -7,8 +7,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate cargo_metadata; -extern crate semver; +use cargo_metadata; + use semver::VersionReq; #[test] From 177c639e65b56f574d2baa1403c31551a945077c Mon Sep 17 00:00:00 2001 From: Konrad Borowski Date: Sat, 29 Dec 2018 17:48:00 +0100 Subject: [PATCH 2/2] Remove unnecessary `use` statements after `cargo fix` --- tests/matches.rs | 1 - tests/needless_continue_helpers.rs | 1 - tests/versioncheck.rs | 2 -- 3 files changed, 4 deletions(-) diff --git a/tests/matches.rs b/tests/matches.rs index 3fdb65c6a40e..a445772c3195 100644 --- a/tests/matches.rs +++ b/tests/matches.rs @@ -9,7 +9,6 @@ #![feature(rustc_private)] -use clippy_lints; extern crate syntax; use std::collections::Bound; diff --git a/tests/needless_continue_helpers.rs b/tests/needless_continue_helpers.rs index 68ccbc7fc033..e0dcd035c58e 100644 --- a/tests/needless_continue_helpers.rs +++ b/tests/needless_continue_helpers.rs @@ -10,7 +10,6 @@ // Tests for the various helper functions used by the needless_continue // lint that don't belong in utils. - use clippy_lints::needless_continue::{erode_block, erode_from_back, erode_from_front}; #[test] diff --git a/tests/versioncheck.rs b/tests/versioncheck.rs index 294e5d7d60b1..945e35f4ebfe 100644 --- a/tests/versioncheck.rs +++ b/tests/versioncheck.rs @@ -7,8 +7,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use cargo_metadata; - use semver::VersionReq; #[test]